/* Design System */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #fff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-main: #111827;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --accent: #000;
    --accent-hover: #1f2937;
    --success: #10b981;
    --error: #ef4444;
    --error-light: #fee2e2;
    --warning: #f59e0b;
    --border: #e5e7eb;
    --border-focus: #000;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);

    --font-family: 'Inter', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.75rem;
    --font-size-3xl: 2.5rem;

    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 40px;
    --space-6: 48px;
    --space-8: 64px;

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-full: 9999px;

    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    background: var(--bg-primary);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 { font-size: var(--font-size-3xl); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }

a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

a:hover { opacity: 0.7; }

img {
    max-width: 100%;
    display: block;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-3);
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.navbar .logo a {
    text-decoration: none;
    color: var(--text-main);
}

.navbar .logo h2 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    margin-left: auto;
}


.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: 0;
}

.nav-toggle-bar {
    width: 22px;
    height: 2px;
    background: var(--text-main);
    border-radius: 999px;
    transform-origin: center;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav-toggle-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.currency-select {
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-main);
    padding: 8px 36px 8px 12px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
        linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 55%,
        calc(100% - 12px) 55%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

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

.currency-select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.nav-user-greeting {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-right: var(--space-1);
}

.nav-user-name {
    font-weight: 600;
    color: var(--text-main);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: 10px 20px;
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 500;
    line-height: 1;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.98);
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    padding: 8px 12px;
}

/* Scroll reveal (non-layout impacting) */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 420ms ease, transform 420ms ease;
    will-change: opacity, transform;
}

.reveal.reveal-in {
    opacity: 1;
    transform: translateY(0);
}

.btn-ghost:hover {
    background: var(--bg-secondary);
    color: var(--text-main);
}

.btn-danger {
    background: var(--error);
    color: var(--bg-primary);
}

.btn-danger:hover {
    background: var(--error-light);
}

.btn-icon {
    position: relative;
    background: transparent;
    color: var(--text-main);
    padding: 8px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.btn-icon:hover {
    background: var(--bg-secondary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: var(--font-size-xs);
}

.btn-lg {
    padding: 14px 28px;
    font-size: var(--font-size-base);
    font-weight: 600;
}

.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Cart badge */
.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--accent);
    color: var(--bg-primary);
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

.cart-badge.bounce {
    animation: badgeBounce 0.4s ease;
}

@keyframes badgeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: var(--space-6) var(--space-3);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-6);
}

.hero h1 {
    margin-bottom: var(--space-2);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    font-size: var(--font-size-lg);
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.section-header h2 {
    font-size: var(--font-size-2xl);
}

.catalog-bubbles {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}

.catalog-bubble {
    min-width: 84px;
    height: 40px;
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 12px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.catalog-bubble:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.catalog-section {
    margin-bottom: var(--space-6);
}

.catalog-section-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-2);
}

/* Customer Feedback */
.feedback-section {
    padding: var(--space-6) 0 var(--space-8);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.feedback-carousel {
    display: block;
}

.feedback-list {
    overflow: hidden;
    max-width: 720px;
    margin: 0 auto;
}

.feedback-track {
    display: flex;
    width: 100%;
    transition: transform 500ms ease;
}

.feedback-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-2) var(--space-3);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 100%;
    max-width: 520px;
    margin: 0 auto;
    animation: feedbackFloat 6s ease-in-out infinite;
}

.feedback-name {
    font-size: var(--font-size-sm);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.feedback-body {
    font-size: var(--font-size-sm);
    color: var(--text-main);
    line-height: 1.6;
}

.feedback-image {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.feedback-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

@keyframes feedbackFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-3);
    padding-bottom: var(--space-8);
}

/* Product Card */
.product-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: transparent;
    transform: translateY(-2px);
}

.product-card-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-body {
    padding: var(--space-2);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-title {
    font-size: var(--font-size-base);
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--space-1);
}

.product-card-price {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: var(--space-2);
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.price-original {
    color: var(--text-muted);
    font-weight: 600;
}

.price-strike {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
}

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

.product-sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: var(--bg-primary);
    font-size: var(--font-size-xs);
    font-weight: 700;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    box-shadow: var(--shadow-sm);
}

