:root {
    --navy: #041231;
    --orange: #ff8a00;
    --accent: #ffb26b;
    --card: #ffffff;
}

* {
    box-sizing: border-box;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
}

body {
    margin: 0;
    background: linear-gradient(180deg, var(--navy), #072044 60%);
    color: #072b3a;
}

.container {
    flex: 1 1 auto;
    max-width: 1200px;
    margin: 9px auto;
    padding: 16px;
    height: 80%;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    color: white;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

.logo {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.06);
}

.nav a {
    color: white;
    text-decoration: none;
    margin-left: 10px;
    font-weight: 700;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.nav a:hover,
.nav a.active {
    background: rgba(255, 138, 0, 0.12);
    color: var(--orange);
}

.layout {
    display: flex;
    gap: 18px;
    margin-top: 12px;
}

.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 12px;
    position: sticky;
    top: 20px;
    height: 80vh;
    overflow: auto;
}

.sidebar h3 {
    color: var(--accent);
    margin-top: 0;
}

.cat-link {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    margin-bottom: 6px;
    transition: all 0.3s;
}

.cat-link:hover {
    background: rgba(255, 138, 0, 0.12);
    color: var(--orange);
}

.content {
    flex: 1;
    background: var(--card);
    padding: 16px;
    border-radius: 10px;
}

.section {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.section h2 {
    margin: 0 0 8px 0;
    color: var(--navy);
}

.items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.item {
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.06);
}

.item .left {
    max-width: 70%;
}

.price {
    font-weight: 800;
    color: var(--navy);
}

.add-btn {
    background: var(--orange);
    border: none;
    color: white;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
    transition: background-color 0.3s;
}

.add-btn:hover {
    background: #e67a00;
}

.cart-sticky {
    position: fixed;
    right: 18px;
    bottom: 18px;
    background: linear-gradient(90deg, var(--orange), #ff6a00);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    cursor: pointer;
    display: flex;
    gap: 10px;
    align-items: center;
    transition: transform 0.3s;
}

.cart-sticky:hover {
    transform: translateY(-2px);
}

.cart-sticky .count {
    font-weight: 800;
}

.footer {
    margin-top: 18px;
    color: #fff;
    text-align: center;
    padding: 12px;
    font-size: 14px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 18, 49, 0.8);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.addon-list {
    margin: 20px 0;
}

.addon-item {
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.addon-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
}

.addon-price {
    font-weight: 600;
    color: var(--orange);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-primary {
    background: var(--orange);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-secondary {
    background: transparent;
    color: var(--navy);
    border: 1px solid #ddd;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* Cart page styles */
.cart-container {
    max-width: 900px;
    margin: 22px auto;
    background: #fff;
    padding: 18px;
    border-radius: 12px;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
    height: 80px;
}

.cart-list {
    margin-top: 12px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background: #fbfbfd;
    margin-bottom: 10px;
    transition: transform 0.18s, opacity 0.18s;
}

.cart-item.enter {
    transform: translateY(-6px);
    opacity: 0;
}

.cart-item .meta {
    max-width: 70%;
}

.qty-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.qty-btn {
    background: #f1f3f5;
    border: 1px solid #e6e9ee;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.qty-input {
    width: 64px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #ddd;
    text-align: center;
}

.summary-box {
    background: #fff;
    border: 1px solid #eee;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.04);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.total-amount {
    font-weight: 900;
    color: var(--orange);
    font-size: 20px;
    transition: all 0.25s;
}

.sticky-summary {
    background: #fff;
    padding: 12px 18px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -6px 18px rgba(2, 6, 23, 0.06);
    z-index: 3000;
}

.sticky-actions {
    display: flex;
    gap: 8px;
}

.store-btn {
    background: var(--orange);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    border: 0;
    font-weight: 900;
    cursor: pointer;
}

.back-menu {
    background: transparent;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.confirm-popup {
    position: fixed;
    left: 50%;
    top: 40%;
    transform: translate(-50%, -50%);
    background: rgba(2, 6, 23, 0.95);
    color: white;
    padding: 18px 24px;
    border-radius: 10px;
    font-weight: 800;
    display: none;
    z-index: 4000;
    opacity: 0;
    transition: opacity 0.25s;
}

@media (max-width: 900px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
    }

    .header {
        flex-direction: column;
        gap: 12px;
    }

    .nav {
        display: flex;
        gap: 8px;
    }

    .nav a {
        margin-left: 0;
    }
}
