:root {
    /* Premium Minimal Palette - Light */
    --bg-color: #fcfcfd;
    --card-bg: #ffffff;
    --text-color: #0c0c0d;
    --text-secondary: #636366;
    --accent-color: #ff7a00;
    --accent-hover: #f56e00;
    --accent-gradient: linear-gradient(135deg, #ff7a00 0%, #ff8c42 100%);
    --accent-glow: rgba(255, 122, 0, 0.12);
    --border-color: #eeeeef;
    --nav-bg: rgba(255, 255, 255, 0.75);
    --radius-md: 10px;
    --radius-lg: 20px;
    --font-main: 'Inter', -apple-system, system-ui, sans-serif;
}

[data-theme="dark"] {
    /* Premium Minimal Palette - Dark */
    --bg-color: #09090b;
    --card-bg: #121214;
    --text-color: #f2f2f5;
    --text-secondary: #949499;
    --accent-color: #ff9d23;
    --accent-hover: #ff7a00;
    --border-color: #1c1c1e;
    --nav-bg: rgba(10, 10, 12, 0.82);
}

* {
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 1px;
    height: 1px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 4px;
    opacity: 0.5;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-color);
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding-top: 60px;
    /* Space for fixed nav */
    padding-bottom: 80px;
    /* Space for footer */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1 {
    font-weight: 700;
    font-size: 40px;
    letter-spacing: -0.015em;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    font-weight: 600;
    font-size: 28px;
    margin-bottom: 15px;
}

h3 {
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 10px;
}

p {
    color: var(--text-secondary);
    font-size: 15px;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

a:hover {
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: 980px;
    margin: 40px auto;
    padding: 0 20px;
    flex: 1;
    /* Push footer down */
    width: 100%;
}

/* Navbar */
/* Navbar Upgrade */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 76px;
    background: var(--nav-bg);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(20px, calc(50vw - 490px));
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav a {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    opacity: 0.65;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 0;
}

.nav a:hover,
.nav a.active {
    opacity: 1;
    color: var(--accent-color);
}

.nav a svg {
    width: 19px;
    height: 19px;
    stroke-width: 1.8px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav a:hover svg {
    transform: translateY(-1.5px);
}

.nav-brand {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-color);
    text-decoration: none;
    opacity: 1 !important;
}

/* New Logo Brand Styling */
/* MI-style Logo */
.nav-brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    transition: transform 0.2s ease;
}

.nav-brand-logo:hover {
    transform: scale(1.02);
}

.mi-logo {
    background: #ff6700;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    /* MI squircle aesthetic */
    margin-right: 12px;
    box-shadow: 0 4px 12px rgba(255, 103, 0, 0.25);
    flex-shrink: 0;
}

.mi-logo svg {
    width: 20px;
    height: 20px;
    color: white;
}

.logo-name {
    color: var(--text-color);
    font-weight: 700;
    font-size: 21px;
    letter-spacing: -0.03em;
}

/* Adjust nav for larger logo if needed */
.nav {
    height: 76px;
    /* Consistent height */
}

body {
    padding-top: 80px;
}

/* SIGN IN Button (Nav Link Variant) */
.nav .nav-btn {
    background: var(--accent-gradient);
    color: #fff !important;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px var(--accent-glow);
    border: none;
    cursor: pointer;
    opacity: 1 !important;
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
    filter: brightness(1.05);
}

.nav-btn:active {
    transform: translateY(0);
}


/* Cards & Forms */
.form-box {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 400px;
    margin: 40px auto;
    text-align: center;
}

input,
textarea {
    width: 100%;
    padding: 16px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 17px;
    font-family: inherit;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

button {
    width: 100%;
    padding: 14px 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    /* Pill shape feel */
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
}

button:hover {
    background: var(--accent-hover);
}

button:active {
    transform: scale(0.98);
}

button.danger {
    background: var(--danger-color);
}

button.secondary {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    font-weight: 500;
}

button.secondary:hover {
    background: var(--bg-color);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
}

.rating-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--border-color);
    z-index: 10;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }

    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
}

