/**
 * Puffgasm Public Shop - Dark Theme Stylesheet
 * Mobile-first responsive design with gradient accents
 */

@font-face {
    font-family: 'CenturyGothic';
    src: url('/assets/fonts/centurygothic.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'CenturyGothic';
    src: url('/assets/fonts/centurygothic_bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    /* ============================================
       Puffgasm Design System — core tokens
       ============================================ */

    /* Backgrounds & surfaces */
    --pg-bg: #0A0A12;
    --pg-bg-soft: #0E0E18;
    --pg-surface: #14141E;
    --pg-surface-2: #1A1A27;
    --pg-surface-3: #212130;
    --pg-border: #262636;
    --pg-border-strong: #35354C;

    /* Text */
    --pg-text: #EDEEF3;
    --pg-text-muted: #9BA1B0;
    --pg-text-soft: #6D7280;

    /* Brand colors */
    --pg-primary: #22D3EE;   /* cyan */
    --pg-primary-2: #8B5CF6; /* violet */
    --pg-accent: #EC4899;    /* pink — brand pop */
    --pg-accent-2: #F97316;  /* orange — deals / savings */

    /* Semantic */
    --pg-success: #22C55E;
    --pg-warning: #F59E0B;
    --pg-danger: #EF4444;
    --pg-info: #38BDF8;

    /* Gradients — used selectively: CTAs, selected states, deal highlights */
    --pg-gradient-primary: linear-gradient(135deg, #22D3EE 0%, #8B5CF6 100%);
    --pg-gradient-brand: linear-gradient(135deg, #22D3EE 0%, #8B5CF6 55%, #EC4899 100%);
    --pg-gradient-deal: linear-gradient(135deg, #F97316 0%, #EC4899 100%);

    /* Radii */
    --pg-radius-sm: 8px;
    --pg-radius-md: 12px;
    --pg-radius-lg: 16px;
    --pg-radius-xl: 22px;

    /* Shadows */
    --pg-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --pg-shadow-md: 0 6px 20px rgba(0, 0, 0, 0.35);
    --pg-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
    --pg-shadow-glow: 0 4px 20px rgba(139, 92, 246, 0.28), 0 0 0 3px rgba(139, 92, 246, 0.10);
    --pg-shadow-glow-cyan: 0 4px 20px rgba(34, 211, 238, 0.22), 0 0 0 3px rgba(34, 211, 238, 0.10);

    /* Motion */
    --pg-transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --pg-font: 'CenturyGothic', 'Century Gothic', 'Inter', 'Segoe UI', system-ui,
        -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;

    /* ============================================
       Legacy aliases — existing rules & inline
       styles resolve to the new tokens above.
       ============================================ */
    --bg: var(--pg-bg);
    --card: var(--pg-surface);
    --border: var(--pg-border);
    --fg: var(--pg-text);
    --muted: var(--pg-text-muted);

    --gradient-primary: var(--pg-gradient-primary);
    --gradient-brand: var(--pg-gradient-brand);
    --gradient-accent: var(--pg-gradient-brand);
    --gradient-cyan: var(--pg-primary);
    --gradient-violet: var(--pg-primary-2);
    --gradient-orange: var(--pg-accent-2);

    --ok: var(--pg-success);
    --danger: var(--pg-danger);

    --radius: var(--pg-radius-md);
    --radius-lg: var(--pg-radius-lg);

    --shadow: var(--pg-shadow-sm);
    --shadow-lg: var(--pg-shadow-md);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom Scrollbars - Webkit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: var(--radius);
}

::-webkit-scrollbar-thumb {
    background: var(--pg-surface-3);
    border-radius: var(--radius);
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--pg-border-strong);
}

::-webkit-scrollbar-corner {
    background: var(--bg);
}

/* Custom Scrollbars - Firefox */
/* Note: Firefox doesn't support gradients in scrollbars, so we use the violet color */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--pg-surface-3) var(--bg);
}

body {
    font-family: var(--pg-font);
    font-weight: 100;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    min-height: 100vh;
}

button,
input,
select,
textarea,
optgroup,
option {
    font-family: var(--pg-font);
}

button,
input,
select,
textarea {
    font-size: inherit;
}

a {
    color: var(--gradient-cyan);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

a:focus {
    outline: 2px solid var(--gradient-cyan);
    outline-offset: 2px;
}

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

/* Header */
.header {
    background: rgba(20, 20, 30, 0.82);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    outline: none;
}

.brand:focus,
.brand:focus-visible {
    outline: none;
    box-shadow: none;
}

.brand-logo {
    height: 60px;
    object-fit: contain;
    transform: rotate(-90deg);
}

.brand-name {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: bold;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: -2px;
    margin-top: -3px;
}

.category-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.category-tabs-container {
    max-width: 1200px;
    margin: 0 auto .5rem;
    padding: 0 1rem;
}

/* Category tabs container for joined bar design */
.category-tabs-container .category-tabs:has(.category-tabs-slider) {
    display: flex;
    position: relative;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 0.25rem;
    /* gap: 0; */
    flex-wrap: nowrap;
}

.category-tabs-slider {
    position: absolute;
    top: 0.25rem;
    bottom: 0.25rem;
    left: 0.25rem;
    background: var(--gradient-primary);
    border-radius: calc(var(--radius) - 0.125rem);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
    will-change: transform, width;
}

.category-tabs-container .category-tabs:has(.category-tabs-slider) .tab {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: calc(var(--radius) - 0.125rem);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    font-family: var(--pg-font);
    transition: color 0.3s ease;
    box-sizing: border-box;
    color: var(--muted);
    text-decoration: none;
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.category-tabs-container .category-tabs:has(.category-tabs-slider) .tab:hover {
    color: var(--fg);
}

.category-tabs-container .category-tabs:has(.category-tabs-slider) .tab.active {
    color: white;
    background: transparent;
    border: none;
    padding: 0.6rem 1.25rem;
    box-shadow: none;
    transform: none;
}

.category-tabs-container .category-tabs:has(.category-tabs-slider) .tab.active::before {
    display: none;
}

.tab-logout {
    color: white !important;
    background: var(--danger) !important;
    border-color: var(--danger) !important;
}

.tab-logout:hover {
    background: #DC2626 !important;
    border-color: #DC2626 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

.tab-logout::before {
    display: none !important;
}

.tab-shop {
    background: transparent !important;
    color: var(--fg);
    border: none !important;
    position: relative;
    overflow: visible;
    isolation: isolate;
}

.tab-shop::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius);
    background: var(--gradient-primary);
    z-index: -2;
}

.tab-shop::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--card);
    border-radius: calc(var(--radius) - 2px);
    z-index: -1;
    transition: opacity 0.3s ease, background 0.3s ease;
}

.tab-shop:hover::after,
.tab-shop.active::after {
    opacity: 0;
    background: transparent;
}

.tab-shop:hover,
.tab-shop.active {
    color: white !important;
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.4), 0 0 0 2px rgba(139, 92, 246, 0.2);
    opacity: 1;
}

.tab-shop:hover{
    transform: translateY(-2px);
}

.tab-shop {
    background: var(--gradient-primary) !important;
    color: white !important;
    border: none !important;
    padding: calc(0.6rem + 1px) calc(1.25rem + 1px) !important;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4) !important;
}

.tab-shop::before {
    display: none !important;
}

.tab {
    padding: 0.6rem 1.25rem;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    font-family: var(--pg-font);
    transition: all 0.3s ease;
    box-sizing: border-box;
    color: var(--muted);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.1), transparent);
    transition: left 0.5s ease;
}

.tab:hover::before {
    left: 100%;
}