.product-card .btn {
    width: 100%;
}

/* Skeleton Loaders */
.skeleton {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 100%
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.skeleton-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.skeleton-image {
    height: 280px;
    background: var(--bg-tertiary);
    position: relative;
}

.skeleton-image::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: shimmer 1.5s infinite;
}

.skeleton-text {
    height: 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    margin: var(--space-1) var(--space-2);
    position: relative;
}

.skeleton-text::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: shimmer 1.5s infinite;
}

.skeleton-text.short { width: 40%; }
.skeleton-text.medium { width: 70%; }

.skeleton-btn {
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin: var(--space-1) var(--space-2) var(--space-2);
    position: relative;
}

.skeleton-btn::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: shimmer 1.5s infinite;
}

/* PDP (Product Detail Page) */
.pdp-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    padding: var(--space-6) 0;
    min-height: 60vh;
}

.pdp-image-col {
    position: sticky;
    top: 100px;
    align-self: start;
}

.pdp-image {
    width: 100%;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-secondary);
    aspect-ratio: 1;
}

.pdp-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdp-details {
    position: relative;
    padding: var(--space-2) 0;
}

.pdp-size-chart {
    position: absolute;
    top: -8px;
    right: -66px;
    width: 260px;
    height: 320px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
    transform: rotate(-2.1deg);
    transform-origin: top right;
}

.size-chart-pin {
    position: absolute;
    top: -8px;
    right: 14px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(0, 0, 0, 0.12);
    cursor: default;
}

.size-chart-egg {
    position: absolute;
    top: -44px;
    right: 8px;
    background: var(--bg-primary);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
    transition-delay: 0s;
}

.size-chart-pin:hover + .size-chart-egg {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 8s;
}

.pdp-size-chart-label {
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
}

.pdp-size-chart img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    background: var(--bg-secondary);
}

@media (max-width: 768px) {
    .pdp-size-chart {
        position: static;
        width: 100%;
        height: 200px;
        margin-bottom: var(--space-3);
        transform: none;
        right: auto;
        top: auto;
    }
}

.pdp-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-3);
}

.pdp-breadcrumb a {
    color: var(--text-muted);
}

.pdp-breadcrumb a:hover {
    color: var(--text-main);
}

.pdp-breadcrumb .separator {
    color: var(--text-light);
}

.pdp-title {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-2);
}

.pdp-price {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pdp-description {
    font-size: var(--font-size-base);
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: var(--space-4);
}

.pdp-stock {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.pdp-stock .dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    display: inline-block;
}

.pdp-stock .dot.in-stock { background: var(--success); }
.pdp-stock .dot.low-stock { background: var(--warning); }
.pdp-stock .dot.out-of-stock { background: var(--error); }

.quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
    overflow: hidden;
}

.quantity-selector button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: var(--font-size-lg);
    color: var(--text-main);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.quantity-selector button:hover {
    background: var(--bg-secondary);
}

.quantity-selector .qty-value {
    width: 48px;
    text-align: center;
    font-weight: 600;
    font-size: var(--font-size-base);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    line-height: 40px;
}

.pdp-add-to-cart {
    width: 100%;
    padding: 16px;
    font-size: var(--font-size-base);
    font-weight: 600;
}

/* Cart Sidebar */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
    backdrop-filter: blur(2px);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-primary);
    box-shadow: var(--shadow-xl);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--transition-slow);
}

.cart-sidebar.open {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.cart-header h3 {
    font-size: var(--font-size-lg);
}

.cart-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cart-close-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-main);
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-2) var(--space-3);
}

/* Cart Auth (Frictionless in-cart login) */
.cart-auth-prompt {
    text-align: center;
    padding: var(--space-4) var(--space-2);
}

.cart-auth-prompt .auth-icon {
    font-size: 48px;
    margin-bottom: var(--space-2);
    opacity: 0.6;
}

.cart-auth-prompt h4 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-1);
}