[data-theme="dark"] .rating-badge {
    background: rgba(0, 0, 0, 0.7);
    color: white;
}

.rating-star {
    color: #ffc107;
}

.rating-count {
    color: var(--text-secondary);
    font-weight: 500;
    padding-left: 4px;
    border-left: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.product-card img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    display: block;
}

.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.product-card h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
}

.product-card .category {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.product-card .price {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    margin-top: auto;
}

.product-card .description {
    font-size: 13px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 4px 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

th,
td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-color);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(0, 0, 0, 0.015);
}

[data-theme="dark"] tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.status-confirmed,
.status-verified {
    background: rgba(255, 122, 0, 0.1);
    color: var(--accent-color);
    border-color: rgba(255, 122, 0, 0.2);
}

.status-rejected {
    background: rgba(255, 69, 58, 0.1);
    color: #ff453a;
    border-color: rgba(255, 69, 58, 0.2);
}

.status-pending {
    background: rgba(142, 142, 147, 0.1);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

@keyframes pulse {
    0% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }

    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
}

/* Consolidated Minimal Clock */
.flip-clock {
    display: flex;
    gap: 4px;
    align-items: center;
    background: var(--border-color);
    padding: 4px 12px;
    border-radius: 12px;
    margin: 0 15px;
}

.flip-unit {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-color);
}

.clock-sep {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0.5;
    margin: 0 1px;
}

.clock-ampm {
    font-size: 10px;
    font-weight: 800;
    color: var(--accent-color);
    margin-left: 6px;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .flip-clock {
        display: none;
    }
}

/* Theme Toggle Upgrade */
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 8px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--border-color);
    color: var(--accent-color);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .theme-toggle .sun {
    display: block;
}

[data-theme="dark"] .theme-toggle .moon {
    display: none;
}

[data-theme="light"] .theme-toggle .sun {
    display: none;
}

[data-theme="light"] .theme-toggle .moon {
    display: block;
}

/* Default state if data-theme not set */
.theme-toggle .sun {
    display: none;
}

.theme-toggle .moon {
    display: block;
}

[data-theme="dark"] .theme-toggle:hover svg {
    transform: rotate(45deg);
}

/* Admin Panel */
#admin-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 30px;
}

#admin-panel h3 {
    margin-top: 0;
}

.error-msg {
    color: var(--danger-color);
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

/* Footer */
footer {
    background: var(--footer-bg);
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-secondary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-color);
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px var(--accent-glow);
    transform: translateY(-1px);
}

.search-icon {
    position: absolute;
    left: 20px;
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
    pointer-events: none;
    transition: fill 0.3s ease;
}

.search-input:focus+.search-icon {
    fill: var(--accent-color);
}

/* Orders Table Desktop Helpers */
.order-date-td,
.order-id-td {
    padding: 24px 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.order-id-td {
    font-family: monospace;
    opacity: 0.8;
}

.order-product-td,
.order-status-td,
.order-action-td {
    padding: 24px 0;
}

.product-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-color);
}

.project-id-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    letter-spacing: 0.5px;
}

.rejection-reason {
    font-size: 11px;
    color: #ff453a;
    margin-top: 6px;
    font-weight: 500;
}

.view-details-btn {
    font-size: 13px;
    padding: 8px 16px;
}

.contact-support-link {
    font-size: 12px;
    color: #ff453a;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.verifying-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    justify-content: flex-end;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    opacity: 0.5;
    animation: pulse 1.5s infinite;
}

@media (max-width: 768px) {
    .order-action-td {
        justify-content: center !important;
    }

    .verifying-status {
        justify-content: center;
    }
}

/* Category Bar */
.category-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding: 10px 5px;
    scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
    display: none;
}

.category-chip {
    padding: 8px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.category-chip:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.category-chip.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-secondary);
    font-weight: 400;
}