.tab:hover {
    color: var(--fg);
    border-color: var(--gradient-violet);
    background: var(--bg);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.tab.active {
    background: var(--gradient-violet);
    color: white;
    border: none;
    padding: calc(0.6rem + 1px) calc(1.25rem + 1px);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

.tab.active:not(.tab-shop) {
    background: var(--gradient-violet);
}

.tab.active::before {
    display: none;
}

/* Search */
.search-container {
    max-width: 1200px;
    margin: 2rem auto;
    margin-bottom: 1.4rem;
    padding: 0 1rem;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--fg);
    font-size: 1rem;
    font-family: var(--pg-font);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-input::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

.search-input:focus {
    outline: none;
    border-color: var(--gradient-violet);
    background: var(--bg);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3), 0 0 0 4px rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.search-icon {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
    transition: all 0.3s ease;
    color: var(--muted);
}

.search-container:focus-within .search-icon {
    opacity: 1;
    color: var(--gradient-violet);
    transform: translateY(calc(-50% - 2px));
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 6rem; /* Space for cart FAB */
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-card {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3), 0 0 0 4px rgba(139, 92, 246, 0.1);
    border-color: var(--gradient-violet);
    background: var(--bg);
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    object-fit: cover;
    border: 2px solid var(--border);
}

.product-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(139, 92, 246, 0.14);
    color: #B9A5F8;
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.stock-badge {
    display: inline-block;
    margin: 0 0 0.75rem 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    vertical-align: middle;
}
.stock-badge--low {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}
.stock-badge--out {
    background: rgba(239, 68, 68, 0.16);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.product-card--oos {
    opacity: 0.72;
}
.variant-option.is-oos,
.variant-option:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.saved-recipes {
    margin: 1.25rem 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.saved-recipes-list {
    display: grid;
    gap: 0.75rem;
}
.saved-recipe-card {
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
}
.saved-recipe-card__title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.saved-recipe-card__meta {
    font-size: 0.85rem;
    margin-bottom: 0.65rem;
}
.saved-recipe-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--fg);
}

.product-description {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1;
    line-height: 1.5;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.product-footer .btn {
    font-size: 1rem;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    font-family: var(--pg-font);
    flex-wrap: wrap;
}

.product-price-label {
    font-size: 0.75rem;
    font-weight: normal;
    color: var(--muted);
}

.product-price-amount {
    font-size: 1.25rem;
    font-weight: bold;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

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

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.4), 0 0 0 2px rgba(139, 92, 246, 0.2);
    background: var(--gradient-accent);
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--card);
    color: var(--fg);
    border: 2px solid var(--border);
}

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

.btn-danger {
    background: var(--danger);
    color: white;
    border: 2px solid var(--danger);
}

.btn-danger:hover {
    background: #DC2626;
    border-color: #DC2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Cart FAB */
.cart-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s;
}

.cart-fab:hover {
    transform: scale(1.05);
}

.cart-fab:focus {
    outline: 2px solid var(--gradient-cyan);
    outline-offset: 2px;
}

.cart-badge {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    height: 100dvh;
    height: var(--pg-viewport-height, 100dvh);
    max-height: var(--pg-viewport-height, 100dvh);
    background: var(--card);
    border-left: 1px solid var(--border);
    z-index: 2000;
    transition: right 0.4s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.cart-drawer.open {
    right: 0;
}

.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    height: var(--pg-viewport-height, 100dvh);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.cart-drawer-overlay.active {
    opacity: 1;
    pointer-events: all;
}

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

.cart-header h2 {
    font-size: 1.25rem;
}

.cart-close {
    background: transparent;
    border: none;
    color: var(--fg);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
}

.cart-close:hover {
    background: var(--border);
}

.cart-close:focus {
    outline: 2px solid var(--gradient-cyan);
    outline-offset: 2px;
}

.cart-items {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.cart-item-name {
    font-weight: bold;
    font-size: 0.95rem;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 24px;
    height: 24px;
}

.cart-item-details {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.cart-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    background: var(--card);
    border: 2px solid var(--border);
    color: var(--fg);
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.qty-btn:hover {
    background: var(--border);
}

.qty-btn:focus {
    outline: 2px solid var(--gradient-cyan);
    outline-offset: 2px;
}

.cart-item-price {
    font-weight: bold;
    color: var(--gradient-orange);
}

.cart-footer {
    padding: 0;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    flex: 0 0 auto;
    flex-shrink: 0;
    max-height: 55vh;
    max-height: min(56dvh, 460px);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.cart-footer-inner {
    padding: 1rem 1.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-height: 0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.checkout-form {
    display: none;
}

.checkout-form.active {
    display: block;
}

.checkout-logistics-hint {
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.checkout-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.checkout-section-title {
    font-size: 0.95rem;
    margin: 0 0 0.75rem;
    color: var(--fg);
}

.delivery-method-cards,
.checkout-quotes {
    display: grid;
    gap: 0.65rem;
}

.delivery-method-card,
.delivery-quote-card {
    display: block;
    cursor: pointer;
}

.delivery-method-card input,
.delivery-quote-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.delivery-method-card__body,
.delivery-quote-card__body {
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.delivery-method-card input:checked + .delivery-method-card__body,
.delivery-quote-card input:checked + .delivery-quote-card__body,
.delivery-quote-card.is-selected .delivery-quote-card__body {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.25);
}

.delivery-quote-card__fee {
    font-weight: 700;
    color: var(--gradient-orange);
}

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

.checkout-total-row--grand {
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.checkout-prep-estimate {
    margin: 0.75rem 0;
    font-size: 0.85rem;
}

.checkout-location-panel {
    display: grid;
    gap: 0.7rem;
    margin: 0.2rem 0 1rem;
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--pg-radius-md, 12px);
    background: rgba(255, 255, 255, 0.025);
}

.checkout-location-panel__copy {
    display: grid;
    gap: 0.25rem;
    font-size: 0.84rem;
    line-height: 1.45;
}

.checkout-location-panel__copy strong {
    color: var(--fg);
    font-size: 0.9rem;
}

.checkout-location-status {
    min-height: 1.25rem;
    font-size: 0.78rem;
    line-height: 1.4;
}

.checkout-location-status.is-success { color: var(--pg-success, #38d996); }
.checkout-location-status.is-warning { color: var(--pg-warning, #f4b860); }
.checkout-location-status.is-loading { color: var(--pg-info, #67d8ef); }
.checkout-location-privacy {
    margin: 0.55rem 0 0;
    font-size: 0.72rem;
    line-height: 1.45;
}

.saved-addresses {
    margin: 0.9rem 0 1rem;
    padding: 0.9rem;
    border: 1px solid var(--pg-border, rgba(255,255,255,.12));
    border-radius: var(--pg-radius-md, 14px);
    background: color-mix(in srgb, var(--pg-primary, #39d7e8) 4%, var(--pg-surface-2, #171622));
}

.saved-addresses__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.saved-addresses__header > div {
    display: grid;
    gap: 0.18rem;
}

.saved-addresses__header .muted { font-size: 0.76rem; }
.saved-address-list { display: grid; gap: 0.6rem; }

.saved-address-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid var(--pg-border, rgba(255,255,255,.12));
    border-radius: 12px;
    background: rgba(255,255,255,.025);
    transition: border-color var(--pg-transition, .18s ease), background var(--pg-transition, .18s ease);
}

.saved-address-card:hover,
.saved-address-card.is-selected {
    border-color: color-mix(in srgb, var(--pg-primary, #39d7e8) 65%, transparent);
    background: color-mix(in srgb, var(--pg-primary, #39d7e8) 7%, transparent);
}

.saved-address-card__use {
    display: grid;
    gap: 0.28rem;
    min-width: 0;
    padding: 0.78rem 0.85rem;
    border: 0;
    color: var(--pg-text, #f6f5fb);
    text-align: left;
    background: transparent;
    cursor: pointer;
}

.saved-address-card__use > span:not(.saved-address-card__top) {
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.4;
    text-overflow: ellipsis;
}

.saved-address-card__top {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.saved-address-card__delete {
    display: grid;
    place-items: center;
    width: 42px;
    border: 0;
    border-left: 1px solid var(--pg-border, rgba(255,255,255,.12));
    color: var(--pg-text-muted, #aaa7b7);
    background: transparent;
    cursor: pointer;
}

.saved-address-card__delete:hover {
    color: var(--pg-danger, #ff6f86);
    background: color-mix(in srgb, var(--pg-danger, #ff6f86) 8%, transparent);
}

.saved-address-card__delete .material-symbols-rounded { font-size: 1.15rem; }

.save-address-panel {
    display: grid;
    gap: 0.8rem;
    margin: 0.2rem 0 1rem;
    padding: 0.9rem;
    border: 1px solid var(--pg-border, rgba(255,255,255,.12));
    border-radius: var(--pg-radius-md, 14px);
    background: rgba(255,255,255,.02);
}

.save-address-toggle,
.save-address-default {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    cursor: pointer;
}

.save-address-toggle input,
.save-address-default input {
    width: 1rem;
    height: 1rem;
    margin-top: 0.15rem;
    accent-color: var(--pg-primary, #39d7e8);
}

.save-address-toggle span { display: grid; gap: 0.15rem; }
.save-address-toggle small,
.save-address-default {
    color: var(--pg-text-muted, #aaa7b7);
    font-size: 0.76rem;
    line-height: 1.4;
}

.save-address-options {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: end;
}

.save-address-options[hidden] { display: none; }
.save-address-options .form-group { margin-bottom: 0; }

/* Dedicated checkout ----------------------------------------------------- */
.checkout-page-shell {
    padding-top: 2rem;
    padding-bottom: 5rem;
}

.checkout-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    color: var(--pg-text-muted);
    text-decoration: none;
    font-size: 0.86rem;
}

.checkout-back-link:hover { color: var(--pg-text); }
.checkout-back-link .material-symbols-rounded { font-size: 1.1rem; }

.checkout-page-heading {
    max-width: 720px;
    margin-bottom: 1.75rem;
}

.checkout-page-heading h1 {
    margin: 0.25rem 0 0.55rem;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.02;
}

.checkout-page-heading p {
    color: var(--pg-text-muted);
    line-height: 1.6;
}

.checkout-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
    gap: 1.35rem;
    align-items: start;
}

.checkout-main-card,
.checkout-summary-card {
    padding: clamp(1.1rem, 3vw, 1.65rem);
}

.checkout-main-card .checkout-section:last-of-type { border-bottom: 0; }
.checkout-main-card .checkout-totals { display: none !important; }
.checkout-main-card .checkout-btn { width: 100%; min-height: 52px; }

.checkout-summary-card {
    position: sticky;
    top: 1rem;
}

.checkout-summary-card__header,
.checkout-summary-item__footer,
.checkout-summary-totals > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.checkout-summary-item__locked-qty {
    color: var(--pg-text-muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.checkout-summary-card__header {
    margin-bottom: 1rem;
}

.checkout-summary-card__header h2 { font-size: 1.05rem; }

.btn-ghost {
    border: 1px solid transparent;
    background: transparent;
    color: var(--pg-text-muted);
}

.btn-ghost:hover {
    color: var(--pg-text);
    background: rgba(255,255,255,0.05);
    border-color: var(--pg-border);
}

.checkout-summary-items {
    display: grid;
    gap: 0.7rem;
    max-height: 54vh;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.checkout-summary-item {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1px solid var(--pg-border);
    border-radius: var(--pg-radius-md);
    background: var(--pg-surface-2);
}

.checkout-summary-item__main {
    display: grid;
    gap: 0.3rem;
}

.checkout-summary-item__main strong { font-size: 0.9rem; }
.checkout-summary-item__main span { color: var(--pg-text-muted); font-size: 0.74rem; line-height: 1.45; }

.checkout-summary-totals {
    display: grid;
    gap: 0.6rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--pg-border);
    font-size: 0.86rem;
}

.checkout-summary-totals span { color: var(--pg-text-muted); }
.checkout-summary-total { margin-top: 0.25rem; padding-top: 0.8rem; border-top: 1px solid var(--pg-border); }
.checkout-summary-total strong { font-size: 1.25rem; color: var(--pg-primary); }

.checkout-summary-reassurance {
    display: flex;
    gap: 0.45rem;
    align-items: flex-start;
    margin-top: 1rem;
    color: var(--pg-text-soft);
    font-size: 0.72rem;
    line-height: 1.4;
}

.checkout-summary-reassurance .material-symbols-rounded { color: var(--pg-success); font-size: 1rem; }

.checkout-empty-state {
    max-width: 580px;
    margin: 2rem auto;
    padding: 3rem 1.5rem;
    text-align: center;
}

.checkout-empty-state > .material-symbols-rounded { font-size: 3rem; color: var(--pg-text-soft); }
.checkout-empty-state h2 { margin: 0.8rem 0 0.35rem; }
.checkout-empty-state p { margin-bottom: 1.25rem; color: var(--pg-text-muted); }
.cart-checkout-note { margin: -0.25rem 0 0.85rem; font-size: 0.78rem; line-height: 1.45; }

.checkout-location-actions { display: grid; grid-template-columns: 1fr 1fr; }

.payment-method-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.payment-method-card { cursor: pointer; }
.payment-method-card input { position: absolute; opacity: 0; pointer-events: none; }
.payment-method-card > span {
    display: grid;
    gap: 0.3rem;
    min-height: 92px;
    padding: 0.85rem;
    border: 1px solid var(--pg-border);
    border-radius: var(--pg-radius-md);
    background: var(--pg-surface-2);
    transition: border-color var(--pg-transition), box-shadow var(--pg-transition), transform var(--pg-transition);
}
.payment-method-card small { color: var(--pg-text-muted); font-size: 0.7rem; line-height: 1.4; }
.payment-method-card input:checked + span {
    border-color: var(--pg-primary);
    box-shadow: var(--pg-shadow-glow-cyan);
    transform: translateY(-1px);
}

/* Didi-style delivery location picker */
.location-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    place-items: center;
    padding: 1rem;
    background: rgba(4, 4, 10, 0.82);
    backdrop-filter: blur(12px);
}

.location-picker-overlay.is-open { display: grid; animation: pg-fade-in 0.18s ease-out; }
.modal-open { overflow: hidden; }

.location-picker {
    display: grid;
    grid-template-rows: auto auto minmax(280px, 1fr) auto;
    width: min(920px, 100%);
    height: min(780px, calc(100vh - 2rem));
    overflow: hidden;
    border: 1px solid var(--pg-border-strong);
    border-radius: var(--pg-radius-xl);
    background: var(--pg-surface);
    box-shadow: var(--pg-shadow-lg), var(--pg-shadow-glow);
}

.location-picker__header,
.location-picker__search,
.location-picker__footer { padding: 1rem 1.15rem; }

.location-picker__header,
.location-picker__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.location-picker__header { border-bottom: 1px solid var(--pg-border); }
.location-picker__header h2 { margin-top: 0.15rem; font-size: 1.2rem; }
.location-picker__search { border-bottom: 1px solid var(--pg-border); }

.location-search-row { display: grid; grid-template-columns: 1fr auto; gap: 0.65rem; }
.location-search-row .form-input { margin: 0; }
.location-search-results { display: grid; gap: 0.35rem; max-height: 165px; overflow-y: auto; }
.location-search-results:not(:empty) { margin-top: 0.65rem; }

.location-search-result {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.55rem;
    width: 100%;
    padding: 0.65rem;
    border: 1px solid transparent;
    border-radius: var(--pg-radius-sm);
    background: var(--pg-surface-2);
    color: var(--pg-text);
    text-align: left;
    cursor: pointer;
}
.location-search-result:hover,
.location-search-result.is-selected { border-color: var(--pg-primary); background: rgba(34, 211, 238, 0.08); }
.location-search-result > span:last-child { display: grid; gap: 0.16rem; }
.location-search-result small { color: var(--pg-text-muted); line-height: 1.35; }
.location-search-result .material-symbols-rounded { color: var(--pg-primary); }
.location-search-message { color: var(--pg-text-muted); font-size: 0.78rem; }
.location-search-message.is-error { color: var(--pg-danger); }

.location-picker__map-wrap { position: relative; min-height: 280px; background: #11131a; }
.location-picker__map { width: 100%; height: 100%; min-height: 280px; }
.location-picker__map-hint {
    position: absolute;
    z-index: 500;
    left: 50%;
    bottom: 0.75rem;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 2rem);
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    background: rgba(10,10,18,0.88);
    color: #fff;
    font-size: 0.72rem;
    text-align: center;
    pointer-events: none;
}
.location-picker__footer { border-top: 1px solid var(--pg-border); }
.location-picker__footer .muted { font-size: 0.76rem; }
.leaflet-container { font-family: var(--pg-font); }

@keyframes pg-fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 820px) {
    .checkout-page-grid { grid-template-columns: 1fr; }
    .checkout-summary-card { position: static; order: -1; }
    .checkout-summary-items { max-height: 320px; }
    .payment-method-cards { grid-template-columns: 1fr; }
    .payment-method-card > span { min-height: auto; }
}

@media (max-width: 600px) {
    .checkout-page-shell { padding-top: 1.25rem; padding-bottom: 2rem; }
    .checkout-main-card, .checkout-summary-card { padding: 1rem; }
    .checkout-location-actions { grid-template-columns: 1fr; }
    .location-picker-overlay { padding: 0; }
    .location-picker {
        width: 100%;
        height: 100dvh;
        border: 0;
        border-radius: 0;
        grid-template-rows: auto auto minmax(260px, 1fr) auto;
    }
    .location-picker__header, .location-picker__search, .location-picker__footer { padding: 0.85rem; }
    .location-picker__footer { align-items: stretch; flex-direction: column; }
    .location-picker__footer .pg-btn-group { display: grid; grid-template-columns: 1fr 1fr; }
}

.btn-block {
    width: 100%;
}

.checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--fg);
}

.form-label .required {
    color: var(--danger);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--fg);
    font-size: 0.95rem;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--gradient-cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 1rem;
}

/* Product Detail Page */
.product-detail {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 1rem;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.product-detail-image-container {
    display: flex;
    flex-direction: column;
}

/* Gradient Border Button */
.btn-gradient-border {
    background: transparent !important;
    color: var(--fg);
    border: none !important;
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
    isolation: isolate;
}

.btn-gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius);
    background: var(--gradient-primary);
    z-index: -2;
}

.btn-gradient-border::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--card);
    border-radius: calc(var(--radius) - 2px);
    z-index: -1;
    transition: opacity 0.3s ease, background 0.3s ease;
}

.btn-gradient-border:hover::after {
    opacity: 0;
    background: transparent;
}

.btn-gradient-border:hover {
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.4), 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.back-to-shop-btn {
    width: 100%;
    margin-bottom: 1rem;
    text-align: center;
}

.product-detail-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    object-fit: cover;
}

.product-detail-image-stack {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.product-detail-image-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: var(--radius-lg);
}

.product-detail-image-layer.active {
    opacity: 1;
}

.product-detail-info {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.product-detail-info .product-badge{
    margin-bottom: 1.5rem;
}

.product-detail-info p {
    color: var(--muted);
}

.variant-selector {
    margin: 1.5rem 0;
}

.variant-group {
    margin-bottom: 1rem;
}

.variant-group-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.variant-option {
    padding: 0.5rem 1rem;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--fg);
    box-sizing: border-box;
    font-family: var(--pg-font);
}

.variant-option:hover {
    border-color: var(--gradient-violet);
}

.variant-option.selected {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: calc(0.5rem + 2px) calc(1rem + 2px);
}

.ranked-color-helper {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.ranked-color-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.ranked-color-summary-chip {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.ranked-color-summary-chip.filled {
    color: white;
    border-color: transparent;
}

.ranked-color-summary-chip.summary-rank-1 {
    background: var(--gradient-primary);
}

.ranked-color-summary-chip.summary-rank-2 {
    background: var(--gradient-accent);
}

.ranked-color-summary-chip.summary-rank-3 {
    background: var(--gradient-brand);
}

.ranked-color-summary-label {
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.02em;
    opacity: 0.9;
}

.ranked-color-summary-value {
    font-size: 0.95rem;
}

.ranked-color-options {
    margin-top: 0.5rem;
}

.ranked-color-option {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    width: fit-content;
    text-align: left;
}

.ranked-color-option.selected {
    color: white;
}

.ranked-color-option.selected-rank-1 {
    background: var(--gradient-primary);
}

.ranked-color-option.selected-rank-2 {
    background: var(--gradient-accent);
}

.ranked-color-option.selected-rank-3 {
    background: var(--gradient-brand);
}

.ranked-color-option-name {
    font-weight: bold;
}

.ranked-color-option-number {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: bold;
    line-height: 1;
}

.ranked-color-option-number.inactive {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--muted);
    opacity: 0.55;
}

.ranked-color-option-number.active {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.ranked-color-option-number.active.rank-1 {
    background: rgba(34, 211, 238, 0.35);
}

.ranked-color-option-number.active.rank-2 {
    background: rgba(59, 130, 246, 0.35);
}

.ranked-color-option-number.active.rank-3 {
    background: rgba(236, 72, 153, 0.35);
}

.ranked-color-option.selected-rank-1 .ranked-color-option-number.active.rank-1,
.ranked-color-option.selected-rank-2 .ranked-color-option-number.active.rank-2,
.ranked-color-option.selected-rank-3 .ranked-color-option-number.active.rank-3 {
    background: rgba(255, 255, 255, 0.2);
}

.ranked-color-preview-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.ranked-color-preview-card {
    appearance: none;
    text-align: left;
    width: 100%;
    padding: 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--fg);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ranked-color-preview-card:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: var(--gradient-violet);
}

.ranked-color-preview-card:disabled {
    cursor: default;
    opacity: 0.8;
}

.ranked-color-preview-card.filled {
    border-color: transparent;
}

.ranked-color-preview-card.active {
    transform: translateY(-1px);
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.12),
        0 10px 24px rgba(0, 0, 0, 0.22);
}

.ranked-color-preview-card.preview-rank-1 {
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.45);
}

.ranked-color-preview-card.preview-rank-2 {
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.45);
}

.ranked-color-preview-card.preview-rank-3 {
    box-shadow: inset 0 0 0 1px rgba(236, 72, 153, 0.45);
}

.ranked-color-preview-rank {
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.4rem;
    font-weight: bold;
}

.ranked-color-preview-image,
.ranked-color-preview-empty {
    width: 100%;
    height: 5.5rem;
    border-radius: calc(var(--radius) - 2px);
    background: var(--card);
}

.ranked-color-preview-image {
    object-fit: contain;
    padding: 0.3rem;
}

.ranked-color-preview-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.8rem;
    text-align: center;
    border: 1px dashed var(--border);
}

.ranked-color-preview-name {
    margin-top: 0.4rem;
    font-size: 0.82rem;
    line-height: 1.2;
}

@media (max-width: 640px) {
    .ranked-color-summary {
        grid-template-columns: 1fr;
    }

    .ranked-color-preview-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.35rem;
    }

    .ranked-color-preview-card {
        padding: 0.35rem;
    }

    .ranked-color-preview-image,
    .ranked-color-preview-empty {
        height: 3.75rem;
    }

    .ranked-color-preview-rank {
        margin-bottom: 0.25rem;
        font-size: 0.66rem;
    }

    .ranked-color-preview-name {
        margin-top: 0.3rem;
        font-size: 0.72rem;
    }
}

.flavor-multi-select .variant-option {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
}

.flavor-multi-select .variant-option.selected {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: calc(0.5rem + 1px) calc(0.75rem + 1px);
}

.savings-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.variant-option.selected .savings-text {
    color: rgba(255, 255, 255, 0.9);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.9);
    background: transparent;
}

/* Orders Page */
.orders-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.orders-header {
    margin-bottom: 3rem;
    text-align: center;
}

.orders-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--pg-font);
}

.orders-subtitle {
    color: var(--muted);
    font-size: 1rem;
    font-family: var(--pg-font);
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.order-card {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.3s ease;
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
    border-color: var(--gradient-violet);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 2rem;
}

.order-info {
    flex: 1;
}

.order-number {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--fg);
    font-family: var(--pg-font);
}

.order-date {
    color: var(--muted);
    font-size: 0.9rem;
    font-family: var(--pg-font);
}

.order-summary {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.order-price {
    font-size: 1.75rem;
    font-weight: bold;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--pg-font);
}

.order-status-badge {
    display: flex;
    justify-content: flex-end;
}

.status-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: capitalize;
    font-family: var(--pg-font);
    letter-spacing: 0.5px;
}

.status-submitted,
.status-awaiting_payment {
    background: rgba(249, 115, 22, 0.15);
    color: #F97316;
    border: 2px solid rgba(249, 115, 22, 0.3);
}

.status-paid,
.status-mixing,
.status-ordered_from_supplier,
.status-arrived_here {
    background: rgba(34, 211, 238, 0.15);
    color: #22D3EE;
    border: 2px solid rgba(34, 211, 238, 0.3);
}

.status-shipped,
.status-ready {
    background: rgba(139, 92, 246, 0.15);
    color: #A78BFA;
    border: 2px solid rgba(139, 92, 246, 0.3);
}

.status-delivered {
    background: rgba(34, 197, 94, 0.15);
    color: #22C55E;
    border: 2px solid rgba(34, 197, 94, 0.3);
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    border: 2px solid rgba(239, 68, 68, 0.3);
}

.status-expired {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    border: 2px solid rgba(148, 163, 184, 0.25);
}

.order-card-footer {
    display: flex;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.btn-cancel-order {
    margin-left: auto;
}

.orders-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.orders-empty p {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 0;
}

/* Track Order Page */
.track-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.track-header {
    margin-bottom: 3rem;
    text-align: center;
}

.track-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--pg-font);
}

.track-eta {
    color: var(--muted);
    font-size: 1rem;
    font-family: var(--pg-font);
}

.track-eta strong {
    color: var(--fg);
    font-weight: bold;
}

.track-card {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.track-card:hover {
    border-color: var(--gradient-violet);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.1);
}

.track-card-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: var(--fg);
    font-family: var(--pg-font);
}

.track-card-subtitle {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--fg);
    font-family: var(--pg-font);
}

.track-info-text {
    color: var(--muted);
    font-family: var(--pg-font);
    line-height: 1.8;
}

.track-info-text strong {
    color: var(--fg);
}

.track-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.track-item {
    padding: 1.25rem;
    background: var(--bg);
    border-radius: var(--radius);
    border: 2px solid var(--border);
    transition: all 0.2s ease;
}

.track-item:hover {
    border-color: var(--gradient-violet);
    transform: translateY(-2px);
}

.track-item-name {
    font-weight: bold;
    color: var(--fg);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-family: var(--pg-font);
}

.track-item-details {
    color: var(--muted);
    font-size: 0.9rem;
    font-family: var(--pg-font);
}

.track-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border);
}

.track-total-label {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--fg);
    font-family: var(--pg-font);
}

.track-total-amount {
    font-size: 1.75rem;
    font-weight: bold;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--pg-font);
}

.track-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Modern Status Timeline - Redesigned */
.track-card .status-timeline-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.track-card .status-timeline-item {
    position: relative;
    padding: 0;
    margin: 0;
    transition: all 0.3s ease;
}

/* Vertical line connector */
.track-card .status-timeline-list::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
    z-index: 0;
}

.track-card .status-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

/* Status step indicator */
.status-timeline-step {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    background: var(--card);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--muted);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Status content card */
.status-timeline-content {
    flex: 1;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
    min-width: 0;
}

/* Completed status */
.track-card .status-timeline-item.completed .status-timeline-step {
    background: var(--ok);
    border-color: var(--ok);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.track-card .status-timeline-item.completed .status-timeline-step::after {
    content: 'check';
    font-family: 'Material Symbols Rounded';
    font-size: 24px;
    font-weight: 400;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

.track-card .status-timeline-item.completed .status-timeline-content {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.05);
}

.track-card .status-timeline-item.completed .status-label {
    color: var(--fg);
    font-weight: 600;
}

/* Active/Pending status */
.track-card .status-timeline-item.active .status-timeline-step {
    background: var(--gradient-cyan);
    border-color: var(--gradient-cyan);
    color: white;
    box-shadow: 0 4px 16px rgba(34, 211, 238, 0.4);
    animation: statusGlow 2s ease-in-out infinite;
    transform: scale(1.05);
}

.track-card .status-timeline-item.active .status-timeline-step::after {
    content: '●';
    font-size: 12px;
}

.track-card .status-timeline-item.active .status-timeline-content {
    border-color: var(--gradient-cyan);
    background: rgba(34, 211, 238, 0.08);
    box-shadow: 0 2px 8px rgba(34, 211, 238, 0.15);
}

.track-card .status-timeline-item.active .status-label {
    color: var(--gradient-cyan);
    font-weight: 700;
    font-size: 1.1rem;
}

.track-card .status-timeline-item.active .status-date {
    color: var(--gradient-cyan);
    opacity: 1;
    font-weight: 500;
}

/* Pending status */
.track-card .status-timeline-item:not(.completed):not(.active) .status-timeline-step {
    background: var(--card);
    border-color: var(--border);
    color: var(--muted);
}

.track-card .status-timeline-item:not(.completed):not(.active) .status-timeline-content {
    opacity: 0.6;
    border-color: var(--border);
}

.track-card .status-timeline-item:not(.completed):not(.active) .status-label {
    color: var(--muted);
}

/* Cancelled status */
.track-card .status-timeline-item.cancelled .status-timeline-step {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.track-card .status-timeline-item.cancelled .status-timeline-step::after {
    content: '×';
    font-size: 24px;
    line-height: 1;
}

.track-card .status-timeline-item.cancelled .status-timeline-content {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.track-card .status-timeline-item.cancelled .status-label {
    color: var(--danger);
    font-weight: 600;
}


/* Color the vertical line up to completed items */
.track-card .status-timeline-list::before {
    background: linear-gradient(
        to bottom,
        var(--ok) 0%,
        var(--ok) var(--progress-percent, 0%),
        var(--border) var(--progress-percent, 0%)
    );
}

/* Status label and date */
.track-card .status-label {
    font-weight: 600;
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 0.25rem;
    font-family: var(--pg-font);
    transition: all 0.3s ease;
}

.track-card .status-date {
    color: var(--muted);
    font-size: 0.85rem;
    font-family: var(--pg-font);
    opacity: 0.7;
    transition: all 0.3s ease;
    margin-top: 0.25rem;
}

@keyframes statusGlow {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(34, 211, 238, 0.4);
        transform: scale(1.05);
    }
    50% {
        box-shadow: 0 6px 20px rgba(34, 211, 238, 0.5);
        transform: scale(1.08);
    }
}

/* Status Page (legacy) */
.status-timeline {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
}

.status-card {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.status-timeline-list {
    list-style: none;
    position: relative;
    padding-left: 2rem;
}

.status-timeline-list::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.status-timeline-item {
    position: relative;
    padding-bottom: 2rem;
}


.status-label {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.status-date {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 2rem 1rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 4rem;
}

/* Success Page */
.success-page {
    max-width: 600px;
    margin: 4rem auto;
    padding: 2rem;
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.success-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.success-message {
    color: var(--muted);
    margin-bottom: 2rem;
}

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.12);
    border: 2px solid rgba(34, 197, 94, 0.4);
    color: var(--pg-success);
    font-size: 2.5rem;
}

.success-card h2,
.success-card h3 {
    margin-bottom: 0.75rem;
}

.success-card__note {
    color: var(--pg-text-muted);
    font-size: 0.9rem;
}

.success-actions {
    justify-content: center;
}

.success-qr-placeholder {
    min-height: 200px;
    background: var(--pg-bg);
    border-radius: var(--pg-radius-md);
    margin-top: 1rem;
    border: 1px dashed var(--pg-border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-qr-placeholder p {
    padding: 2rem;
    text-align: center;
    color: var(--pg-text-muted);
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--muted);
}

.hidden {
    display: none;
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    text-align: center;
    padding: 3rem 2rem;
    color: var(--muted);
    grid-column: 1 / -1;
}

.loading::before {
    content: '';
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid var(--pg-border-strong);
    border-top-color: var(--pg-primary);
    animation: pgSpin 0.8s linear infinite;
}

@keyframes pgSpin {
    to { transform: rotate(360deg); }
}

/* Toast notifications — stacking container keeps them clear
   of the cart FAB / checkout actions on mobile */
.pg-toast-stack {
    position: fixed;
    top: 5.5rem;
    right: 1rem;
    left: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    z-index: 5000;
    pointer-events: none;
}

@media (min-width: 640px) {
    .pg-toast-stack {
        left: auto;
        top: auto;
        bottom: 6.5rem;
        right: 1.5rem;
        max-width: 340px;
    }
}

.toast,
.pg-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: var(--pg-surface-2);
    border: 1px solid var(--pg-border-strong);
    border-radius: var(--radius);
    padding: 0.8rem 1.1rem;
    box-shadow: var(--pg-shadow-md);
    max-width: 340px;
    font-size: 0.92rem;
    line-height: 1.45;
    animation: pgToastIn 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

/* Fallback when a toast is appended straight to <body> */
body > .toast {
    position: fixed;
    bottom: 6rem;
    right: 1.5rem;
    z-index: 5000;
}

.toast.is-leaving,
.pg-toast.is-leaving {
    animation: pgToastOut 0.25s ease forwards;
}

.pg-toast__icon {
    font-size: 1.15rem;
    line-height: 1.3;
    flex-shrink: 0;
}

.toast.error {
    border-left: 4px solid var(--pg-danger);
}

.toast.error .pg-toast__icon { color: var(--pg-danger); }

.toast.success {
    border-left: 4px solid var(--pg-success);
}

.toast.success .pg-toast__icon { color: var(--pg-success); }

.toast.warning {
    border-left: 4px solid var(--pg-warning);
}

.toast.warning .pg-toast__icon { color: var(--pg-warning); }

.toast.info {
    border-left: 4px solid var(--pg-info);
}

.toast.info .pg-toast__icon { color: var(--pg-info); }

@keyframes pgToastIn {
    from {
        transform: translateY(-8px) translateX(12px);
        opacity: 0;
    }
    to {
        transform: translateY(0) translateX(0);
        opacity: 1;
    }
}

@keyframes pgToastOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(6px);
        opacity: 0;
    }
}

/* Legacy keyframe kept — app.js reverse-plays it if present */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--fg);
    margin: 0;
    font-family: var(--pg-font);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
}

.modal-close:hover {
    background: var(--border);
    color: var(--fg);
}

.modal-close .material-symbols-rounded {
    font-size: 24px;
}

.modal-body {
    padding: 2rem;
    color: var(--fg);
    font-family: var(--pg-font);
    line-height: 1.6;
}

.modal-body p {
    margin: 0;
    color: var(--muted);
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem 2rem;
    border-top: 2px solid var(--border);
}

.modal-footer #modal-confirm {
    background: var(--ok) !important;
    border-color: var(--ok) !important;
    color: white !important;
    background-image: none !important;
}