.cart-auth-prompt p {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-3);
}

.cart-auth-form {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
}

.cart-auth-form .form-group {
    margin-bottom: var(--space-2);
}

.cart-auth-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    transition: border-color var(--transition-fast);
    background: var(--bg-primary);
}

.cart-auth-form input:focus {
    outline: none;
    border-color: var(--border-focus);
    border-width: 2px;
    padding: 11px 13px;
}

.cart-auth-form .btn {
    width: 100%;
    margin-top: var(--space-1);
}

.cart-auth-form .auth-toggle {
    text-align: center;
    margin-top: var(--space-2);
    font-size: var(--font-size-sm);
}

.cart-auth-form .auth-error {
    color: var(--error);
    font-size: var(--font-size-sm);
    margin-top: var(--space-1);
    display: none;
}

/* Cart Items */
.cart-item {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: 4px;
    display: -webkit-box;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-price {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
        display: flex;
        flex-direction: column;
        gap: 2px;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

.cart-item-total {
    font-weight: 600;
    font-size: var(--font-size-sm);
}

    .cart-item-price .price-original {
        color: var(--text-muted);
        font-weight: 600;
        text-decoration: line-through;
        text-decoration-thickness: 2px;
    }

    .cart-item-price .price-sale {
        color: var(--accent);
        font-weight: 700;
    }
.cart-item-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.cart-item-qty button {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: var(--font-size-sm);
    color: var(--text-main);
    cursor: pointer;
}

.cart-item-qty button:hover {
    background: var(--bg-secondary);
}

.cart-item-qty .qty {
    width: 32px;
    text-align: center;
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    line-height: 28px;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 16px;
    cursor: pointer;
    padding: 2px;
    transition: color var(--transition-fast);
}

.cart-item-remove:hover {
    color: var(--error);
}

.cart-empty {
    text-align: center;
    padding: var(--space-6) var(--space-2);
    color: var(--text-muted);
}

.cart-empty .empty-icon {
    font-size: 56px;
    margin-bottom: var(--space-2);
    opacity: 0.4;
}

.cart-empty p {
    font-size: var(--font-size-sm);
}

/* Cart Footer */
.cart-footer {
    border-top: 1px solid var(--border);
    padding: var(--space-3);
    flex-shrink: 0;
    background: var(--bg-primary);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.cart-total-label {
    font-size: var(--font-size-base);
    color: var(--text-muted);
}

.cart-total-value {
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.cart-checkout-btn {
    width: 100%;
    padding: 14px;
    font-size: var(--font-size-base);
    font-weight: 600;
}

/* Responsive Site-wide */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--space-2);
    }
    .hero {
        padding: var(--space-5) var(--space-3);
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    .product-card-image,
    .skeleton-image {
        height: 240px;
    }
    .pdp-layout {
        gap: var(--space-4);
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        gap: var(--space-2);
    }
    .nav-toggle {
        display: inline-flex;
    }
    .nav-quick {
        margin-left: auto;
    }
    .nav-actions {
        display: flex;
        width: 100%;
        padding: var(--space-2) 0;
        border-top: 1px solid var(--border);
        flex-wrap: wrap;
        justify-content: flex-start;
        max-height: 0;
        opacity: 0;
        transform: translateY(-6px);
        overflow: hidden;
        pointer-events: none;
        transition: max-height 260ms ease, opacity 200ms ease, transform 200ms ease;
    }
    .nav-actions.nav-open {
        max-height: 480px;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    .hero h1 {
        font-size: clamp(2.2rem, 8vw, 3.5rem);
    }
    .pdp-layout {
        grid-template-columns: 1fr;
        padding: var(--space-4) 0;
    }
    .pdp-image-col {
        position: static;
    }
    .cart-sidebar {
        width: 100%;
    }
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .cart-item-actions {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: var(--space-1);
    }
    .catalog-bubble {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 480px) {
    .nav-actions {
        width: 100%;
        justify-content: space-between;
    }
    .product-grid {
        grid-template-columns: 1fr;
    }
    .product-card-image,
    .skeleton-image {
        height: 220px;
    }
    .pdp-title {
        font-size: var(--font-size-2xl);
    }
    .pdp-price {
        font-size: var(--font-size-xl);
    }
}

/* Checkout Section (inside cart) */
.checkout-section {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border);
}

.checkout-section h4 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.checkout-section textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    resize: vertical;
    min-height: 60px;
    transition: border-color var(--transition-fast);
    margin-bottom: var(--space-1);
}

.checkout-section textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    border-width: 2px;
    padding: 11px 13px;
}

.checkout-section .payment-note {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Auth Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    width: 90%;
    max-width: 420px;
    padding: var(--space-4);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.modal-header h2 {
    font-size: var(--font-size-xl);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-main);
}

/* Forms */
.form-group {
    margin-bottom: var(--space-2);
    position: relative;
}

.form-group label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    color: var(--text-main);
    background: var(--bg-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--border-focus);
    border-width: 2px;
    padding: 11px 13px;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-group input::placeholder {
    color: var(--text-light);
}

.form-error {
    color: var(--error);
    font-size: var(--font-size-sm);
    margin-top: 6px;
}

.form-toggle {
    text-align: center;
    margin-top: var(--space-3);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.form-toggle a {
    color: var(--accent);
    font-weight: 500;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: var(--space-3);
    right: var(--space-3);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease forwards;
    max-width: 380px;
}

.toast.removing {
    animation: toastSlideOut 0.3s ease forwards;
}

.toast-success {
    background: var(--success);
    color: var(--bg-primary);
}

.toast-error {
    background: var(--error);
    color: var(--bg-primary);
}

.toast-info {
    background: var(--accent);
    color: var(--bg-primary);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Footer (Storefront) */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: var(--space-6) var(--space-3);
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    margin-top: var(--space-8);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: var(--space-1) var(--space-2);
    }

    .navbar .logo h2 {
        font-size: var(--font-size-base);
    }

    .hero {
        padding: var(--space-4) var(--space-2);
    }

    .hero h1 {
        font-size: var(--font-size-2xl);
    }

    .hero p {
        font-size: var(--font-size-base);
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }

    .product-card-image {
        height: 200px;
    }

    .pdp-layout {
        grid-template-columns: 1fr;
        gap: var(--space-3);
        padding: var(--space-3) 0;
    }

    .pdp-image-col {
        position: static;
    }

    .pdp-title {
        font-size: var(--font-size-2xl);
    }

    .cart-sidebar {
        width: 100vw;
    }

    .container {
        padding: 0 var(--space-2);
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }
    .product-card-info h3 {
        font-size: 0.9rem;
    }
    .product-card-price {
        font-size: 0.9rem;
    }

    .nav-user-greeting {
        display: none;
    }
}

/* Additional Mobile Optimizations */
@media (max-width: 480px) {
    .nav-actions {
        gap: 8px;
    }
    .navbar .btn {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    .nav-user-greeting {
        display: none !important;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    #admin-link, #nav-orders-link {
        font-size: 0.8rem;
        margin-right: 5px !important;
    }
}

/* Orders specific mobile enhancements */
@media (max-width: 600px) {
    .order-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: var(--space-2);
    }
    .order-header > div:nth-child(2) {
        text-align: left !important;
    }
    .order-item {
        flex-direction: column;
        align-items: flex-start !important;
        gap: var(--space-2);
    }
    .order-item > div:nth-child(2) {
        width: 100%;
    }
}


/* =============================================
   — Polished Dark Mode Theme
   ============================================= */
html.dark-mode {
    --bg-primary: #0A0A0A;
    --bg-secondary: #141414;
    --bg-tertiary: #1E1E1E;
    
    --text-main: #EDEDED;
    --text-muted: #A1A1AA;
    --text-light: #71717A;
    
    --accent: #FFFFFF;
    --accent-hover: #E5E5E5;
    
    --success: #34D399;
    --success-light: #064E3B;
    --error: #F87171;
    --error-light: #7F1D1D;
    --warning: #FBBF24;
    --warning-light: #78350F;
    --info: #60A5FA;
    --info-light: #1E3A8A;

    --border: #27272A;
    --border-focus: #52525B;
    
    --surface-1: #141414;
    --surface-2: #1E1E1E;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7), 0 4px 6px -4px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.8), 0 8px 10px -6px rgba(0, 0, 0, 0.7);

    color-scheme: dark;
}

html.dark-mode body {
    background-color: var(--bg-primary);
    color: var(--text-main);
}

/* Base button text needs adapting when accent is white */
html.dark-mode .btn-primary {
    background-color: var(--accent);
    color: #000000;
}
html.dark-mode .btn-primary:hover {
    background-color: var(--accent-hover);
    color: #000000;
}

html.dark-mode .btn-outline {
    border-color: var(--border);
    color: var(--text-main);
}
html.dark-mode .btn-outline:hover {
    background-color: var(--bg-secondary);
}

/* Fix navbar transparency in dark mode */
html.dark-mode .navbar {
    background: rgba(10, 10, 10, 0.85);
    border-bottom: 1px solid var(--border);
}

/* Fix product cards and admin components */
html.dark-mode .product-card,
html.dark-mode .stat-card,
html.dark-mode .data-table-wrapper,
html.dark-mode .admin-login-card,
html.dark-mode .admin-modal,
html.dark-mode .cart-sidebar {
    background-color: var(--bg-secondary);
    border-color: var(--border);
}

html.dark-mode .cart-header,
html.dark-mode .cart-footer,
html.dark-mode .admin-sidebar-header,
html.dark-mode .admin-sidebar-footer,
html.dark-mode .data-table-header,
html.dark-mode .admin-modal-header {
    border-color: var(--border);
}

/* Fix inputs and modals in dark mode */
html.dark-mode input:not([type="checkbox"]):not([type="radio"]),
html.dark-mode textarea,
html.dark-mode select {
    background-color: var(--bg-primary);
    color: var(--text-main);
    border: 1px solid var(--border);
}
html.dark-mode input:focus,
html.dark-mode textarea:focus,
html.dark-mode select:focus {
    border-color: var(--accent);
    outline: none;
}

/* Doodles and Shapes Background */
.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.doodle {
    position: absolute;
    pointer-events: none;
}

.doodle-1 {
    width: 90px;
    height: 90px;
    top: 10%;
    right: 10%;
    transform: rotate(10deg);
    animation: float 8s ease-in-out infinite;
}

.doodle-2 {
    width: 120px;
    height: 120px;
    bottom: -10px;
    left: 5%;
    transform: rotate(-15deg);
    animation: float 6s ease-in-out infinite alternate;
}

.doodle-3 {
    width: 80px;
    height: 80px;
    top: 30%;
    left: 20%;
    transform: rotate(20deg);
    animation: float 7s ease-in-out infinite alternate-reverse;
}


.doodle-5 {
    width: 100px;
    height: 100px;
    top: 15%;
    left: 8%;
    transform: rotate(-10deg);
    animation: float 8s ease-in-out infinite;
}

.doodle-6 {
    width: 70px;
    height: 70px;
    bottom: 30%;
    right: 18%;
    transform: rotate(15deg);
    animation: float 6s ease-in-out infinite alternate;
}

.doodle-7 {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 20%;
    animation: float 9s ease-in-out infinite alternate-reverse;
}

.doodle-4 {
    bottom: 20px;
    right: 30%;
    animation: float 9s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.doodle-fill { fill: var(--text-main); opacity: 0.1; }
.doodle-fill-light { fill: var(--text-main); opacity: 0.05; }
.doodle-stroke { stroke: var(--text-main); opacity: 0.15; }

/* Theme Transition Optimization */
html.theme-transition,
html.theme-transition *,
html.theme-transition *:before,
html.theme-transition *:after {
    transition: background-color 0.3s ease, background 0.3s ease, color 0.3s ease, border-color 0.3s ease, fill 0.3s ease, stroke 0.3s ease, box-shadow 0.3s ease !important;
}