.footer-links a:hover {
    text-decoration: underline;
    color: var(--text-color);
}

/* Mobile Bottom Nav */
@media (max-width: 768px) {
    .nav-links {
        display: none !important;
    }

    body {
        padding-bottom: 80px;
        padding-top: 10px;
        /* Reduced top padding as nav is hidden/simplified */
    }

    .bottom-nav {
        display: flex !important;
    }

    .container {
        padding: 0 15px;
        margin-top: 40px;
        /* Increased margin for header breathing room */
    }

    h1 {
        font-size: 28px;
        /* Smaller title */
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        /* Smaller cards */
        gap: 15px;
    }

    /* Responsive Tables (convert to cards) */
    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        margin: 0 0 20px 0;
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 15px;
        background: var(--card-bg);
        box-shadow: var(--shadow-sm);
        display: block;
    }

    td {
        border-bottom: 1px solid var(--border-color);
        position: relative;
        padding: 12px 10px;
        /* Removed 50% left padding */
        text-align: right !important;
        display: flex;
        justify-content: space-between;
        /* Flex ensures label and value are on opposite sides */
        align-items: center;
        min-height: 45px;
    }

    td:last-child {
        border-bottom: none;
    }

    td:before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-secondary);
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-right: 15px;
        /* Added margin for separation */
    }

    td b,
    td span {
        text-align: right;
        flex: 1;
        /* Allow content to take remaining space */
    }

    /* Redundancy Fix for Mobile */
    .cart-summary-card {
        display: none !important;
        /* Hide on mobile as we use sticky footer */
    }

    /* Adjust admin panel layout for mobile */
    #admin-panel {
        padding: 15px;
    }

    #admin-projects>div {
        grid-template-columns: 1fr !important;
        /* Stack inputs */
    }

    /* Modal Sheet fixes */
    #modal-sheet {
        padding: 25px;
    }
}

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    justify-content: space-around;
    align-items: center;
    z-index: 2000;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 10px;
    flex: 1;
    height: 100%;
    transition: color 0.2s;
}

.bottom-nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    fill: currentColor;
}

.bottom-nav-item.active {
    color: var(--logo-orange);
}

.bottom-nav-item:hover {
    color: var(--text-color);
    text-decoration: none;
}

/* Profile UI */
.profile-container {
    max-width: 800px;
    margin: 40px auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    font-weight: 700;
    box-shadow: 0 8px 16px var(--accent-glow);
}

.profile-title-group h2 {
    margin: 0;
    font-size: 24px;
}

.profile-title-group p {
    margin: 4px 0 0 0;
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.2s;
}

.form-group input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px var(--accent-glow);
    outline: none;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tag {
    background: rgba(255, 122, 0, 0.1);
    color: var(--accent-color);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 122, 0, 0.2);
}

.tag span {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    opacity: 0.6;
}

.tag span:hover {
    opacity: 1;
}

.interest-suggestions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.suggestion-chip {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.suggestion-chip:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: var(--card-bg);
}

.logout-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.btn-logout {
    background: transparent;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-logout:hover {
    background: var(--danger-color);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 69, 58, 0.2);
}

@media (max-width: 600px) {
    .profile-container {
        padding: 25px;
        margin: 20px auto;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

/* Category Bar */
.category-bar {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 5px;
    margin-bottom: 20px;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar IE 10+ */
    -webkit-overflow-scrolling: touch;
}

.category-bar::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.category-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    user-select: none;
}

.category-item:hover,
.category-item.active {
    background: var(--logo-orange);
    color: white;
    border-color: var(--logo-orange);
}

.category-item img {
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 50%;
}

/* Horizontal Scroll Container (Recommendations) */
.horizontal-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 5px 20px 5px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.horizontal-scroll .product-card {
    min-width: 260px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    margin: 0;
}

@media (max-width: 768px) {
    .horizontal-scroll .product-card {
        min-width: 180px;
        /* Smaller cards on mobile */
    }
}

/* Order History (Profile Tab) */
.order-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
}