.modal-footer #modal-confirm:hover {
    background: #16A34A !important;
    border-color: #16A34A !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3) !important;
    filter: none !important;
}

.modal-footer #modal-confirm:hover::before {
    display: none !important;
}

.modal-footer.danger #modal-confirm {
    background: var(--danger) !important;
    border-color: var(--danger) !important;
    color: white !important;
    background-image: none !important;
}

.modal-footer.danger #modal-confirm:hover {
    background: #DC2626 !important;
    border-color: #DC2626 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
    filter: none !important;
}

.modal-footer.danger #modal-confirm:hover::before {
    display: none !important;
}

/* Modal variants */
.modal-container.wide {
    max-width: 700px;
}

.modal-container.narrow {
    max-width: 400px;
}

.modal-prompt { display: grid; gap: .5rem; }
.modal-prompt .pg-label { margin: 0; }
.modal-prompt .pg-input[aria-invalid="true"] {
    border-color: var(--pg-danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}
.modal-body .modal-prompt__error {
    min-height: 1.25rem;
    margin: 0;
    color: #ff9ba5;
    font-size: .78rem;
    line-height: 1.35;
}

/* Compatible replacements / devices */
#compatible-accessories,
#compatible-devices {
    margin-top: 2.5rem;
}

.compatible-section {
    margin-top: 0.5rem;
}

.compatible-section__header {
    margin-bottom: 1.25rem;
}

.compatible-section__header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.4rem;
}

.compatible-section__header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.compatible-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .compatible-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

.compatible-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    min-height: 100%;
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.04);
}

.compatible-card__link {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.compatible-card__image-wrap {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--border);
}

.compatible-card__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.compatible-card__badge {
    display: inline-block;
    width: fit-content;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    color: var(--gradient-cyan);
}

.compatible-card__title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
}

.compatible-card__meta {
    color: var(--muted);
    font-size: 0.85rem;
}

.compatible-card__price {
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: auto;
}

.compatible-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.compatible-variant-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.compatible-variant-pill {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    cursor: pointer;
}

.compatible-variant-pill.is-selected {
    border-color: var(--gradient-cyan);
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.2);
    background: rgba(34, 211, 238, 0.1);
}

.compatible-variant-pill__tag {
    margin-left: 0.25rem;
    color: var(--gradient-orange);
    font-weight: 700;
    font-size: 0.7rem;
}

.accessory-variant-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

@media (min-width: 480px) {
    .accessory-variant-options {
        grid-template-columns: 1fr 1fr;
    }
}

.accessory-variant-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.28rem;
    text-align: left;
    min-height: 5.25rem;
    padding: 0.85rem 1rem;
    background: var(--pg-surface-2);
    border: 1px solid var(--pg-border-strong);
    border-radius: var(--pg-radius-lg);
    color: var(--pg-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.accessory-variant-option:hover:not(:disabled) {
    border-color: rgba(34, 211, 238, 0.7);
    background: var(--pg-surface-3);
    transform: translateY(-1px);
}

.accessory-variant-option.selected {
    padding: 0.85rem 1rem;
    color: var(--pg-text);
    border: 1px solid var(--pg-primary);
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(139, 92, 246, 0.18)),
        var(--pg-surface-2);
    box-shadow:
        0 0 0 3px rgba(34, 211, 238, 0.11),
        0 10px 24px rgba(0, 0, 0, 0.22);
}

.accessory-variant-option__label {
    font-weight: 700;
    color: var(--pg-text);
}

.accessory-variant-option__price {
    color: #67E8F9;
    font-size: 0.95rem;
    font-weight: 700;
}

.accessory-variant-option__badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #FDBA74;
    background: rgba(249, 115, 22, 0.13);
    border: 1px solid rgba(249, 115, 22, 0.24);
}

.accessory-variant-option__meta {
    font-size: 0.75rem;
    color: var(--pg-text-muted);
    line-height: 1.35;
}

.accessory-variant-option.selected .accessory-variant-option__price {
    color: #A5F3FC;
}

.accessory-variant-option.selected .accessory-variant-option__meta {
    color: rgba(237, 238, 243, 0.78);
}

/* Universal checkbox option */
.pg-check-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pg-check-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pg-check-option__box {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.35rem;
    border: 2px solid var(--border);
    background: var(--card);
    flex-shrink: 0;
    margin-top: 0.1rem;
    position: relative;
}

.pg-check-option__box::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 0.15rem;
    background: transparent;
}

.pg-check-option.is-checked,
.pg-check-option:has(input:checked) {
    border-color: var(--gradient-cyan);
    background: rgba(34, 211, 238, 0.08);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.pg-check-option.is-checked .pg-check-option__box,
.pg-check-option:has(input:checked) .pg-check-option__box {
    border-color: var(--gradient-cyan);
    background: rgba(34, 211, 238, 0.2);
}

.pg-check-option.is-checked .pg-check-option__box::after,
.pg-check-option:has(input:checked) .pg-check-option__box::after {
    background: var(--gradient-cyan);
}

.pg-check-option__content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.pg-check-option__label {
    font-weight: 700;
    color: var(--fg);
}

.pg-check-option__hint {
    color: var(--muted);
    font-size: 0.85rem;
}

.pg-check-option__badge {
    display: inline-block;
    width: fit-content;
    margin-top: 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gradient-orange);
    background: rgba(249, 115, 22, 0.15);
}

.compatible-accessories-section,
.compatible-devices-section {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.compatible-section-title {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
    color: var(--fg);
}

.compatible-accessories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .compatible-accessories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.compatible-accessory-card {
    height: 100%;
    overflow: hidden;
}

.compatible-accessory-card .compatible-accessory-image {
    aspect-ratio: 1;
}

.compatible-accessory-card .accessory-detail-label,
.compatible-accessory-card .accessory-spec-line {
    margin-bottom: 0.5rem;
}

.compatible-accessory-footer {
    margin-top: auto;
}

.compatible-accessory-card .product-footer {
    margin-top: auto;
}

.accessory-detail-label {
    color: var(--fg);
    font-size: 0.95rem;
}

.accessory-spec-line {
    color: var(--muted);
    font-size: 0.875rem;
}

.compatible-devices-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.compatible-device-link {
    display: inline-flex;
    align-items: center;
    padding: 0.875rem 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--fg);
    text-decoration: none;
    transition: border-color 0.2s ease;
}

.compatible-device-link:hover {
    border-color: var(--gradient-cyan);
}

.btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
}

/* Unified juice recipe builder */
.juice-builder {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.juice-recipe-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.juice-field {
    margin-bottom: 0.85rem;
}

.juice-field-label {
    font-weight: 600;
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
}

.juice-nic-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    color: var(--gradient-cyan);
    font-weight: 600;
    width: fit-content;
}

.juice-section-title {
    font-size: 1.25rem;
    margin: 0;
}

.juice-helper {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 0.35rem;
}

.juice-vial-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.juice-vial-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.juice-vial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.juice-recipe-actions,
.juice-vial-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.juice-add-vial-btn {
    width: 100%;
}