.order-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

.order-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.order-info p {
    margin: 4px 0;
    color: var(--text-secondary);
    font-size: 13px;
}

@media (max-width: 600px) {
    .order-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .order-card div:last-child {
        text-align: left !important;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Cart Page Enhancements */
.cart-list-container {
    margin-bottom: 40px;
}

.empty-cart-view {
    text-align: center;
    padding: 80px 20px;
    background: var(--card-bg);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.empty-cart-icon {
    width: 100px;
    height: 100px;
    background: var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--text-secondary);
    font-size: 40px;
}

.cart-summary-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .cart-summary-sticky {
        position: fixed;
        bottom: 60px;
        left: 0;
        width: 100%;
        background: var(--nav-bg);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-color);
        padding: 15px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        z-index: 1510;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    }
}

/* Tabs Styling */
.tabs {
    display: flex;
    gap: 20px;
    margin: 20px 0 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
    justify-content: center;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 12px 20px;
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent-color);
    transition: width 0.3s ease;
    border-radius: 3px 3px 0 0;
}

.tab-btn.active {
    color: var(--accent-color);
}

.tab-btn.active::after {
    width: 100%;
}

.tab-btn:hover {
    color: var(--text-color);
}

@media (max-width: 600px) {
    .tabs {
        gap: 10px;
        margin: 10px 0 20px;
    }

    .tab-btn {
        font-size: 14px;
        padding: 10px 15px;
        flex: 1;
        text-align: center;
    }
}


/* Mobile Profile Specific Overrides */
@media (max-width: 600px) {
    .profile-container {
        padding: 25px;
        margin: 0 auto 20px !important;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .profile-header {
        flex-direction: column !important;
        text-align: center !important;
        gap: 20px !important;
        margin-bottom: 30px !important;
        padding-top: 10px !important;
    }

    .profile-avatar {
        width: 100px !important;
        height: 100px !important;
        font-size: 40px !important;
        margin: 0 auto;
    }

    .profile-title-group h2 {
        font-size: 26px !important;
    }

    .form-group {
        margin-bottom: 20px !important;
    }

    .form-group button {
        height: 50px;
        font-size: 14px;
    }
}


/* Responsive Authentication Layout */
.auth-page-container {
    display: flex;
    align-items: center;
    min-height: 80vh;
    padding: 60px 0;
    gap: 60px;
}

.auth-welcome-section {
    flex: 1;
    text-align: center;
}

.auth-welcome-section h1 {
    font-size: 56px;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.auth-welcome-section p {
    font-size: 24px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.auth-form-container {
    flex: 0 0 400px;
}

.auth-form-container .form-box {
    margin: 0;
    width: 100%;
}

@media (max-width: 900px) {
    .auth-page-container {
        flex-direction: column;
        justify-content: center;
        padding: 40px 20px;
        gap: 40px;
        min-height: auto;
    }

    .auth-welcome-section h1 {
        font-size: 38px;
    }

    .auth-welcome-section p {
        font-size: 18px;
    }

    .auth-form-container {
        flex: none;
        width: 100%;
        max-width: 400px;
    }
}


/* Global Modal & Sheet System */
.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    z-index: 2000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.sheet-overlay.active {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.bottom-sheet {
    background: var(--card-bg);
    width: 100%;
    max-width: 700px;
    padding: 30px;
    border-radius: 24px 24px 0 0;
    position: relative;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.sheet-overlay.active .bottom-sheet {
    transform: translateY(0);
}

.sheet-handle {
    width: 32px;
    height: 5px;
    background: var(--text-secondary);
    border-radius: 3px;
    margin: -10px auto 20px;
    opacity: 0.2;
}

.sheet-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(128, 128, 128, 0.1);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text-color);
    font-size: 20px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.sheet-close-btn:hover {
    transform: scale(1.1);
    background: rgba(128, 128, 128, 0.2);
}