.juice-size-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.juice-size-card {
    text-align: left;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.875rem;
    color: var(--fg);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.juice-size-card.is-selected,
.juice-size-card.selected,
.juice-size-card.active,
.juice-size-card:hover {
    border-color: var(--gradient-cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.juice-size-ml {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
}

.juice-size-label {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.juice-discount-badge,
.juice-size-badge {
    display: inline-block;
    margin-top: 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gradient-cyan);
}

.juice-qty-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.juice-qty-input {
    width: 4.5rem;
    text-align: center;
}

.juice-flavor-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.juice-flavor-chip.selected,
.juice-flavor-chip.active {
    outline: 2px solid var(--gradient-cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}

.juice-cooling-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.juice-sour-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    color: var(--fg);
}

.juice-notes {
    margin-top: 0.25rem;
}

.juice-inline-error,
.juice-warning-note {
    margin: 0.65rem 0 0;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    line-height: 1.4;
}

.juice-inline-error {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.juice-warning-note {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.juice-deal-meter {
    margin-top: 0.5rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(160deg, rgba(34, 211, 238, 0.08), rgba(16, 185, 129, 0.08));
}

.juice-deal-meter-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.juice-deal-meter-inner {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.juice-deal-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.juice-deal-label {
    font-weight: 600;
    margin: 0.75rem 0 0.35rem;
}

.juice-deal-hint {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
}

.juice-deal-best {
    color: var(--gradient-orange);
}

.juice-price-note {
    display: block;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.cart-juice-deal-banner {
    margin: 0.75rem 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(34, 211, 238, 0.08);
    font-size: 0.9rem;
}

.juice-legacy-custom {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
}

.flavor-multi-select .variant-option.selected {
    outline: 2px solid var(--gradient-cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}

@media (max-width: 480px) {
    .juice-size-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   Puffgasm Design System — reusable component layer (pg-*)
   Presentational classes; JS hook classes above are unchanged.
   ============================================================ */

/* Page shell */
.pg-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.pg-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.pg-container--narrow {
    max-width: 560px;
}

.pg-section {
    margin: 2rem 0;
}

.pg-section-header {
    margin-bottom: 1.25rem;
}

.pg-section-header h1,
.pg-section-header h2 {
    margin: 0 0 0.35rem;
    font-weight: bold;
    line-height: 1.25;
}

.pg-section-header--gradient h1,
.pg-section-header--gradient h2 {
    background: var(--pg-gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    width: fit-content;
}

.pg-section-header p {
    margin: 0;
    color: var(--pg-text-muted);
    font-size: 0.95rem;
}

/* Cards */
.pg-card {
    background: var(--pg-surface);
    border: 1px solid var(--pg-border);
    border-radius: var(--pg-radius-lg);
    padding: 1.5rem;
}

.pg-card--interactive {
    cursor: pointer;
    transition: transform var(--pg-transition), border-color var(--pg-transition),
        box-shadow var(--pg-transition);
}

.pg-card--interactive:hover {
    transform: translateY(-2px);
    border-color: var(--pg-primary-2);
    box-shadow: var(--pg-shadow-glow);
}

.pg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

/* Buttons */
.pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    border: none;
    border-radius: var(--pg-radius-md);
    font-family: var(--pg-font);
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--pg-transition), box-shadow var(--pg-transition),
        background var(--pg-transition), color var(--pg-transition), filter var(--pg-transition);
}

.pg-btn--primary {
    background: var(--pg-gradient-brand);
    color: #fff;
}

.pg-btn--primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: var(--pg-shadow-glow);
}

.pg-btn--secondary {
    background: var(--pg-surface-2);
    color: var(--pg-text);
    border: 1px solid var(--pg-border-strong);
}

.pg-btn--secondary:hover {
    background: var(--pg-surface-3);
    border-color: var(--pg-primary-2);
}

.pg-btn--ghost {
    background: transparent;
    color: var(--pg-text-muted);
    border: 1px solid transparent;
}

.pg-btn--ghost:hover {
    color: var(--pg-text);
    background: var(--pg-surface-2);
}

.pg-btn--danger {
    background: var(--pg-danger);
    color: #fff;
}

.pg-btn--danger:hover {
    background: #DC2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.pg-btn--sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
}

.pg-btn--block {
    width: 100%;
}

.pg-btn:disabled,
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.pg-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Badges */
.pg-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: var(--pg-surface-3);
    color: var(--pg-text-muted);
    border: 1px solid var(--pg-border-strong);
}

.pg-badge--success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ADE80;
    border-color: rgba(34, 197, 94, 0.35);
}

.pg-badge--warning {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
    border-color: rgba(245, 158, 11, 0.35);
}

.pg-badge--danger {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
    border-color: rgba(239, 68, 68, 0.35);
}

.pg-badge--info {
    background: rgba(56, 189, 248, 0.15);
    color: #7DD3FC;
    border-color: rgba(56, 189, 248, 0.35);
}

.pg-badge--accent {
    background: rgba(236, 72, 153, 0.14);
    color: #F9A8D4;
    border-color: rgba(236, 72, 153, 0.35);
}

/* Status chips — shared vocabulary for customer + admin */
.pg-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: 0.02em;
    background: var(--pg-surface-3);
    color: var(--pg-text-muted);
    border: 1px solid var(--pg-border-strong);
    white-space: nowrap;
}

.pg-status-chip::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.pg-status-chip--submitted,
.pg-status-chip--pending-payment {
    background: rgba(245, 158, 11, 0.13);
    color: #FBBF24;
    border-color: rgba(245, 158, 11, 0.35);
}

.pg-status-chip--paid,
.pg-status-chip--preparing {
    background: rgba(34, 211, 238, 0.12);
    color: #67E8F9;
    border-color: rgba(34, 211, 238, 0.35);
}

.pg-status-chip--ready,
.pg-status-chip--out-for-delivery {
    background: rgba(139, 92, 246, 0.14);
    color: #C4B5FD;
    border-color: rgba(139, 92, 246, 0.35);
}

.pg-status-chip--delivered {
    background: rgba(34, 197, 94, 0.13);
    color: #4ADE80;
    border-color: rgba(34, 197, 94, 0.35);
}

.pg-status-chip--cancelled,
.pg-status-chip--expired,
.pg-status-chip--out-of-stock {
    background: rgba(239, 68, 68, 0.12);
    color: #F87171;
    border-color: rgba(239, 68, 68, 0.35);
}

.pg-status-chip--low-stock {
    background: rgba(245, 158, 11, 0.13);
    color: #FBBF24;
    border-color: rgba(245, 158, 11, 0.35);
}

/* Forms */
.pg-form-group {
    margin-bottom: 1rem;
}

.pg-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--pg-text);
    font-weight: 600;
}

.pg-input,
.pg-select,
.pg-textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--pg-bg);
    border: 2px solid var(--pg-border);
    border-radius: var(--pg-radius-md);
    color: var(--pg-text);
    font-size: 0.95rem;
    font-family: var(--pg-font);
    transition: border-color var(--pg-transition), box-shadow var(--pg-transition);
}

.pg-input:focus,
.pg-select:focus,
.pg-textarea:focus {
    outline: none;
    border-color: var(--pg-primary);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.pg-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Alerts (page-level messages) */
.pg-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem 1.1rem;
    border-radius: var(--pg-radius-md);
    margin-bottom: 1rem;
    font-size: 0.92rem;
    line-height: 1.5;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #BAE6FD;
}

.pg-alert--success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #BBF7D0;
}

.pg-alert--warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #FDE68A;
}

.pg-alert--danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
    color: #FECACA;
}

/* Quantity stepper */
.pg-qty {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.pg-qty__btn {
    background: var(--pg-surface-2);
    border: 1px solid var(--pg-border-strong);
    color: var(--pg-text);
    width: 38px;
    height: 38px;
    border-radius: var(--pg-radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: background var(--pg-transition), border-color var(--pg-transition);
}

.pg-qty__btn:hover {
    background: var(--pg-surface-3);
    border-color: var(--pg-primary-2);
}

/* Empty state */
.pg-empty-state {
    text-align: center;
    padding: 3.5rem 2rem;
    color: var(--pg-text-muted);
}

.pg-empty-state__icon {
    font-size: 3rem;
    margin-bottom: 0.85rem;
    opacity: 0.55;
    line-height: 1;
}

.pg-empty-state__title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--pg-text);
    margin-bottom: 0.35rem;
}

.pg-empty-state p {
    margin: 0;
}

/* Skeleton loading shimmer */
.pg-skeleton {
    position: relative;
    overflow: hidden;
    background: var(--pg-surface-2);
    border-radius: var(--pg-radius-md);
    min-height: 1rem;
}

.pg-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: pgShimmer 1.4s infinite;
}

@keyframes pgShimmer {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

/* Tables (customer-side; admin extends in admin.css) */
.pg-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--pg-border);
    border-radius: var(--pg-radius-lg);
    background: var(--pg-surface);
}

.pg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.pg-table th,
.pg-table td {
    padding: 0.7rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--pg-border);
}

.pg-table th {
    background: var(--pg-bg-soft);
    color: var(--pg-text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pg-table tbody tr:last-child td {
    border-bottom: none;
}

.pg-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Auth pages (login / register) */
.pg-auth {
    max-width: 460px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.pg-auth-card {
    background: var(--pg-surface);
    border: 1px solid var(--pg-border);
    border-radius: var(--pg-radius-xl);
    padding: 2rem;
    box-shadow: var(--pg-shadow-md);
}

.pg-auth-card h1 {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
    background: var(--pg-gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    width: fit-content;
}

.pg-auth-card__intro {
    color: var(--pg-text-muted);
    margin-bottom: 1.75rem;
    font-size: 0.92rem;
    line-height: 1.55;
}

.pg-auth-card__switch {
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 0;
    color: var(--pg-text-muted);
    font-size: 0.92rem;
}

/* Cart drawer polish */
.cart-drawer {
    background: var(--pg-bg-soft);
}

.cart-footer {
    background: var(--pg-surface);
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.25);
}

.cart-items .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding-top: 4rem;
}

.cart-items .empty-state::before {
    content: 'shopping_cart';
    font-family: 'Material Symbols Rounded';
    font-size: 2.6rem;
    opacity: 0.4;
}

.checkout-btn {
    background: var(--pg-gradient-brand);
}

/* Inline prompt inside the drawer (login required) */
.pg-drawer-prompt {
    text-align: center;
    padding: 1.5rem 0.5rem;
}

.pg-drawer-prompt p {
    margin-bottom: 1.25rem;
    color: var(--pg-text-muted);
}

.pg-drawer-prompt .pg-btn-group {
    justify-content: center;
}

/* Accessible focus */
:focus-visible {
    outline: 2px solid var(--pg-primary);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Installable web app */
.pwa-splash {
    display: none;
}

html.pwa-standalone:not(.pwa-splash-seen) .pwa-splash {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: max(2rem, env(safe-area-inset-top)) 2rem max(2rem, env(safe-area-inset-bottom));
    background:
        radial-gradient(circle at 50% 38%, rgba(139, 92, 246, 0.15), transparent 34%),
        radial-gradient(circle at 35% 58%, rgba(34, 211, 238, 0.09), transparent 30%),
        #0A0A12;
    color: var(--pg-text);
    opacity: 1;
    transition: opacity 0.38s ease, visibility 0.38s ease;
}

.pwa-splash.is-leaving {
    opacity: 0;
    visibility: hidden;
}

.pwa-splash__glow {
    position: absolute;
    width: min(76vw, 300px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.16);
    filter: blur(70px);
    animation: pwa-glow 1.8s ease-in-out infinite alternate;
}

.pwa-splash__logo {
    position: relative;
    width: min(46vw, 176px);
    height: min(46vw, 176px);
    object-fit: contain;
    filter: drop-shadow(0 18px 36px rgba(34, 211, 238, 0.16));
    animation: pwa-logo-float 1.8s ease-in-out infinite;
}

.pwa-splash__brand {
    position: relative;
    margin-top: 1rem;
    font-size: clamp(1.55rem, 8vw, 2.2rem);
    letter-spacing: 0.14em;
    background: var(--pg-gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pwa-splash__phrase {
    position: relative;
    margin-top: 0.55rem;
    color: var(--pg-text-muted);
    font-size: 0.88rem;
}

.pwa-splash__loader {
    position: relative;
    width: min(52vw, 190px);
    height: 3px;
    margin-top: 1.5rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.pwa-splash__loader i {
    display: block;
    width: 46%;
    height: 100%;
    border-radius: inherit;
    background: var(--pg-gradient-brand);
    animation: pwa-loader 1.15s ease-in-out infinite;
}

@keyframes pwa-logo-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.025); }
}

@keyframes pwa-glow {
    from { transform: scale(0.88); opacity: 0.55; }
    to { transform: scale(1.12); opacity: 1; }
}

@keyframes pwa-loader {
    from { transform: translateX(-115%); }
    to { transform: translateX(250%); }
}

.pwa-install-page {
    width: min(100%, 860px);
    padding-top: clamp(2rem, 7vw, 5rem);
    padding-bottom: clamp(3rem, 8vw, 6rem);
}

.pwa-install-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pwa-install-hero__icon {
    width: 116px;
    height: 116px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.32);
    border-radius: 26px;
    box-shadow: var(--pg-shadow-glow);
}

.pwa-install-hero__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pwa-install-hero h1 {
    margin: 0.35rem 0 0.65rem;
    font-size: clamp(2rem, 8vw, 3.5rem);
}

.pwa-install-hero > p {
    max-width: 580px;
    color: var(--pg-text-muted);
}

.pwa-install-primary {
    min-width: min(100%, 310px);
    margin-top: 1.5rem;
}

.pwa-install-primary:disabled {
    opacity: 0.72;
}

.pwa-install-success {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(34, 197, 94, 0.32);
    border-radius: var(--pg-radius-lg);
    background: rgba(34, 197, 94, 0.09);
    color: #86EFAC;
}

.pwa-install-card {
    margin-top: 1.5rem;
    padding: clamp(1.1rem, 4vw, 1.6rem);
    border: 1px solid var(--pg-border);
    border-radius: var(--pg-radius-xl);
    background: var(--pg-surface);
}

.pwa-install-card__heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pwa-install-card__heading h2 {
    margin: 0;
    font-size: 1.25rem;
}

.pwa-install-step-number {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.1);
    color: #67E8F9;
    font-size: 0.75rem;
    font-weight: 700;
}

.pwa-install-steps {
    display: grid;
    gap: 0.8rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pwa-install-steps li {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    color: var(--pg-text-muted);
}

.pwa-install-steps .material-symbols-rounded {
    color: var(--pg-primary);
}

.pwa-install-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.pwa-install-benefits article {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
    border: 1px solid var(--pg-border);
    border-radius: var(--pg-radius-lg);
    background: var(--pg-surface);
}

.pwa-install-benefits article > .material-symbols-rounded {
    color: var(--pg-primary);
}

.pwa-install-benefits article > span:last-child {
    color: var(--pg-text-muted);
    font-size: 0.82rem;
}

.footer__install-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.6rem;
    color: var(--pg-text-muted);
    font-size: 0.82rem;
}

.footer__install-link .material-symbols-rounded {
    font-size: 1rem;
}

@media (max-width: 640px) {
    .pwa-install-benefits {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pwa-splash__glow,
    .pwa-splash__logo,
    .pwa-splash__loader i {
        animation: none !important;
    }
}

/* Checkout split-payment plan */
.split-payment {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--pg-border, rgba(255,255,255,.12));
    border-radius: var(--pg-radius-md, 16px);
    background: var(--pg-surface-2, rgba(255,255,255,.035));
}
.split-payment__intro { display: grid; gap: .2rem; margin-bottom: .9rem; }
.split-payment__fields { display: grid; grid-template-columns: 1fr auto 1fr; gap: .75rem; align-items: end; }
.split-payment__plus { padding-bottom: .9rem; color: var(--pg-text-muted); font-weight: 700; }
.money-input { position: relative; }
.money-input > span { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--pg-text-muted); z-index: 1; }
.money-input .form-input { padding-left: 2rem; }
.split-payment__status { font-size: .86rem; margin-top: .7rem; }
.split-payment__status.is-valid { color: var(--pg-success, #54d69b); }
.split-payment__status.is-error { color: var(--pg-danger, #ff6f86); }

/* V免签 payment page */
.payment-page { min-height: 100vh; }
.payment-shell { max-width: 860px; padding-top: 2rem; padding-bottom: 5rem; }
.payment-heading { margin: 1.4rem 0 1.5rem; }
.payment-heading h1 { margin: .25rem 0 .45rem; }
.payment-heading p { color: var(--pg-text-muted); margin: 0; }
.payment-overview { padding: 1.35rem; }
.payment-overview__status { display: flex; align-items: center; gap: .65rem; font-size: 1.08rem; }
.payment-status-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--pg-primary); box-shadow: 0 0 18px color-mix(in srgb, var(--pg-primary) 70%, transparent); }
.payment-progress { height: .42rem; margin: 1.1rem 0; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); }
.payment-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--pg-primary), var(--pg-accent)); transition: width .35s ease; }
.payment-overview__amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.payment-overview__amounts > div { display: grid; gap: .22rem; padding: .8rem; border-radius: 12px; background: rgba(255,255,255,.035); }
.payment-overview__amounts span { color: var(--pg-text-muted); font-size: .78rem; }
.payment-warning, .payment-help { display: flex; align-items: flex-start; gap: .8rem; margin-top: 1rem; padding: 1rem; }
.payment-warning[hidden] { display: none !important; }
.payment-warning { border-color: color-mix(in srgb, var(--pg-warning) 50%, transparent); }
.payment-warning p, .payment-help p { margin: .3rem 0 0; color: var(--pg-text-muted); }
.payment-parts-section { margin-top: 2rem; }
.payment-parts { display: grid; gap: 1rem; }
.payment-part { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1.15rem; }
.payment-part.is-complete { border-color: color-mix(in srgb, var(--pg-success) 45%, transparent); }
.payment-part__icon { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 13px; background: color-mix(in srgb, var(--pg-primary) 15%, transparent); color: var(--pg-primary); }
.payment-part__heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.payment-part__heading h3 { margin: .15rem 0 0; font-size: 1.45rem; }
.payment-part__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .85rem; }
.payment-qr-panel { display: grid; grid-template-columns: minmax(180px, 224px) 1fr; align-items: center; gap: 1.25rem; margin-top: 1rem; padding: 1rem; border: 1px solid var(--pg-border); border-radius: var(--pg-radius-lg); background: color-mix(in srgb, var(--pg-surface-2) 84%, transparent); }
.payment-qr-frame { width: 100%; max-width: 224px; aspect-ratio: 1; display: grid; place-items: center; padding: .65rem; border-radius: var(--pg-radius-md); background: #fff; box-shadow: 0 14px 34px rgba(0,0,0,.24); }
.payment-qr-frame canvas, .payment-qr-frame img, .payment-qr-frame svg { display: block; width: 100% !important; height: 100% !important; }
.payment-qr-copy { display: grid; gap: .45rem; }
.payment-qr-copy > strong { color: var(--pg-text); font-size: clamp(1.3rem, 4vw, 1.8rem); }
.payment-qr-copy p { margin: 0; color: var(--pg-text-muted); line-height: 1.55; }
.payment-same-phone { display: flex; align-items: flex-start; gap: .45rem; padding: .65rem .75rem; border-radius: var(--pg-radius-md); background: color-mix(in srgb, var(--pg-info) 9%, transparent); }
.payment-same-phone .material-symbols-rounded { flex: 0 0 auto; color: var(--pg-info); font-size: 1.15rem; margin-top: .1rem; }
.payment-qr-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .45rem; }
.payment-expiry { display: inline-flex; align-items: center; gap: .45rem; width: fit-content; margin-top: .2rem; padding: .45rem .65rem; border-radius: 999px; color: var(--pg-warning); background: color-mix(in srgb, var(--pg-warning) 10%, transparent); font-size: .86rem; }
.payment-expiry .material-symbols-rounded { font-size: 1.05rem; }
.payment-expired { display: flex; align-items: center; gap: .8rem; margin-top: 1rem; padding: .9rem; border: 1px solid color-mix(in srgb, var(--pg-warning) 45%, transparent); border-radius: var(--pg-radius-md); background: color-mix(in srgb, var(--pg-warning) 8%, transparent); }
.payment-expired > .material-symbols-rounded { color: var(--pg-warning); }
.payment-expired div { flex: 1; }
.payment-expired p { margin: .18rem 0 0; color: var(--pg-text-muted); }
.payment-adjustment { color: var(--pg-text-muted); font-size: .84rem; }
.payment-complete-copy { display: flex; align-items: center; gap: .4rem; color: var(--pg-success); }
.pg-status-chip { display: inline-flex; padding: .35rem .65rem; border: 1px solid var(--pg-border); border-radius: 999px; color: var(--pg-text-muted); font-size: .75rem; text-transform: capitalize; }

@media (max-width: 620px) {
    .split-payment__fields { grid-template-columns: 1fr; }
    .split-payment__plus { display: none; }
    .saved-addresses__header { align-items: flex-start; }
    .save-address-options { grid-template-columns: 1fr; align-items: start; }
    .payment-overview__amounts { grid-template-columns: 1fr; }
    .payment-part { grid-template-columns: 1fr; }
    .payment-qr-panel { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .payment-qr-copy { justify-items: center; }
    .payment-qr-actions { justify-content: center; }
}

/* ============================================================
   2026 brand-led MVP revamp
   The label system is the visual source: ink-black violet,
   spectral cyan/violet/pink accents, and restrained flavor color.
   ============================================================ */

:root {
    --pg-bg: #090811;
    --pg-bg-soft: #0f0d18;
    --pg-surface: #15121f;
    --pg-surface-2: #1b1728;
    --pg-surface-3: #241e34;
    --pg-border: rgba(184, 173, 222, 0.14);
    --pg-border-strong: rgba(184, 173, 222, 0.28);
    --pg-text: #f7f5fb;
    --pg-text-muted: #aaa3b8;
    --pg-text-soft: #756f82;
    --pg-primary: #16c7ef;
    --pg-primary-2: #7957ff;
    --pg-accent: #ef3e9a;
    --pg-accent-2: #ff861e;
    --pg-gradient-primary: linear-gradient(110deg, #14c8f2 0%, #6a64ff 53%, #e843b0 100%);
    --pg-gradient-brand: linear-gradient(100deg, #15c7f1 0%, #596cff 34%, #db45c7 68%, #ff8725 100%);
    --pg-gradient-deal: linear-gradient(110deg, #ff9a22 0%, #ef3e9a 100%);
    --pg-radius-sm: 10px;
    --pg-radius-md: 16px;
    --pg-radius-lg: 22px;
    --pg-radius-xl: 30px;
    --pg-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.22);
    --pg-shadow-md: 0 18px 50px rgba(0, 0, 0, 0.32);
    --pg-shadow-glow: 0 16px 38px rgba(109, 85, 255, 0.22);
}

html { scroll-padding-top: 90px; }

body {
    background:
        radial-gradient(circle at 12% -8%, rgba(38, 186, 239, 0.10), transparent 27rem),
        radial-gradient(circle at 88% 3%, rgba(225, 61, 173, 0.08), transparent 24rem),
        var(--pg-bg);
    letter-spacing: -0.01em;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: .26;
    background-image: linear-gradient(rgba(255,255,255,.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 72%);
}

h1, h2, h3, h4, .brand-name, .product-name {
    letter-spacing: -0.035em;
}

.pg-container { width: min(100% - 2rem, 1280px); margin-inline: auto; }
.pg-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #83e9ff;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.pg-eyebrow::before {
    content: '';
    width: 1.5rem;
    height: 2px;
    background: var(--pg-gradient-primary);
}

.header {
    padding: .65rem 1rem;
    background: rgba(9, 8, 17, .78);
    border-color: rgba(184, 173, 222, .12);
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
}
.header-content { max-width: 1280px; }
.brand-logo { height: 54px; filter: drop-shadow(0 6px 15px rgba(55, 171, 244, .22)); }
.brand-name { font-size: clamp(1.55rem, 4vw, 2.15rem); letter-spacing: .015em; }
.header .category-tabs { gap: .35rem; flex-wrap: nowrap; }
.header .tab {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    padding-inline: 1rem;
}
.header .tab:not(.active):not(.tab-logout) { background: rgba(255,255,255,.018); }

.shop-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(290px, .8fr);
    align-items: end;
    gap: 2rem;
    padding-block: clamp(2.4rem, 6vw, 5.2rem) 2rem;
}
.shop-hero h1 {
    max-width: 760px;
    margin: .45rem 0 .7rem;
    font-size: clamp(2.35rem, 6vw, 5.2rem);
    line-height: .98;
    background: var(--pg-gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.shop-hero__copy p { max-width: 680px; color: var(--pg-text-muted); font-size: clamp(1rem, 2vw, 1.14rem); }
.shop-hero__promises { display: grid; gap: .55rem; }
.shop-hero__promises > span {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .72rem .9rem;
    border: 1px solid var(--pg-border);
    border-radius: 999px;
    color: var(--pg-text-muted);
    background: rgba(21, 18, 31, .68);
}
.shop-hero__promises > span::before {
    content: '';
    width: .45rem;
    height: .45rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--pg-gradient-brand);
    box-shadow: 0 0 12px rgba(22,199,239,.3);
}

.search-container { max-width: 1280px; margin-top: .25rem; }
.search-input {
    min-height: 58px;
    background: rgba(21, 18, 31, .82);
    border: 1px solid var(--pg-border-strong);
    border-radius: 18px;
}
.search-input:focus { background: var(--pg-surface); border-color: rgba(23,199,239,.7); }
.search-icon {
    font-size: 0;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--pg-text-soft);
    border-radius: 50%;
}
.search-icon::after {
    content: '';
    position: absolute;
    width: .52rem;
    height: 2px;
    right: -.36rem;
    bottom: -.12rem;
    border-radius: 2px;
    background: var(--pg-text-soft);
    transform: rotate(45deg);
}
.category-tabs-container { max-width: 1280px; margin-top: .9rem; }
.category-tabs-container .category-tabs:has(.category-tabs-slider) {
    border-width: 1px;
    background: rgba(21, 18, 31, .78);
    border-radius: 16px;
}

.container { max-width: 1280px; }
.product-grid { gap: 1rem; }
.product-card {
    padding: .8rem;
    border-width: 1px;
    background: linear-gradient(165deg, rgba(28,24,41,.96), rgba(17,15,26,.96));
    box-shadow: 0 10px 36px rgba(0,0,0,.18);
    cursor: default;
}
.product-card:hover {
    transform: translateY(-5px);
    background: linear-gradient(165deg, rgba(33,28,48,.98), rgba(18,15,28,.98));
    border-color: rgba(102, 100, 255, .42);
    box-shadow: 0 18px 44px rgba(0,0,0,.28), 0 0 0 1px rgba(28,199,240,.09);
}
.product-image {
    border-width: 1px;
    background: linear-gradient(145deg, #0d0b15, #11101a);
    border-radius: 17px;
    object-fit: contain;
}
.product-badge { width: fit-content; margin-bottom: .65rem; font-size: .7rem; letter-spacing: .04em; }
.product-name { font-size: 1.02rem; line-height: 1.25; }
.product-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.05em;
    font-size: .84rem;
}
.product-footer { gap: .75rem; }
.product-footer .btn { min-width: 0; padding-inline: .8rem; }
.btn { min-height: 42px; border-radius: 13px; transition: transform var(--pg-transition), box-shadow var(--pg-transition), background var(--pg-transition), border-color var(--pg-transition); }
.btn-primary { background: var(--pg-gradient-primary); box-shadow: 0 8px 22px rgba(101,91,255,.18); }
.btn-secondary { border-width: 1px; background: rgba(255,255,255,.025); }

.product-detail { max-width: 1280px; margin-top: 1.25rem; }
.product-detail-grid { gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
@media (min-width: 900px) {
    .product-detail-grid { grid-template-columns: minmax(340px, .9fr) minmax(480px, 1.15fr); }
    .product-detail-image-container { position: sticky; top: 92px; }
}
.product-detail-image, .product-detail-image-stack, .product-detail-info {
    border-width: 1px;
    border-color: var(--pg-border);
    background: linear-gradient(165deg, rgba(27,23,40,.96), rgba(16,14,24,.96));
    box-shadow: 0 18px 50px rgba(0,0,0,.18);
}
.product-detail-image, .product-detail-image-layer { object-fit: contain; }
.product-detail-info { padding: clamp(1.1rem, 3vw, 2.1rem); }
.product-detail-info .product-badge { margin-bottom: 1rem; }
.variant-option, .juice-size-card, .juice-flavor-chip, .compatible-variant-pill {
    border-width: 1px;
    background: rgba(255,255,255,.025);
}

.footer { margin-top: 5rem; padding: 2rem 1rem; background: rgba(15,13,24,.82); }
.footer__inner { width: min(100%, 1280px); margin: 0 auto; display: grid; justify-items: center; gap: .4rem; }
.footer__brand { display: inline-flex; align-items: center; font-weight: 700; letter-spacing: .08em; background: var(--pg-gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer__brand img { width: 34px; height: 34px; object-fit: contain; transform: rotate(-90deg); }
.footer__legal { font-size: .75rem; color: var(--pg-text-soft); }

.pg-auth { min-height: calc(100vh - 180px); display: grid; place-items: center; padding: 3rem 1rem; }
.pg-auth-card { width: min(100%, 480px); background: linear-gradient(165deg, rgba(28,24,41,.98), rgba(16,14,24,.98)); border: 1px solid var(--pg-border); box-shadow: var(--pg-shadow-md); }
.form-input, .form-select, textarea { border-width: 1px; background: rgba(8,7,13,.68); }

.cart-drawer { border-left: 1px solid var(--pg-border); background: rgba(14,12,22,.98); box-shadow: -24px 0 70px rgba(0,0,0,.42); }
.cart-header { border-bottom: 1px solid var(--pg-border); }
.checkout-section { padding: 1rem; border: 1px solid var(--pg-border); border-radius: 16px; background: rgba(255,255,255,.018); }
.delivery-method-card, .delivery-quote-card { border-width: 1px; }

.compatible-section { padding-top: 1.5rem; border-top: 1px solid var(--pg-border); }
.compatible-grid { gap: 1rem; }
.compatible-card { border-width: 1px; background: linear-gradient(165deg, rgba(28,24,41,.96), rgba(16,14,24,.96)); }

.track-container, .orders-container { max-width: 960px; }
.track-card, .order-card { border-width: 1px; background: linear-gradient(165deg, rgba(28,24,41,.96), rgba(16,14,24,.96)); }

@media (max-width: 720px) {
    .header { position: relative; padding: .55rem .75rem; }
    .header-content { gap: .4rem; }
    .brand-logo { height: 44px; }
    .brand-name { font-size: 1.45rem; }
    .header .category-tabs { width: 100%; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: none; }
    .header .category-tabs::-webkit-scrollbar { display: none; }
    .header .tab { flex: 0 0 auto; min-height: 38px; padding-inline: .9rem; font-size: .78rem; }
    .shop-hero { grid-template-columns: 1fr; gap: 1.2rem; padding-top: 2rem; }
    .shop-hero h1 { font-size: 2.7rem; }
    .shop-hero__promises { display: flex; overflow-x: auto; scrollbar-width: none; margin-right: -1rem; padding-right: 1rem; }
    .shop-hero__promises > span { flex: 0 0 auto; font-size: .78rem; }
    .search-container { margin-top: .25rem; }
    .search-input { min-height: 52px; padding-left: 3rem; font-size: .88rem; text-overflow: ellipsis; }
    .category-tabs-container { overflow: hidden; }
    .category-tabs-container .category-tabs:has(.category-tabs-slider) { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
    .category-tabs-container .category-tabs:has(.category-tabs-slider) .tab,
    .category-tabs-container .category-tabs:has(.category-tabs-slider) .tab.active { flex: 0 0 auto; min-width: 112px; padding-inline: .85rem; }
    .category-tabs-slider { display: none; }
    .category-tabs-container .category-tabs:has(.category-tabs-slider) .tab.active { background: var(--pg-gradient-primary); }
    .container { padding: .75rem; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
    .product-card { padding: .6rem; border-radius: 17px; }
    .product-image { margin-bottom: .65rem; }
    .product-name { font-size: .88rem; }
    .product-description { -webkit-line-clamp: 2; min-height: 3em; font-size: .75rem; }
    .product-footer { align-items: stretch; flex-direction: column; }
    .product-footer .btn { width: 100%; min-height: 38px; font-size: .78rem; }
    .product-price-amount { font-size: 1rem; }
    .product-detail { margin-top: .5rem; padding: .75rem; }
    .product-detail-grid { gap: .9rem; }
    .back-to-shop-btn { min-height: 40px; }
    .product-detail-info { border-radius: 18px; }
    .footer { margin-top: 3rem; }
}

@media (max-width: 390px) {
    .product-grid { grid-template-columns: 1fr; }
}
.payment-check-now {
    margin-top: .75rem;
    width: fit-content;
}

.payment-check-now.is-loading .material-symbols-rounded {
    animation: pg-spin .8s linear infinite;
}

/* Final MVP checkout, payment, and order polish */
.form-help {
    display: block;
    margin-top: .42rem;
    color: var(--pg-text-muted);
    font-size: .78rem;
    line-height: 1.45;
}

.saved-addresses {
    margin-top: 1.15rem;
    padding: 1rem;
}
.saved-address-list { gap: .75rem; }
.saved-address-card {
    grid-template-columns: 1fr;
    border-width: 1px;
    overflow: visible;
}
.saved-address-card.is-selected {
    border-color: rgba(22, 199, 239, .8);
    box-shadow: 0 0 0 2px rgba(22, 199, 239, .12), 0 14px 30px rgba(0,0,0,.18);
    background: linear-gradient(135deg, rgba(22,199,239,.1), rgba(121,87,255,.06));
}
.saved-address-card__selected {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    margin-left: auto;
    color: #79e9ff;
    font-size: .72rem;
    font-weight: 700;
}
.saved-address-card__selected .material-symbols-rounded { font-size: 1rem; }
.saved-address-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: .55rem .75rem .7rem;
    border-top: 1px solid var(--pg-border);
}
.saved-address-action {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    min-height: 34px;
    padding: .35rem .58rem;
    border: 0;
    border-radius: 9px;
    color: var(--pg-text-muted);
    background: rgba(255,255,255,.035);
    font: inherit;
    font-size: .72rem;
    cursor: pointer;
}
.saved-address-action:hover { color: var(--pg-text); background: rgba(255,255,255,.08); }
.saved-address-action--danger:hover { color: var(--pg-danger); background: color-mix(in srgb, var(--pg-danger) 9%, transparent); }
.saved-address-action .material-symbols-rounded { font-size: 1rem; }

.pickup-guide {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: clamp(1rem, 3vw, 1.35rem);
    border: 1px solid rgba(22,199,239,.26);
    border-radius: var(--pg-radius-lg);
    background: linear-gradient(145deg, rgba(22,199,239,.08), rgba(121,87,255,.06) 52%, rgba(239,62,154,.045));
}
.pickup-guide__heading { display: flex; gap: .85rem; align-items: center; }
.pickup-guide__heading > .material-symbols-rounded {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    color: #8cecff;
    background: rgba(22,199,239,.12);
}
.pickup-guide h4 { margin: .15rem 0 0; font-size: 1.08rem; }
.pickup-guide__address {
    margin: 0;
    padding: .7rem .8rem;
    border-radius: 12px;
    color: var(--pg-text);
    background: rgba(0,0,0,.18);
}
.pickup-gates { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
.pickup-gates > div { display: grid; gap: .2rem; padding: .75rem; border: 1px solid var(--pg-border); border-radius: 12px; background: rgba(255,255,255,.025); }
.pickup-gates span { color: var(--pg-text-muted); font-size: .78rem; line-height: 1.45; }
.pickup-steps { display: grid; gap: .5rem; margin: 0; padding-left: 1.35rem; color: var(--pg-text-muted); font-size: .88rem; line-height: 1.5; }
.pickup-map-links { display: flex; flex-wrap: wrap; gap: .55rem; }
.pickup-map-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 40px;
    padding: .42rem .68rem;
    border: 1px solid var(--pg-border);
    border-radius: 12px;
    color: var(--pg-text);
    background: rgba(255,255,255,.035);
}
.pickup-map-link:hover { border-color: var(--pg-border-strong); transform: translateY(-1px); }
.pickup-map-logo { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: white; font-size: .72rem; font-weight: 800; }
.pickup-map-link--amap .pickup-map-logo { background: #1677ff; }
.pickup-map-link--baidu .pickup-map-logo { background: #315efb; }
.pickup-map-link--tencent .pickup-map-logo { background: #10b981; }
.pickup-map-link--apple .pickup-map-logo { background: #1c1c1e; }
.pickup-map-link--google .pickup-map-logo { background: conic-gradient(#4285f4, #34a853, #fbbc05, #ea4335, #4285f4); }
.pickup-guide__notice { display: flex; align-items: flex-start; gap: .5rem; margin: 0; color: var(--pg-text-muted); font-size: .8rem; }
.pickup-guide__notice .material-symbols-rounded { color: var(--pg-primary); font-size: 1.05rem; }

.payment-part { align-items: start; padding: clamp(1rem, 3vw, 1.4rem); }
.payment-part__body { min-width: 0; }
.payment-part__heading { padding-bottom: .8rem; border-bottom: 1px solid var(--pg-border); }
.payment-qr-panel {
    grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
    align-items: start;
    padding: clamp(.9rem, 2.5vw, 1.25rem);
    background: linear-gradient(145deg, rgba(27,23,40,.96), rgba(14,12,22,.96));
}
.payment-qr-visual { display: grid; justify-items: center; gap: .55rem; }
.payment-qr-hold-hint { color: var(--pg-text-soft); font-size: .7rem; text-align: center; }
.payment-exact-amount {
    display: grid;
    justify-items: start;
    gap: .08rem;
    padding: .85rem 1rem;
    border: 1px solid color-mix(in srgb, var(--pg-warning) 42%, transparent);
    border-radius: 15px;
    background: linear-gradient(110deg, rgba(255,134,30,.12), rgba(239,62,154,.08));
}
.payment-exact-amount > span {
    color: #ffd09b;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.payment-exact-amount > strong {
    color: #fff;
    font-size: clamp(2rem, 7vw, 3rem);
    line-height: 1.05;
    letter-spacing: -.035em;
}
.payment-exact-amount > small { color: var(--pg-warning); font-size: .76rem; font-weight: 700; }
.payment-check-focus { min-height: 48px; flex: 1 1 210px; }
.payment-check-focus.is-loading .material-symbols-rounded { animation: pg-spin .8s linear infinite; }
.payment-recovery-note { display: flex; gap: .4rem; align-items: flex-start; font-size: .76rem; }
.payment-recovery-note .material-symbols-rounded { color: var(--pg-primary); font-size: 1rem; }

.order-card { position: relative; overflow: hidden; }
.order-card__visuals {
    display: flex;
    align-items: center;
    min-height: 92px;
    margin: -1.5rem -1.5rem 1.2rem;
    padding: .8rem 1.5rem;
    border-bottom: 1px solid var(--pg-border);
    background: radial-gradient(circle at 15% 20%, rgba(22,199,239,.11), transparent 45%), rgba(255,255,255,.018);
}
.order-card__visuals img {
    width: 76px;
    height: 76px;
    margin-left: calc(var(--order-image-index) * -14px);
    border: 1px solid var(--pg-border-strong);
    border-radius: 16px;
    object-fit: contain;
    background: #0e0c16;
    box-shadow: 0 10px 24px rgba(0,0,0,.25);
}
.order-card__visuals img:first-child { margin-left: 0; }
.order-card-footer { align-items: center; flex-wrap: wrap; }
.order-continue-payment { order: -1; }
.order-payment-recovery { flex: 1 1 240px; font-size: .76rem; line-height: 1.4; }
.track-payment-resume { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .9rem; border-color: color-mix(in srgb, var(--pg-warning) 42%, transparent); }
.track-payment-resume > .material-symbols-rounded { color: var(--pg-warning); font-size: 2rem; }
.track-payment-resume p { margin: .2rem 0 0; color: var(--pg-text-muted); }
.track-payment-resume--expired {
    border-color: rgba(148, 163, 184, .28);
    background: rgba(148, 163, 184, .045);
}
.track-payment-resume--expired > .material-symbols-rounded { color: #94a3b8; }
.track-item { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 1rem; align-items: start; }
.track-item__image { width: 84px; height: 84px; border-radius: 16px; object-fit: contain; background: #0e0c16; border: 1px solid var(--pg-border); }
.track-item__content { min-width: 0; }
.pickup-access-card { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .75rem; margin-top: 1rem; padding: 1rem; border: 1px solid rgba(22,199,239,.4); border-radius: var(--pg-radius-lg); background: rgba(22,199,239,.07); }
.pickup-access-card > .pg-eyebrow, .pickup-access-card > p { grid-column: 1 / -1; }
.pickup-access-card > div { display: grid; gap: .2rem; padding: .75rem; border-radius: 12px; background: rgba(0,0,0,.18); }
.pickup-access-card span { color: var(--pg-text-muted); font-size: .76rem; }
.pickup-access-code { font-size: 1.6rem; letter-spacing: .16em; color: #8cecff; }
.pickup-access-card p { margin: 0; color: var(--pg-text-muted); }
.pickup-access-pending { display: flex; gap: .7rem; margin-top: 1rem; padding: .85rem; border: 1px solid var(--pg-border); border-radius: 14px; background: rgba(255,255,255,.025); }
.pickup-access-pending > .material-symbols-rounded { color: var(--pg-primary); }
.pickup-access-pending p { margin: .18rem 0 0; color: var(--pg-text-muted); }

@media (max-width: 680px) {
    .pickup-gates { grid-template-columns: 1fr; }
    .pickup-map-link { flex: 1 1 calc(50% - .55rem); }
    .payment-qr-panel { grid-template-columns: 1fr; }
    .payment-exact-amount { justify-items: center; width: 100%; }
    .payment-qr-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); width: 100%; }
    .payment-check-focus { grid-column: 1 / -1; width: 100%; }
    .track-payment-resume { grid-template-columns: auto 1fr; }
    .track-payment-resume .btn { grid-column: 1 / -1; width: 100%; }
    .track-item { grid-template-columns: 70px minmax(0, 1fr); }
    .track-item__image { width: 70px; height: 70px; }
}

@keyframes pg-spin {
    to { transform: rotate(360deg); }
}

/* Shared storefront navigation */
.header.site-header {
    position: sticky;
    top: 0;
    z-index: 150;
    min-height: 70px;
    padding: .55rem clamp(1rem, 3vw, 2rem);
    background: rgba(9, 8, 17, .86);
    border-bottom: 1px solid rgba(184, 173, 222, .12);
    box-shadow: 0 10px 34px rgba(0, 0, 0, .18);
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.site-header__inner {
    width: 100%;
    max-width: 1280px;
    min-height: 58px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 2.4rem);
}

.site-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 46px;
    color: var(--pg-text, var(--fg));
    text-decoration: none;
    border-radius: 14px;
}

.site-brand:focus-visible,
.site-nav__link:focus-visible,
.nav-icon-btn:focus-visible,
.account-menu__trigger:focus-visible,
.site-header__login:focus-visible,
.site-header__signup:focus-visible {
    outline: 2px solid var(--pg-primary, #38bdf8);
    outline-offset: 3px;
}

.site-brand__logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transform: rotate(-90deg);
    filter: drop-shadow(0 7px 16px rgba(55, 171, 244, .24));
}

.site-brand__name {
    margin-left: -.12rem;
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    line-height: 1;
    font-weight: 700;
    letter-spacing: .025em;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin-left: auto;
}

.site-nav__link,
.site-header__login {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 .9rem;
    border-radius: 12px;
    color: var(--pg-text-muted, var(--muted));
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    transition: color var(--pg-transition, .2s ease), background var(--pg-transition, .2s ease);
}

.site-nav__link:hover,
.site-header__login:hover {
    color: var(--pg-text, var(--fg));
    background: rgba(255, 255, 255, .045);
}

.site-nav__link.is-active {
    color: var(--pg-text, var(--fg));
}

.site-nav__link.is-active::after {
    content: '';
    position: absolute;
    left: .9rem;
    right: .9rem;
    bottom: 2px;
    height: 2px;
    border-radius: 999px;
    background: var(--pg-gradient-primary, var(--gradient-primary));
    box-shadow: 0 0 12px rgba(101, 180, 255, .45);
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.nav-icon-btn {
    position: relative;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--pg-text, var(--fg));
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--pg-border, var(--border));
    border-radius: 13px;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.nav-icon-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, .07);
    border-color: rgba(107, 180, 255, .4);
}

.nav-icon-btn .material-symbols-rounded { font-size: 1.3rem; }

.nav-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0d0b15;
    border-radius: 999px;
    background: var(--pg-gradient-primary, var(--gradient-primary));
    color: #fff;
    font-size: .66rem;
    line-height: 1;
    font-weight: 800;
}

.nav-cart-count.is-empty { background: #575266; color: #ddd8e8; }

.site-header__signup {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 1rem;
    border-radius: 13px;
    color: #fff;
    background: var(--pg-gradient-primary, var(--gradient-primary));
    box-shadow: 0 7px 22px rgba(126, 86, 255, .22);
    font-size: .86rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.site-header__signup:hover { transform: translateY(-1px); box-shadow: 0 9px 28px rgba(126, 86, 255, .32); }

.account-menu { position: relative; }

.account-menu__trigger {
    min-height: 44px;
    max-width: 210px;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .25rem .55rem .25rem .3rem;
    color: var(--pg-text, var(--fg));
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--pg-border, var(--border));
    border-radius: 14px;
    cursor: pointer;
}

.account-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #fff;
    background: var(--pg-gradient-primary, var(--gradient-primary));
    font-weight: 800;
}

.account-menu__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; font-weight: 700; }
.account-menu__chevron { font-size: 1.1rem; transition: transform .2s ease; }
.account-menu__trigger[aria-expanded="true"] .account-menu__chevron { transform: rotate(180deg); }

.account-menu__panel {
    position: absolute;
    top: calc(100% + .65rem);
    right: 0;
    width: 220px;
    padding: .45rem;
    border: 1px solid var(--pg-border, var(--border));
    border-radius: 16px;
    background: rgba(18, 15, 27, .98);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .45);
    animation: pg-nav-pop .16s ease-out;
}

.account-menu__panel[hidden] { display: none; }
.account-menu__panel a,
.account-menu__panel button {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem .65rem;
    border: 0;
    border-radius: 11px;
    color: var(--pg-text, var(--fg));
    background: transparent;
    font: inherit;
    font-size: .82rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.account-menu__panel a:hover,
.account-menu__panel button:hover { background: rgba(255, 255, 255, .055); }
.account-menu__panel button { margin-top: .25rem; color: #ff9ba5; border-top: 1px solid var(--pg-border, var(--border)); border-radius: 0 0 11px 11px; }
.account-menu__panel .material-symbols-rounded { font-size: 1.2rem; }

.mobile-menu-trigger,
.mobile-nav-overlay,
.mobile-nav-drawer,
.mobile-bottom-nav { display: none; }

.site-header__flow {
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--pg-text-muted, var(--muted));
    font-size: .82rem;
    font-weight: 700;
}
.site-header__flow .material-symbols-rounded { color: var(--pg-success, #45d6a8); font-size: 1.15rem; }
.site-header__quiet-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--pg-text-muted, var(--muted)); font-size: .82rem; font-weight: 700; text-decoration: none; }
.site-header__quiet-link:hover { color: var(--pg-text, var(--fg)); }
.site-header__quiet-link .material-symbols-rounded { font-size: 1.15rem; }

/* Desktop cart summary; the mobile bottom navigation owns this action below. */
.cart-fab { display: none !important; }

@media (min-width: 761px) {
    .site-header .nav-cart-btn { display: inline-flex; }
    .cart-fab.is-visible {
        right: clamp(1rem, 2.5vw, 2rem);
        bottom: clamp(1rem, 2.5vw, 2rem);
        min-height: 54px;
        display: inline-flex !important;
        gap: .7rem;
        padding: .6rem .75rem .6rem .65rem;
        border: 1px solid rgba(184, 173, 222, .2);
        border-radius: 18px;
        color: var(--pg-text, #fff);
        background: linear-gradient(145deg, rgba(29, 24, 43, .96), rgba(14, 12, 23, .96));
        box-shadow: 0 18px 54px rgba(0, 0, 0, .42), 0 0 0 1px rgba(120, 91, 255, .08);
        backdrop-filter: blur(18px) saturate(130%);
        -webkit-backdrop-filter: blur(18px) saturate(130%);
    }
    .cart-fab.is-visible:hover {
        transform: translateY(-3px);
        border-color: rgba(87, 180, 255, .42);
        box-shadow: 0 22px 62px rgba(0, 0, 0, .5), 0 0 26px rgba(126, 86, 255, .16);
    }
    .cart-fab .cart-badge {
        min-width: 34px;
        height: 34px;
        display: inline-grid;
        place-items: center;
        padding: 0 .45rem;
        border-radius: 11px;
        background: var(--pg-gradient-primary, var(--gradient-primary));
        box-shadow: 0 7px 20px rgba(86, 140, 255, .25);
    }
    .cart-fab .cart-total-text {
        padding-left: .7rem;
        border-left: 1px solid rgba(184, 173, 222, .18);
        color: var(--pg-text-muted, var(--muted));
        font-size: .82rem;
    }
}

@keyframes pg-nav-pop {
    from { opacity: 0; transform: translateY(-5px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 760px) {
    body:has(.mobile-bottom-nav) { padding-bottom: 68px; }
    body.mobile-menu-open { overflow: hidden; }

    .header.site-header {
        position: sticky;
        min-height: 62px;
        padding: .35rem .75rem;
    }
    .site-header__inner { min-height: 52px; gap: .5rem; }
    .site-brand { min-height: 44px; }
    .site-brand__logo { width: 41px; height: 41px; }
    .site-brand__name { font-size: 1.18rem; letter-spacing: .01em; }
    .site-nav,
    .site-header__login,
    .site-header__signup,
    .account-menu { display: none; }
    .site-header__actions { margin-left: auto; gap: .4rem; }
    .mobile-menu-trigger { display: inline-flex; }
    .nav-icon-btn { width: 42px; height: 42px; border-radius: 12px; }
    .cart-fab { display: none !important; }
    .cart-drawer {
        width: min(100%, 420px);
        height: 100dvh;
        height: var(--pg-viewport-height, 100dvh);
        max-height: var(--pg-viewport-height, 100dvh);
    }
    .cart-header { flex: 0 0 auto; padding-top: max(1rem, env(safe-area-inset-top)); }
    .cart-footer-inner { padding-bottom: max(1rem, env(safe-area-inset-bottom)); }

    .mobile-nav-overlay {
        position: fixed;
        inset: 0;
        z-index: 180;
        display: block;
        background: rgba(4, 3, 8, .68);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
    .mobile-nav-overlay[hidden] { display: none; }

    .mobile-nav-drawer {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 190;
        width: min(86vw, 340px);
        display: flex;
        flex-direction: column;
        padding: 1rem;
        background: linear-gradient(165deg, rgba(25, 21, 37, .995), rgba(11, 9, 18, .995));
        border-left: 1px solid var(--pg-border, var(--border));
        box-shadow: -28px 0 70px rgba(0, 0, 0, .48);
        transform: translateX(105%);
        visibility: hidden;
        transition: transform .25s cubic-bezier(.22, .8, .25, 1), visibility .25s;
    }
    .mobile-nav-drawer.is-open { transform: translateX(0); visibility: visible; }
    .mobile-nav-drawer__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .25rem .15rem 1rem; border-bottom: 1px solid var(--pg-border, var(--border)); }
    .mobile-nav-drawer__header > div { display: grid; gap: .2rem; }
    .mobile-nav-drawer__header strong { font-size: 1.05rem; }
    .mobile-nav-drawer__links { display: grid; gap: .35rem; padding: 1rem 0; }
    .mobile-nav-drawer__links a {
        position: relative;
        min-height: 52px;
        display: flex;
        align-items: center;
        gap: .8rem;
        padding: .7rem .8rem;
        border-radius: 14px;
        color: var(--pg-text-muted, var(--muted));
        font-weight: 700;
        text-decoration: none;
    }
    .mobile-nav-drawer__links a:hover,
    .mobile-nav-drawer__links a.is-active { color: var(--pg-text, var(--fg)); background: rgba(255, 255, 255, .055); }
    .mobile-nav-drawer__links a.is-active::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 99px; background: var(--pg-gradient-primary, var(--gradient-primary)); }
    .mobile-nav-drawer__links .material-symbols-rounded { font-size: 1.25rem; }
    .mobile-nav-drawer__count { position: static; margin-left: auto; border: 0; }
    .mobile-nav-drawer__logout { margin-top: auto; min-height: 50px; display: flex; align-items: center; justify-content: center; gap: .6rem; border: 1px solid rgba(255, 105, 120, .25); border-radius: 14px; color: #ff9ba5; background: rgba(255, 72, 91, .07); font: inherit; font-weight: 700; }
    .mobile-nav-drawer__note { margin-top: auto; padding: 1rem; border-radius: 14px; color: var(--pg-text-muted, var(--muted)); background: rgba(255, 255, 255, .035); font-size: .78rem; line-height: 1.55; }

    .mobile-bottom-nav {
        position: fixed;
        left: 50%;
        bottom: max(.55rem, env(safe-area-inset-bottom));
        z-index: 140;
        width: min(calc(100% - 1rem), 420px);
        min-height: 58px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        padding: .3rem;
        border: 1px solid rgba(184, 173, 222, .16);
        border-radius: 19px;
        background: rgba(17, 14, 26, .92);
        box-shadow: 0 16px 44px rgba(0, 0, 0, .42);
        backdrop-filter: blur(18px) saturate(140%);
        -webkit-backdrop-filter: blur(18px) saturate(140%);
        transform: translateX(-50%);
    }
    .mobile-bottom-nav a,
    .mobile-bottom-nav button {
        min-width: 0;
        min-height: 50px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: .08rem;
        padding: .25rem;
        border: 0;
        border-radius: 14px;
        color: var(--pg-text-soft, var(--muted));
        background: transparent;
        font: inherit;
        font-size: .66rem;
        font-weight: 700;
        text-decoration: none;
    }
    .mobile-bottom-nav a.is-active { color: #fff; background: linear-gradient(135deg, rgba(50, 177, 255, .16), rgba(209, 70, 255, .14)); }
    .mobile-bottom-nav .material-symbols-rounded { font-size: 1.25rem; }
    .mobile-bottom-nav__icon { position: relative; display: inline-flex; }
    .mobile-bottom-nav .nav-cart-count { top: -7px; right: -13px; }

    .site-header--focus .site-brand__name { display: none; }
    .site-header--focus .site-header__flow { margin-left: auto; font-size: .74rem; }
    .site-header--focus .site-header__quiet-link span:not(.material-symbols-rounded) { display: none; }
    .site-header--focus .site-header__quiet-link { width: 40px; height: 40px; justify-content: center; border: 1px solid var(--pg-border, var(--border)); border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-nav-drawer,
    .account-menu__panel { animation: none !important; transition: none !important; }
}
.checkout-runner-timing {
    margin-top: 1rem;
}

.delivery-timing-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.delivery-timing-card {
    position: relative;
    display: block;
    cursor: pointer;
}

.delivery-timing-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.delivery-timing-card span {
    display: flex;
    min-height: 88px;
    flex-direction: column;
    justify-content: center;
    gap: .25rem;
    padding: .9rem 1rem;
    border: 1px solid var(--pg-border, rgba(255,255,255,.12));
    border-radius: var(--pg-radius-md, 14px);
    background: var(--pg-surface-2, rgba(255,255,255,.04));
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.delivery-timing-card small {
    color: var(--pg-text-muted, #aaa);
    line-height: 1.35;
}

.delivery-timing-card input:checked + span {
    border-color: var(--pg-primary, #6c63ff);
    background: color-mix(in srgb, var(--pg-primary, #6c63ff) 14%, var(--pg-surface-2, #171722));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--pg-primary, #6c63ff) 35%, transparent);
}

.delivery-timing-card input:focus-visible + span {
    outline: 2px solid var(--pg-primary, #6c63ff);
    outline-offset: 2px;
}

.checkout-schedule-fields {
    margin-top: .85rem;
    padding: .9rem;
    border-radius: var(--pg-radius-md, 14px);
    background: var(--pg-surface-2, rgba(255,255,255,.04));
}

@media (max-width: 560px) {
    .delivery-timing-cards {
        grid-template-columns: 1fr;
    }

    .delivery-timing-card span {
        min-height: 72px;
    }
}

/* Checkout scheduling + final order-history polish --------------------- */
.delivery-method-cards {
    margin-bottom: 1rem;
}

.checkout-summary-card {
    top: 6.15rem;
}

.schedule-picker {
    display: grid;
    gap: .85rem;
}

.schedule-picker__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.schedule-picker__header > div {
    display: grid;
    gap: .18rem;
}

.schedule-picker__selection {
    flex: 0 0 auto;
    padding: .45rem .7rem;
    border: 1px solid color-mix(in srgb, var(--pg-primary) 35%, var(--pg-border));
    border-radius: 999px;
    color: var(--pg-text);
    background: color-mix(in srgb, var(--pg-primary) 10%, transparent);
    font-size: .76rem;
    font-weight: 700;
}

.schedule-picker__days {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
}

.schedule-picker__day,
.schedule-picker__slot {
    min-height: 46px;
    border: 1px solid var(--pg-border);
    border-radius: 13px;
    color: var(--pg-text-muted);
    background: rgba(255,255,255,.025);
    font: inherit;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.schedule-picker__day {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    padding: .68rem .8rem;
}

.schedule-picker__day strong {
    color: inherit;
    font-size: .86rem;
}

.schedule-picker__day span {
    font-size: .72rem;
}

.schedule-picker__day:hover,
.schedule-picker__slot:hover {
    color: var(--pg-text);
    border-color: var(--pg-border-strong);
    transform: translateY(-1px);
}

.schedule-picker__day.is-selected,
.schedule-picker__slot.is-selected {
    color: #fff;
    border-color: color-mix(in srgb, var(--pg-primary) 78%, #fff 10%);
    background: linear-gradient(135deg, rgba(28,177,242,.22), rgba(137,70,255,.24));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--pg-primary) 24%, transparent);
}

.schedule-picker__slots {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .5rem;
    max-height: 220px;
    overflow-y: auto;
    padding: .1rem .15rem .15rem;
    scrollbar-width: thin;
}

.schedule-picker__slots[hidden] {
    display: none;
}

.schedule-picker__slot {
    padding: .55rem .4rem;
    font-size: .8rem;
    font-weight: 700;
}

.orders-container {
    border-radius: 24px 24px 0 0;
}

.orders-header {
    margin-bottom: 2rem;
}

.order-card {
    padding: 1.35rem;
    border-radius: 22px;
}

.order-card__top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
}

.order-card__visuals {
    min-width: 72px;
    min-height: 72px;
    width: max-content;
    max-width: 190px;
    display: flex;
    align-items: center;
    margin: 0;
    padding: .35rem;
    overflow: hidden;
    border: 1px solid var(--pg-border);
    border-radius: 17px;
    background: radial-gradient(circle at 18% 20%, rgba(22,199,239,.12), transparent 50%), rgba(5,4,10,.42);
}

.order-card__visuals img {
    width: 62px;
    height: 62px;
    margin-left: calc(var(--order-image-index) * -13px);
    border: 0;
    border-radius: 12px;
    box-shadow: none;
}

.order-card__visuals--empty {
    display: grid;
    place-items: center;
    color: var(--pg-text-soft);
}

.order-card__visuals--empty .material-symbols-rounded {
    font-size: 1.7rem;
}

.order-card .order-info {
    min-width: 0;
}

.order-card .order-number {
    margin: 0 0 .3rem;
    font-size: 1.25rem;
}

.order-card .order-date {
    margin: 0;
    font-size: .78rem;
}

.order-card .order-summary {
    gap: .55rem;
}

.order-card .order-price {
    font-size: 1.45rem;
    line-height: 1;
}

.order-card .status-badge {
    padding: .36rem .72rem;
    border-width: 1px;
    font-size: .72rem;
}

.order-delivery-meta {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .65rem;
    align-items: start;
    margin-top: 1rem;
    padding: .78rem .85rem;
    border: 1px solid var(--pg-border);
    border-radius: 14px;
    background: rgba(255,255,255,.022);
}

.order-delivery-meta > .material-symbols-rounded {
    color: var(--pg-primary);
    font-size: 1.2rem;
}

.order-delivery-meta > div {
    display: grid;
    gap: .18rem;
}

.order-delivery-meta strong {
    font-size: .8rem;
}

.order-delivery-meta span {
    color: var(--pg-text-muted);
    font-size: .74rem;
    line-height: 1.45;
}

.order-payment-recovery {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    margin-top: .85rem;
    padding: .75rem;
    border: 1px solid color-mix(in srgb, var(--pg-primary) 32%, var(--pg-border));
    border-radius: 14px;
    background: linear-gradient(120deg, rgba(25,176,241,.08), rgba(160,72,246,.07));
}

.order-payment-recovery > .material-symbols-rounded {
    color: var(--pg-primary);
    font-size: 1.35rem;
}

.order-payment-recovery > div {
    display: grid;
    gap: .12rem;
    min-width: 0;
}

.order-payment-recovery strong {
    font-size: .79rem;
}

.order-payment-recovery > div span {
    color: var(--pg-text-muted);
    font-size: .7rem;
    line-height: 1.4;
}

.order-payment-recovery--expired {
    border-color: rgba(148, 163, 184, .24);
    background: rgba(148, 163, 184, .045);
}

.order-payment-recovery--expired > .material-symbols-rounded {
    color: #94a3b8;
}

.order-payment-recovery .order-continue-payment {
    order: initial;
    min-height: 40px;
    padding: .55rem .78rem;
    font-size: .75rem;
}

.order-card-footer {
    margin-top: .85rem;
    padding-top: .85rem;
    gap: .65rem;
}

.order-card-footer .btn {
    min-height: 40px;
    padding: .55rem .85rem;
    font-size: .76rem;
}

.order-view-details {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.order-view-details .material-symbols-rounded {
    font-size: 1rem;
}

/* A single connected timeline is easier to scan than nested cards. */
.track-card .status-timeline-list {
    gap: 0;
}

.track-card .status-timeline-list::before {
    left: 18px;
    top: 19px;
    bottom: 19px;
    width: 2px;
}

.track-card .status-timeline-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: .75rem;
    min-height: 64px;
}

.track-card .status-timeline-step {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-width: 1px;
    border-radius: 50%;
    box-shadow: 0 0 0 5px var(--pg-surface, #171320);
}

.track-card .status-timeline-content {
    align-self: start;
    min-height: 48px;
    padding: .28rem .15rem .85rem;
    border: 0;
    border-bottom: 1px solid var(--pg-border);
    border-radius: 0;
    background: transparent;
}

.track-card .status-timeline-item:last-child .status-timeline-content {
    border-bottom: 0;
}

.track-card .status-timeline-item.completed .status-timeline-content,
.track-card .status-timeline-item.active .status-timeline-content,
.track-card .status-timeline-item.cancelled .status-timeline-content {
    border-left: 0;
    background: transparent;
    box-shadow: none;
}

.track-card .status-timeline-item:not(.completed):not(.active) .status-timeline-content {
    opacity: .62;
}

.track-card .status-timeline-item.active .status-timeline-step {
    transform: none;
}

.track-card .status-label {
    margin: 0 0 .18rem;
    font-size: .9rem;
}

.track-card .status-timeline-item.active .status-label {
    font-size: .94rem;
}

.track-card .status-date {
    margin: 0;
    font-size: .74rem;
}

@media (max-width: 760px) {
    .site-header--focus .site-brand__name {
        display: inline;
        font-size: clamp(.86rem, 3.6vw, 1.08rem);
    }

    .site-header--focus .site-brand {
        min-width: 0;
    }

    .site-header--focus .site-header__flow {
        margin-left: auto;
    }

    .checkout-summary-card {
        top: auto;
    }

    .orders-container {
        margin-top: .75rem;
        padding: 0 .65rem 5.5rem;
        border-radius: 20px 20px 0 0;
    }

    .orders-header {
        margin: 1.35rem 0 1.5rem;
    }

    .orders-title {
        font-size: clamp(2rem, 10vw, 2.55rem);
    }

    .orders-subtitle {
        max-width: 290px;
        margin-inline: auto;
        font-size: .82rem;
        line-height: 1.5;
    }

    .orders-list {
        gap: 1rem;
    }

    .order-card {
        padding: 1rem;
        border-radius: 20px;
    }

    .order-card:hover {
        transform: none;
    }

    .order-card__top {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: .75rem;
    }

    .order-card__visuals {
        min-width: 64px;
        width: 64px;
        min-height: 64px;
        height: 64px;
        padding: .25rem;
        border-radius: 15px;
    }

    .order-card__visuals img {
        flex: 0 0 54px;
        width: 54px;
        height: 54px;
        margin-left: calc(var(--order-image-index) * -45px);
    }

    .order-card .order-number {
        font-size: 1.08rem;
    }

    .order-card .order-date {
        font-size: .69rem;
        line-height: 1.45;
    }

    .order-card .order-summary {
        grid-column: 1 / -1;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding-top: .7rem;
        border-top: 1px solid var(--pg-border);
    }

    .order-card .order-price {
        font-size: 1.35rem;
    }

    .order-delivery-meta {
        margin-top: .75rem;
    }

    .order-payment-recovery {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .order-payment-recovery .order-continue-payment {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
    }

    .order-card-footer {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-card-footer .btn {
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 560px) {
    .schedule-picker__header {
        display: grid;
    }

    .schedule-picker__selection {
        width: fit-content;
    }

    .schedule-picker__slots {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        max-height: 250px;
    }
}
/* ============================================================
   Chat, notification center, and Web Push opt-in
   ============================================================ */
.nav-notification-btn,
.mobile-bottom-nav__icon {
    position: relative;
}

.nav-notification-count,
.nav-chat-count {
    position: absolute;
    top: -0.28rem;
    right: -0.28rem;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.22rem;
    display: inline-grid;
    place-items: center;
    border: 2px solid var(--pg-bg);
    border-radius: 999px;
    background: var(--pg-danger);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1;
}

.nav-notification-count[hidden],
.nav-chat-count[hidden] { display: none !important; }

.account-menu__panel .nav-chat-count,
.mobile-nav-drawer__links .nav-chat-count {
    position: static;
    margin-left: auto;
    border: 0;
}

.push-nudge {
    position: fixed;
    z-index: 120;
    right: 1rem;
    bottom: 1rem;
    width: min(430px, calc(100vw - 2rem));
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid rgba(75, 209, 255, 0.28);
    border-radius: var(--pg-radius-lg);
    background: linear-gradient(145deg, rgba(28, 25, 44, 0.98), rgba(12, 11, 20, 0.98));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), 0 0 30px rgba(79, 118, 255, 0.12);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 220ms ease, transform 220ms ease;
}
.push-nudge.is-visible { opacity: 1; transform: translateY(0); }
.push-nudge__icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--pg-primary);
    background: rgba(34, 211, 238, 0.1);
}
.push-nudge strong { display: block; margin-bottom: 0.22rem; }
.push-nudge p { margin: 0; color: var(--pg-text-muted); font-size: 0.82rem; line-height: 1.5; }
.push-nudge__actions { grid-column: 1 / -1; display: flex; gap: 0.5rem; justify-content: flex-end; }

.chat-page,
.notification-page {
    max-width: 1040px;
    padding-top: clamp(1.5rem, 4vw, 3.5rem);
    padding-bottom: 5rem;
}
.chat-page__header,
.notification-page__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.chat-page__header h1,
.notification-page__header h1 {
    margin: 0.2rem 0 0.45rem;
    font-size: clamp(2rem, 6vw, 3.4rem);
    letter-spacing: -0.055em;
}
.chat-page__header p,
.notification-page__header p { margin: 0; color: var(--pg-text-muted); }
.chat-human-btn { flex: 0 0 auto; }

.chat-shell {
    min-height: min(690px, calc(100dvh - 12rem));
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    overflow: hidden;
    border: 1px solid var(--pg-border-strong);
    border-radius: clamp(18px, 3vw, 26px);
    background:
        radial-gradient(circle at 80% -10%, rgba(231, 65, 181, 0.08), transparent 24rem),
        linear-gradient(160deg, rgba(25, 22, 38, 0.98), rgba(11, 10, 18, 0.98));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}
.chat-identity-note {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.72rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--pg-border);
    background: rgba(255, 255, 255, 0.018);
}
.chat-identity-note > .material-symbols-rounded {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #8ceaff;
    background: rgba(34, 211, 238, 0.1);
}
.chat-identity-note strong { display: block; font-size: 0.86rem; }
.chat-identity-note p { margin: 0.16rem 0 0; color: var(--pg-text-soft); font-size: 0.75rem; }
.chat-state-chip {
    padding: 0.3rem 0.58rem;
    border: 1px solid var(--pg-border-strong);
    border-radius: 999px;
    color: var(--pg-text-muted);
    font-size: 0.66rem;
    font-weight: 700;
}
.chat-state-chip.is-ai { color: #8ceaff; border-color: rgba(34, 211, 238, 0.3); background: rgba(34, 211, 238, 0.08); }
.chat-state-chip.is-human { color: #d8c6ff; border-color: rgba(157, 103, 255, 0.34); background: rgba(157, 103, 255, 0.1); }

.chat-messages {
    min-height: 320px;
    max-height: calc(100dvh - 20rem);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.1rem;
    scroll-behavior: smooth;
}
.chat-message { max-width: min(78%, 660px); }
.chat-message--customer { align-self: flex-end; }
.chat-message--ai,
.chat-message--admin,
.chat-message--system { align-self: flex-start; }
.chat-message__meta {
    margin: 0 0.45rem 0.3rem;
    color: var(--pg-text-soft);
    font-size: 0.67rem;
}
.chat-message--customer .chat-message__meta { text-align: right; }
.chat-message__bubble {
    padding: 0.78rem 0.92rem;
    border: 1px solid var(--pg-border);
    border-radius: 6px 18px 18px 18px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--pg-text);
    font-size: 0.91rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.chat-message--customer .chat-message__bubble {
    border-radius: 18px 6px 18px 18px;
    border-color: rgba(90, 109, 255, 0.35);
    background: linear-gradient(135deg, rgba(35, 190, 240, 0.18), rgba(136, 75, 239, 0.2));
}
.chat-message--admin .chat-message__bubble {
    border-color: rgba(229, 68, 184, 0.28);
    box-shadow: inset 3px 0 #df4bc0;
}
.chat-message--system .chat-message__bubble {
    color: var(--pg-text-muted);
    border-style: dashed;
    background: rgba(255, 255, 255, 0.02);
}
.chat-welcome,
.chat-error {
    margin: auto;
    max-width: 440px;
    padding: 1.2rem;
    text-align: center;
    color: var(--pg-text-muted);
}
.chat-welcome .material-symbols-rounded { display: block; margin-bottom: 0.55rem; color: #ffd36d; font-size: 2rem; }
.chat-welcome strong { display: block; color: var(--pg-text); font-size: 1.05rem; }
.chat-welcome p { margin: 0.35rem 0 0; line-height: 1.55; font-size: 0.85rem; }
.chat-loading { margin: auto; display: flex; gap: 0.3rem; }
.chat-loading span { width: 7px; height: 7px; border-radius: 50%; background: var(--pg-primary); animation: pg-chat-dot 900ms ease-in-out infinite alternate; }
.chat-loading span:nth-child(2) { animation-delay: 150ms; }
.chat-loading span:nth-child(3) { animation-delay: 300ms; }
@keyframes pg-chat-dot { to { opacity: 0.3; transform: translateY(-4px); } }

.chat-composer {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 0.6rem;
    margin: 0 0.9rem;
    padding: 0.55rem;
    border: 1px solid var(--pg-border-strong);
    border-radius: 18px;
    background: rgba(6, 5, 11, 0.75);
}
.chat-composer > label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    pointer-events: none;
}
.chat-composer textarea {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-height: 42px;
    max-height: 144px;
    resize: none;
    border: 0;
    outline: 0;
    padding: 0.65rem 0.72rem;
    background: transparent;
    color: var(--pg-text);
    font: inherit;
    line-height: 1.45;
}
.chat-send-btn {
    grid-column: 2;
    grid-row: 1;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: var(--pg-gradient-primary);
    cursor: pointer;
}
.chat-composer.is-sending .chat-send-btn { opacity: 0.55; }
.chat-composer-note { margin: 0.5rem 1.15rem 0.9rem; color: var(--pg-text-soft); font-size: 0.68rem; }

/* Full-height support chat: the page stays still and only the transcript scrolls. */
html:has(body.chat-app-body) {
    height: 100%;
    overflow: hidden;
}
body.chat-app-body {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-bottom: 0 !important;
}
.chat-app-body > .site-header { flex: 0 0 auto; }
.chat-app-body > .footer { display: none; }
.chat-app-body .chat-page {
    width: min(100%, 1040px);
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-top: clamp(0.75rem, 2vh, 1.5rem);
    padding-bottom: clamp(0.75rem, 2vh, 1.25rem);
}
.chat-app-body .chat-page__header {
    flex: 0 0 auto;
    align-items: center;
    margin-bottom: 0.75rem;
}
.chat-page__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}
.chat-app-body .chat-page__header h1 { font-size: clamp(1.65rem, 4vh, 2.65rem); }
.chat-app-body .chat-shell {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
}
.chat-app-body .chat-messages {
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
.chat-composer {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: end;
}
.chat-composer textarea {
    display: block;
    min-width: 0;
    min-height: 44px;
    max-height: 132px;
    overflow-y: auto;
    resize: none;
}
.chat-send-btn {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
}
.chat-message.is-pending { opacity: 0.72; }
.chat-message.is-failed .chat-message__bubble {
    border-color: color-mix(in srgb, var(--pg-danger) 65%, transparent);
}
.chat-message__bubble--markdown { white-space: normal; }
.chat-message__bubble--markdown > :first-child { margin-top: 0; }
.chat-message__bubble--markdown > :last-child { margin-bottom: 0; }
.chat-message__bubble--markdown p { margin: 0.45rem 0; }
.chat-message__bubble--markdown ul,
.chat-message__bubble--markdown ol { margin: 0.45rem 0; padding-left: 1.35rem; }
.chat-message__bubble--markdown li + li { margin-top: 0.22rem; }
.chat-message__bubble--markdown h3,
.chat-message__bubble--markdown h4,
.chat-message__bubble--markdown h5 { margin: 0.65rem 0 0.3rem; line-height: 1.25; }
.chat-message__bubble--markdown code {
    padding: 0.1rem 0.3rem;
    border-radius: 5px;
    background: rgba(255,255,255,.08);
    font: 0.88em ui-monospace, SFMono-Regular, Consolas, monospace;
}
.chat-message__bubble--markdown pre {
    overflow-x: auto;
    padding: 0.7rem;
    border-radius: 10px;
    background: rgba(0,0,0,.3);
}
.chat-message__bubble--markdown pre code { padding: 0; background: none; }
.chat-message__bubble--markdown blockquote {
    margin: 0.5rem 0;
    padding-left: 0.7rem;
    border-left: 3px solid var(--pg-primary);
    color: var(--pg-text-muted);
}
.chat-message__bubble--markdown a { color: #76ddff; }

.push-setup-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: var(--pg-radius-lg);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(128, 77, 241, 0.08)), var(--pg-surface);
}
.push-setup-card__icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: var(--pg-primary);
    background: rgba(34, 211, 238, 0.12);
}
.push-setup-card__copy h2 { margin: 0.15rem 0 0.35rem; font-size: 1.2rem; }
.push-setup-card__copy p { margin: 0; color: var(--pg-text-muted); font-size: 0.84rem; line-height: 1.55; }
.push-setup-card__copy .push-setup-card__status { margin-top: 0.4rem; color: #8ceaff; font-size: 0.75rem; }
.push-setup-card__actions { display: flex; flex-direction: column; gap: 0.42rem; min-width: 190px; }

.android-floating-guide {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 1rem;
    padding: 1.15rem;
    margin: 0 0 1rem;
    border-color: rgba(251, 191, 36, 0.28);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.07), rgba(236, 72, 153, 0.06)), var(--pg-surface);
}
.android-floating-guide[hidden] { display: none; }
.android-floating-guide__icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ffd778;
    background: rgba(251, 191, 36, 0.11);
}
.android-floating-guide__copy h2 { margin: 0.15rem 0 0.35rem; font-size: 1.2rem; }
.android-floating-guide__copy p,
.android-floating-guide__copy li { color: var(--pg-text-muted); font-size: 0.82rem; line-height: 1.55; }
.android-floating-guide__copy p { margin: 0; }
.android-floating-guide__copy ol { margin: 0.65rem 0; padding-left: 1.25rem; }
.android-floating-guide__copy li + li { margin-top: 0.22rem; }
.android-floating-guide__warning {
    margin-top: 0.75rem;
    padding: 0.72rem 0.8rem;
    border: 1px solid rgba(251, 191, 36, 0.24);
    border-radius: 12px;
    color: #ffe29a;
    background: rgba(251, 191, 36, 0.075);
    font-size: 0.79rem;
    line-height: 1.5;
}
.android-floating-guide__screenshots {
    margin: 0.85rem 0;
    border: 1px solid var(--pg-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    overflow: hidden;
}
.android-floating-guide__screenshots summary {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 0.85rem;
    color: var(--pg-text);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    list-style: none;
}
.android-floating-guide__screenshots summary::-webkit-details-marker { display: none; }
.android-floating-guide__screenshots summary .material-symbols-rounded { color: #ffd778; font-size: 1.15rem; }
.android-floating-guide__screen-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0 0.75rem 0.75rem;
}
.android-floating-guide__screen-grid figure { margin: 0; min-width: 0; }
.android-floating-guide__screen-grid img {
    display: block;
    width: 100%;
    max-height: 460px;
    object-fit: contain;
    object-position: top;
    border-radius: 12px;
    background: #000;
}
.android-floating-guide__screen-grid figcaption {
    padding: 0.5rem 0.15rem 0;
    color: var(--pg-text-muted);
    font-size: 0.72rem;
    line-height: 1.45;
}
.android-floating-guide__status { color: #ffd778 !important; font-size: 0.74rem !important; }
.android-floating-guide__actions { display: flex; flex-direction: column; gap: 0.45rem; min-width: 190px; }
.android-floating-guide.is-confirmed { border-color: rgba(52, 211, 153, 0.3); }
.android-floating-guide.is-confirmed .android-floating-guide__icon { color: #7ff0c2; background: rgba(52, 211, 153, 0.11); }
.android-floating-guide.is-confirmed .android-floating-guide__status { color: #7ff0c2 !important; }
.android-floating-nudge { border-color: rgba(251, 191, 36, 0.3); }
.android-floating-nudge .push-nudge__icon { color: #ffd778; background: rgba(251, 191, 36, 0.11); }

.notification-preferences {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 0.7fr)) auto;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    margin-bottom: 2rem;
}
.notification-preferences h2 { margin: 0 0 0.25rem; font-size: 1rem; }
.notification-preferences p { margin: 0; color: var(--pg-text-soft); font-size: 0.76rem; }
.notification-toggle {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem;
    border: 1px solid var(--pg-border);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.022);
    cursor: pointer;
}
.notification-toggle input { width: 18px; height: 18px; accent-color: var(--pg-primary); }
.notification-toggle span { display: grid; gap: 0.18rem; }
.notification-toggle strong { font-size: 0.78rem; }
.notification-toggle small { color: var(--pg-text-soft); font-size: 0.66rem; line-height: 1.35; }

.notification-list { display: grid; gap: 0.6rem; }
.notification-item {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--pg-border);
    border-radius: 16px;
    background: var(--pg-surface);
    color: var(--pg-text);
    text-decoration: none;
    transition: transform var(--pg-transition), border-color var(--pg-transition), background var(--pg-transition);
}
.notification-item:hover { transform: translateY(-1px); border-color: var(--pg-border-strong); opacity: 1; }
.notification-item.is-unread { border-color: rgba(34, 211, 238, 0.28); background: linear-gradient(120deg, rgba(34, 211, 238, 0.06), transparent), var(--pg-surface); }
.notification-item__icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #8ceaff;
    background: rgba(34, 211, 238, 0.09);
}
.notification-item__copy { min-width: 0; }
.notification-item__copy strong { display: block; margin-bottom: 0.22rem; font-size: 0.88rem; }
.notification-item__copy p { margin: 0 0 0.25rem; color: var(--pg-text-muted); font-size: 0.8rem; line-height: 1.45; }
.notification-item__copy time { color: var(--pg-text-soft); font-size: 0.67rem; }
.notification-item__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pg-primary); box-shadow: 0 0 12px var(--pg-primary); }

@media (max-width: 900px) {
    .notification-preferences { grid-template-columns: 1fr 1fr; }
    .notification-preferences > div:first-child,
    .notification-preferences > .btn { grid-column: 1 / -1; }
    .push-setup-card { grid-template-columns: auto 1fr; }
    .push-setup-card__actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; min-width: 0; }
    .android-floating-guide { grid-template-columns: auto 1fr; }
    .android-floating-guide__actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; min-width: 0; }
}

@media (max-width: 760px) {
    .mobile-bottom-nav--logged-in { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .mobile-bottom-nav--guest { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .push-nudge { bottom: calc(5.2rem + env(safe-area-inset-bottom)); }
    .android-floating-nudge .push-nudge__actions .btn { flex: 1; }
    .android-floating-guide__screen-grid { grid-template-columns: 1fr; }
    .android-floating-guide__screen-grid img { max-height: 520px; }
    .chat-page,
    .notification-page { padding: 1rem 0.75rem calc(6rem + env(safe-area-inset-bottom)); }
    .chat-page__header,
    .notification-page__header { align-items: flex-start; }
    .chat-page__header p,
    .notification-page__header p { font-size: 0.82rem; }
    .chat-human-btn { padding-inline: 0.75rem; }
    .chat-shell { min-height: calc(100dvh - 12.5rem); border-radius: 18px; }
    .chat-identity-note { grid-template-columns: auto 1fr; }
    .chat-state-chip { grid-column: 2; justify-self: start; }
    .chat-messages { max-height: none; padding: 0.85rem; }
    .chat-message { max-width: 88%; }
    .notification-page__header { flex-wrap: wrap; }
    .push-setup-card { grid-template-columns: 1fr; text-align: left; }
    .push-setup-card__actions { grid-column: auto; display: grid; }
    .notification-preferences { grid-template-columns: 1fr; }
    .notification-preferences > div:first-child,
    .notification-preferences > .btn { grid-column: auto; }
}

@media (max-width: 760px) {
    .chat-app-body .chat-page {
        padding: 0.65rem 0.65rem calc(4.85rem + env(safe-area-inset-bottom));
    }
    .chat-app-body .chat-page__header {
        display: flex;
        align-items: center;
        margin-bottom: 0.55rem;
    }
    .chat-app-body .chat-page__header h1 { font-size: 1.35rem; margin-bottom: 0.2rem; }
    .chat-app-body .chat-page__header p { display: none; }
    .chat-page__actions { flex-wrap: nowrap; }
    .chat-page__actions .btn {
        min-height: 38px;
        padding: 0.45rem 0.65rem;
        font-size: 0.72rem;
    }
    .chat-app-body .chat-shell { min-height: 0; border-radius: 16px; }
    .chat-identity-note { padding: 0.65rem 0.75rem; }
    .chat-identity-note p { display: none; }
    .chat-composer { margin: 0 0.55rem; padding: 0.4rem; border-radius: 15px; }
    .chat-composer-note { margin: 0.35rem 0.75rem 0.55rem; }
}

@media (max-width: 480px) {
    .chat-page__header { display: grid; }
    .chat-human-btn { justify-self: start; }
    .push-nudge { right: 0.65rem; width: calc(100vw - 1.3rem); }
    .push-nudge__actions { justify-content: stretch; }
    .push-nudge__actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .chat-loading span { animation: none; }
}
