/* ==========================================================================
   DRIP CLIENT — main stylesheet
   Dark purple/pink neon gaming-store theme with glassmorphism.
   ========================================================================== */

:root {
    --bg-deep: #120a1f;
    --bg-purple: #1c0f2e;
    --bg-purple-2: #2a1442;
    --pink: #ff1fb0;
    --pink-2: #ff5ec4;
    --pink-soft: rgba(255, 31, 176, 0.35);
    --violet: #7c3aed;
    --glass: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f3ecfb;
    --text-muted: #b9a9d0;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --header-h: 64px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background:
        radial-gradient(ellipse 600px 400px at 15% 0%, rgba(124, 58, 237, 0.35), transparent 60%),
        radial-gradient(ellipse 500px 500px at 100% 15%, rgba(255, 31, 176, 0.18), transparent 55%),
        linear-gradient(180deg, #1a0e2c 0%, #150b24 40%, #0f0819 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---- Petals / floating particles background ---- */
#petals-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.petal {
    position: absolute;
    top: -40px;
    background: linear-gradient(135deg, var(--pink-2), var(--violet));
    border-radius: 100% 0 100% 0;
    opacity: 0.55;
    filter: blur(0.2px);
    animation-name: petal-fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
}

@keyframes petal-fall {
    0%   { transform: translateY(-5vh) translateX(0) rotate(0deg); }
    50%  { transform: translateY(50vh) translateX(20px) rotate(180deg); }
    100% { transform: translateY(110vh) translateX(-10px) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .petal { animation: none; display: none; }
    * { scroll-behavior: auto !important; }
}

/* ---- Header ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: var(--header-h);
    height: auto;
    display: block;
    background: rgba(18, 10, 31, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--glass-border);
}

.site-header .container {
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.5px;
    white-space: nowrap;

    /* Allow the brand area to give up space to the action buttons on narrow screens. */
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

/* The store name is the only flexible part of the brand. It truncates instead
   of pushing the Search / Account / Cart controls into each other. */
.brand > span:not(.verified) {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand img.logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    box-shadow: 0 0 14px var(--pink-soft);
}

.brand .verified {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--pink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px var(--pink-soft);
    flex-shrink: 0;
}
.brand .verified svg { width: 12px; height: 12px; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;

    /* Keep all three actions together and pinned to the right. */
    flex: 0 0 auto;
    flex-shrink: 0;
    margin-left: auto;
}

/* Prevent flex shrinking from changing the size or spacing of individual actions. */
.header-actions .icon-btn {
    flex: 0 0 40px;
    flex-shrink: 0;
}

/* Keep the search button's visual halo contained so it cannot appear to touch
   the account/profile button. */
#search-toggle {
    box-shadow: 0 0 10px rgba(255, 31, 176, 0.14);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    position: relative;
    transition: transform .15s ease, background .15s ease;
}
.icon-btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.1); }
.icon-btn:active { transform: scale(0.94); }

.icon-btn.cart {
    background: var(--pink);
    box-shadow: 0 0 16px var(--pink-soft);
    border: none;
}

.icon-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #fff;
    color: #1c0f2e;
    font-size: 11px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.icon-btn.avatar {
    background: var(--violet);
    font-weight: 700;
    font-size: 15px;
}

/* ---- Search bar ----
   Hidden by default. It appears below the logo + action-menu row only after
   the Search button is clicked. */
.search-bar-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: max-height .28s ease, opacity .2s ease, transform .28s ease, padding-bottom .28s ease;
}
.search-bar-wrap.open {
    max-height: 120px;
    padding-bottom: 10px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* The search field itself lives on the second row, below the logo and
   Search/Profile/Cart buttons. */
.search-bar-inner {
    overflow: hidden;
    max-height: 80px;
}
.search-bar-wrap.open .search-bar-inner { max-height: 80px; }

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid var(--pink);
    border-radius: 999px;
    padding: 10px 18px;
    box-shadow: 0 0 18px var(--pink-soft);
    margin-top: 10px;
}
.search-bar input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 15px;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar svg { flex-shrink: 0; color: var(--pink-2); }

#search-results {
    position: relative;
    z-index: 40;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    margin-top: 8px;
}
.search-result-item img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; }
.search-empty { color: var(--text-muted); text-align: center; padding: 24px 0; }

/* ---- Hero ---- */
.hero { position: relative; z-index: 2; padding: 24px 0 8px; }
.hero-banner {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.25);
}
.hero-banner img { width: 100%; }

.hero-heading {
    font-size: 32px;
    font-weight: 900;
    text-align: center;
    line-height: 1.15;
    margin: 28px 0 14px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff, var(--pink-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    max-width: 620px;
    margin: 0 auto 26px;
    line-height: 1.6;
}

.btn-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(90deg, var(--pink), var(--pink-2));
    color: #1c0f2e;
    font-weight: 800;
    font-size: 15px;
    border: none;
    border-radius: 999px;
    padding: 16px 20px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    box-shadow: 0 0 24px var(--pink-soft);
    transition: transform .15s ease;
}
.btn-cta:hover { transform: translateY(-2px); }

/* ---- Category tiles ---- */
.category-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 26px 0;
    position: relative;
    z-index: 2;
}
.category-tile {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    position: relative;
    aspect-ratio: 1 / 1;
}
.category-tile img {
    width: 100%; height: 70%; object-fit: cover;
}
.category-tile .tile-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 10px;
    text-align: center;
    font-weight: 800;
    font-size: 14px;
    background: linear-gradient(0deg, rgba(0,0,0,.6), transparent);
}

.category-chip-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 6px 0 20px;
    position: relative;
    z-index: 2;
}
.category-chip {
    flex-shrink: 0;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1.5px solid var(--pink);
    font-weight: 700;
    font-size: 13px;
    background: rgba(255, 31, 176, 0.08);
    box-shadow: 0 0 12px var(--pink-soft);
    white-space: nowrap;
}
.category-chip.active,
.category-chip:hover { background: var(--pink); color: #1c0f2e; }

/* ---- Product grid & cards ---- */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    position: relative;
    z-index: 2;
    padding-bottom: 20px;
}
@media (min-width: 720px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
@media (min-width: 1000px) {
    .product-grid { grid-template-columns: repeat(4, 1fr); }
}

.product-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    backdrop-filter: blur(8px);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--pink-soft);
    box-shadow: 0 10px 34px rgba(124, 58, 237, 0.28), 0 0 24px rgba(255, 31, 176, 0.16);
}

.product-card .thumb-wrap {
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: #0f0819;
    border: 1px solid var(--glass-border);
}
.product-card .thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.product-card:hover .thumb-wrap img { transform: scale(1.06); }

.product-card .p-title {
    font-weight: 800;
    font-size: 13.5px;
    line-height: 1.3;
    min-height: 2.6em;
}

.price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price-old { text-decoration: line-through; color: var(--text-muted); font-size: 12px; }
.price-discount {
    background: rgba(255, 31, 176, 0.15);
    border: 1px solid rgba(255, 31, 176, 0.3);
    color: var(--pink-2);
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.2px;
}
.price-final { font-size: 19px; font-weight: 900; }
.price-note { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }

.pay-icon-row { display: flex; align-items: center; justify-content: space-between; }
.pay-icon {
    width: 28px; height: 28px; border-radius: 8px;
    background: #0f2a26;
    display: inline-flex; align-items: center; justify-content: center;
    color: #F3BA2F;
}

.btn-buy {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(90deg, var(--pink), var(--pink-2));
    color: #1c0f2e; font-weight: 800; font-size: 13px;
    border: none; border-radius: 999px; padding: 12px; width: 100%;
    box-shadow: 0 0 16px var(--pink-soft);
    transition: transform .12s ease;
}
.btn-buy:hover { transform: translateY(-1px); }
.btn-buy:active { transform: scale(0.97); }

.btn-add-cart {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: transparent; color: var(--text-main); font-weight: 700; font-size: 13px;
    border: 1px solid var(--glass-border); border-radius: 999px; padding: 11px; width: 100%;
}
.btn-add-cart:hover { border-color: var(--pink); }

.stock-badge, .delivery-badge {
    font-size: 11px; font-weight: 700;
    padding: 5px 10px; border-radius: 8px;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--glass-border);
    display: inline-flex; align-items: center; gap: 5px;
}
.delivery-badge { color: var(--pink-2); }

/* ---- Section title ---- */
.section-title {
    font-weight: 800;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 22px 0 12px;
    position: relative;
    z-index: 2;
}

/* ---- Glass panel (payment methods, info blocks) ---- */
.glass-panel {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin: 16px 0;
    position: relative;
    z-index: 2;
}
.glass-panel h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 15px; }
.glass-panel p { color: var(--text-muted); font-size: 13.5px; margin: 0; line-height: 1.5; }

/* ---- Product detail page ---- */
.product-detail-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    margin: 16px 0;
}
.product-detail h1 { font-size: 22px; margin: 0 0 10px; }
.detail-badges { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.detail-price-old { text-decoration: line-through; color: var(--text-muted); font-size: 15px; }
.detail-price-final { font-size: 30px; font-weight: 900; margin: 4px 0; }

/* ---- Cart drawer ---- */
.cart-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.55);
    z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 100%; max-width: 420px;
    background: #0f0819;
    border-left: 1px solid var(--glass-border);
    z-index: 91;
    transform: translateX(100%);
    transition: transform .25s ease;
    display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px; border-bottom: 1px solid var(--glass-border);
    font-weight: 800; font-size: 18px; letter-spacing: .5px;
}
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 18px; }
.cart-drawer-footer { padding: 18px; border-top: 1px solid var(--glass-border); }

.cart-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; height: 100%; gap: 8px; color: var(--text-muted);
}
.cart-empty svg { color: var(--pink); margin-bottom: 8px; }
.cart-empty .title { color: var(--text-main); font-weight: 700; font-size: 16px; }

.cart-line {
    display: flex; gap: 12px; align-items: center;
    padding: 12px 0; border-bottom: 1px solid var(--glass-border);
}
.cart-line img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.cart-line .info { flex: 1; }
.cart-line .name { font-weight: 700; font-size: 13.5px; }
.cart-line .price { color: var(--text-muted); font-size: 12.5px; }
.qty-control { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-control button {
    width: 26px; height: 26px; border-radius: 50%;
    background: rgba(255,255,255,.08); border: 1px solid var(--glass-border);
    color: var(--text-main); font-weight: 700;
}
.remove-line { color: #ff5c5c; background: none; border: none; font-size: 18px; }

.cart-totals-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; color: var(--text-muted); }
.cart-totals-row.total { color: var(--text-main); font-weight: 800; font-size: 17px; }

/* ---- Forms / auth ---- */
.auth-page { position: relative; z-index: 2; max-width: 480px; margin: 30px auto; padding: 0 16px; }
.auth-page h1 { text-align: center; font-size: 26px; font-weight: 900; margin-bottom: 4px; }
.auth-page .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 22px; font-size: 14px; }

.auth-card {
    background: var(--glass); border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg); padding: 20px;
}
.oauth-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 14px; border-radius: var(--radius-md);
    background: rgba(255,255,255,.03); border: 1px solid var(--glass-border);
    color: var(--text-main); font-weight: 700; font-size: 14.5px; margin-bottom: 12px;
}
.oauth-btn:hover { border-color: var(--pink); }

.divider { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 13px; margin: 16px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--glass-border); }

.form-label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.form-input {
    width: 100%; padding: 13px 14px; border-radius: var(--radius-md);
    background: rgba(255,255,255,.03); border: 1px solid var(--glass-border);
    color: var(--text-main); font-size: 14px; outline: none; margin-bottom: 14px;
}
.form-input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px var(--pink-soft); }

.btn-primary {
    width: 100%; padding: 15px; border: none; border-radius: 999px;
    background: linear-gradient(90deg, var(--pink), var(--pink-2));
    color: #1c0f2e; font-weight: 800; font-size: 15px;
    box-shadow: 0 0 20px var(--pink-soft);
}

.form-error { background: rgba(255,60,60,.12); border: 1px solid rgba(255,60,60,.4); color: #ff9d9d; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 14px; }
.form-success { background: rgba(53,224,182,.12); border: 1px solid rgba(53,224,182,.4); color: #7ff0d4; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 14px; }

/* ---- Checkout / coupon ---- */
.coupon-row { display: flex; gap: 10px; }
.coupon-row input { flex: 1; }
.btn-apply { background: var(--pink); border: none; border-radius: var(--radius-md); padding: 0 16px; color: #1c0f2e; font-weight: 800; font-size: 13px; }
.secure-badge { display: inline-flex; align-items: center; gap: 6px; color: #35e0b6; font-size: 12.5px; font-weight: 700; background: rgba(53,224,182,.1); padding: 4px 10px; border-radius: 999px; }

/* ---- Footer ---- */
.site-footer {
    position: relative; z-index: 2;
    border-top: 1px solid var(--glass-border);
    margin-top: 40px;
    padding: 28px 0;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; margin-bottom: 12px; }
.footer-brand img { width: 34px; height: 34px; border-radius: 9px; }
.site-footer p { color: var(--text-muted); font-size: 13.5px; line-height: 1.6; max-width: 480px; }
.footer-powered { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; margin-top: 10px; }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
    border-top: 1px solid var(--glass-border); margin-top: 22px; padding-top: 18px;
    color: var(--text-muted); font-size: 12.5px;
}

/* ---- Toast ---- */
#toast-container { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
    background: #1c0f2e; border: 1px solid var(--pink); box-shadow: 0 0 16px var(--pink-soft);
    color: var(--text-main); padding: 12px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
    animation: toast-in .2s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: translateY(0);} }

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.empty-state { text-align: center; color: var(--text-muted); padding: 40px 0; position: relative; z-index: 2; }
.sticky-pay-bar {
    position: sticky; top: var(--header-h); z-index: 10;
    background: linear-gradient(90deg, var(--pink), var(--pink-2));
    color: #1c0f2e; font-weight: 800; text-align: center;
    padding: 16px; border-radius: 999px; margin: 12px 0;
    box-shadow: 0 0 20px var(--pink-soft);
}

/* =====================================================================
   HOME PRODUCT VISUAL REFINEMENT — compact featured tiles + reference-style cards
   Keeps existing markup/data/links intact. Mobile-first.
   ===================================================================== */

/* The first two category/product feature tiles intentionally occupy only the
   left portion of the row, matching the compact reference composition. */
.category-tiles {
    grid-template-columns: repeat(2, clamp(128px, 39vw, 154px));
    justify-content: start;
    gap: 12px;
    margin: 18px 0 30px;
    overflow: visible;
}

.category-tile {
    aspect-ratio: 0.76 / 1;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(53, 25, 76, .94), rgba(24, 12, 42, .96));
    border: 1px solid rgba(255,255,255,.22);
    box-shadow:
        0 14px 30px rgba(0,0,0,.24),
        inset 0 0 0 1px rgba(255,255,255,.035);
}

.category-tile::after {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: -14px;
    height: 34px;
    background: radial-gradient(ellipse at center, rgba(255,31,176,.22), transparent 70%);
    filter: blur(9px);
    pointer-events: none;
}

.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(1.08) contrast(1.04);
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(18,8,32,.02) 34%, rgba(18,8,32,.12) 52%, rgba(18,8,32,.9) 100%),
        radial-gradient(circle at 50% 28%, rgba(255,31,176,.12), transparent 48%);
    pointer-events: none;
}

.category-tile .tile-label {
    z-index: 2;
    bottom: 16px;
    padding: 0 10px;
    background: none;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: .6px;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0,0,0,.8);
}

/* Reference-style product cards below the compact tiles. */
.product-grid {
    gap: 16px;
    padding-bottom: 28px;
}

.product-card {
    padding: 12px;
    gap: 10px;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,.22);
    background:
        radial-gradient(circle at 82% 7%, rgba(255,31,176,.09), transparent 28%),
        linear-gradient(145deg, rgba(41,25,61,.94), rgba(24,13,42,.96));
    box-shadow:
        0 14px 34px rgba(0,0,0,.22),
        inset 0 1px 0 rgba(255,255,255,.05);
    overflow: visible;
}

.product-card .thumb-wrap {
    aspect-ratio: 16 / 10;
    border-radius: 20px;
    border: 0;
    background: #1a0d2a;
    box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

.product-card .thumb-wrap img {
    object-fit: cover;
}

.product-card .p-title {
    font-size: 14.5px;
    line-height: 1.28;
    min-height: 2.56em;
    letter-spacing: .15px;
    text-transform: uppercase;
}

.price-row {
    min-height: 24px;
    gap: 8px;
}

.price-old {
    font-size: 12px;
    font-weight: 700;
}

.price-discount {
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 9px;
    background: rgba(255,31,176,.12);
    box-shadow: inset 0 0 0 1px rgba(255,31,176,.08), 0 5px 12px rgba(255,31,176,.08);
}

.price-final {
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: .2px;
}

.price-note {
    font-size: 12.5px;
    min-height: 18px;
}

.pay-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(243,186,47,.24);
    box-shadow: 0 5px 14px rgba(0,0,0,.18), 0 0 12px rgba(243,186,47,.10);
}

.btn-buy {
    min-height: 46px;
    margin-top: 4px;
    padding: 12px 10px;
    border-radius: 10px;
    font-size: 12.5px;
    letter-spacing: .55px;
    box-shadow: 0 9px 20px rgba(255,31,176,.22);
}

.btn-buy svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

@media (max-width: 380px) {
    .category-tiles {
        grid-template-columns: repeat(2, minmax(0, 42vw));
        gap: 10px;
    }
    .category-tile { border-radius: 24px; }
    .product-grid { gap: 10px; }
    .product-card { padding: 10px; border-radius: 22px; }
    .product-card .thumb-wrap { border-radius: 16px; }
    .product-card .p-title { font-size: 13px; }
    .price-final { font-size: 18px; }
    .btn-buy { font-size: 11px; min-height: 42px; }
}


/* Dynamic payment selection */
.payment-flow{margin:18px 0 22px;padding:16px;border:1px solid rgba(255,255,255,.10);border-radius:22px;background:linear-gradient(145deg,rgba(255,255,255,.045),rgba(236,0,153,.025));box-shadow:0 12px 34px rgba(0,0,0,.16)}
.payment-flow-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:13px;font-weight:800;letter-spacing:.4px}.payment-flow-head small{color:var(--text-muted);font-size:11px;font-weight:500;text-align:right}
.payment-regions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.payment-region,.payment-method{position:relative;border:1px solid rgba(255,255,255,.11);background:rgba(18,12,37,.7);color:var(--text);border-radius:18px;min-height:72px;padding:12px;cursor:pointer;transition:.22s ease;text-align:left}.payment-region{display:flex;align-items:center;gap:10px;justify-content:center;flex-direction:column}.payment-region-icon{font-size:23px}.payment-region strong{font-size:13px;letter-spacing:.7px}.payment-check{position:absolute;right:10px;top:10px;width:19px;height:19px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.07);font-size:11px;opacity:0}.payment-region.selected,.payment-method.selected{border-color:var(--pink);box-shadow:0 0 0 1px rgba(255,20,164,.15),0 0 22px rgba(255,20,164,.18);transform:translateY(-1px)}.payment-region.selected .payment-check,.payment-method.selected .payment-check{opacity:1;background:var(--pink)}
.payment-methods-wrap{margin-top:15px;padding-top:15px;border-top:1px solid rgba(255,255,255,.08)}.payment-step-title{font-size:11px;font-weight:800;letter-spacing:1px;color:var(--text-muted);margin-bottom:10px}.payment-methods{display:grid;gap:9px}.payment-method{min-height:58px;display:flex;align-items:center;justify-content:space-between;padding-right:38px}.method-main{display:flex;align-items:center;gap:10px}.method-main img{width:28px;height:28px;border-radius:8px;object-fit:cover}.method-meta{font-size:11px;color:var(--text-muted)}.payment-loading,.payment-empty{grid-column:1/-1;padding:15px;border-radius:14px;color:var(--text-muted);background:rgba(255,255,255,.035);font-size:12px;text-align:center}
.payment-info{margin-top:15px;padding:15px;border-radius:18px;background:rgba(0,0,0,.16);border:1px solid rgba(255,20,164,.2)}.payment-info-title{display:flex;justify-content:space-between;font-weight:800;margin-bottom:12px}.payment-info-title span{color:#7ff0d4}.payment-detail{display:flex;justify-content:space-between;gap:14px;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.06);font-size:12px}.payment-detail span{color:var(--text-muted)}.payment-amount{color:#7ff0d4;font-size:15px}.payment-address{margin-top:12px}.payment-address small{display:block;color:var(--text-muted);font-size:10px;font-weight:800;letter-spacing:1px;margin-bottom:6px}.payment-address code{display:block;word-break:break-all;padding:10px;border-radius:11px;background:rgba(0,0,0,.22);font-size:11px}.payment-address button{margin-top:8px;width:100%;padding:10px;border-radius:11px;border:1px solid rgba(255,20,164,.45);background:rgba(255,20,164,.09);color:var(--text);font-weight:800;cursor:pointer}.payment-instructions,.payment-submit-status{margin-top:11px;color:var(--text-muted);font-size:12px;line-height:1.5}

/* Transaction ID is required before manual payment submission */
.transaction-id-box{margin-top:16px;padding:14px;border:1px solid rgba(236,40,169,.45);border-radius:18px;background:rgba(18,10,31,.58)}
.transaction-id-box label{display:block;font-weight:800;letter-spacing:.06em;font-size:.82rem;margin-bottom:9px}.transaction-id-box label span{color:#ff2aa9}.transaction-id-box input{width:100%;box-sizing:border-box;border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.045);color:#fff;border-radius:13px;padding:13px 14px;font:inherit;outline:none}.transaction-id-box input:focus{border-color:#ec28a9;box-shadow:0 0 0 3px rgba(236,40,169,.13)}.transaction-id-box small{display:block;margin-top:8px;color:rgba(255,255,255,.6);line-height:1.4}
/* Checkout payment action — compact, premium CTA that stays inside the payment flow. */
.payment-action-wrap{margin-top:18px;width:100%}
.payment-info .payment-action-wrap{margin:18px 0 12px}
.payment-continue-btn{
    width:100%; min-height:62px; border:1px solid rgba(255,255,255,.10);
    border-radius:18px; padding:9px 16px; font:inherit; font-weight:900;
    letter-spacing:.02em; display:grid; grid-template-columns:42px 1fr auto;
    align-items:center; gap:10px; text-align:left;
    background:linear-gradient(135deg,#ff3bb6 0%,#ec0d92 55%,#c40a79 100%);
    color:#1a1020; box-shadow:0 12px 30px rgba(236,40,169,.28), inset 0 1px 0 rgba(255,255,255,.22);
    cursor:pointer; transition:transform .2s ease,opacity .2s ease,filter .2s ease,box-shadow .2s ease;
}
.payment-btn-icon{
    width:38px;height:38px;border-radius:12px;display:flex;align-items:center;justify-content:center;
    background:rgba(255,255,255,.20);font-size:16px;font-weight:950;box-shadow:inset 0 1px 0 rgba(255,255,255,.18);
}
.payment-btn-label{font-size:13px;line-height:1.15}
.payment-btn-total{font-size:11px;opacity:.72;white-space:nowrap;text-align:right}
.payment-continue-btn:hover{transform:translateY(-2px);box-shadow:0 16px 34px rgba(236,40,169,.34),inset 0 1px 0 rgba(255,255,255,.24)}
.payment-continue-btn:active{transform:scale(.985)}
.payment-continue-btn:disabled{opacity:.55;cursor:not-allowed;filter:saturate(.65);transform:none}
@media(max-width:420px){
    .payment-continue-btn{grid-template-columns:38px 1fr auto;padding:8px 12px}
    .payment-btn-icon{width:34px;height:34px;border-radius:10px}
    .payment-btn-label{font-size:12px}
}


/* ==========================================================================
   Glassmorphism checkout + scroll-reveal motion
   ========================================================================== */
.payment-flow {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 28px;
    background:
        radial-gradient(circle at 12% 0%, rgba(255,31,176,.16), transparent 30%),
        radial-gradient(circle at 90% 100%, rgba(64,116,255,.16), transparent 34%),
        linear-gradient(145deg, rgba(37,24,62,.78), rgba(12,13,34,.72));
    box-shadow: 0 22px 60px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.payment-flow::before {
    content: '';
    position: absolute;
    inset: -40% auto auto -10%;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(168,72,255,.13);
    filter: blur(50px);
    pointer-events: none;
}
.payment-continue-btn {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.34);
    background: linear-gradient(110deg, rgba(255,31,176,.94), rgba(118,68,255,.95), rgba(0,205,255,.92));
    box-shadow: 0 12px 34px rgba(123,52,255,.30), 0 0 28px rgba(255,31,176,.20);
    transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}
.payment-continue-btn::after {
    content: '';
    position: absolute;
    top: -40%; left: -30%;
    width: 28%; height: 180%;
    transform: rotate(20deg) translateX(-180%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent);
    transition: transform .65s ease;
}
.payment-continue-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.005);
    box-shadow: 0 16px 42px rgba(123,52,255,.40), 0 0 36px rgba(255,31,176,.28);
    filter: saturate(1.12);
}
.payment-continue-btn:hover:not(:disabled)::after { transform: rotate(20deg) translateX(620%); }
.payment-continue-btn:active:not(:disabled) { transform: translateY(0) scale(.995); }
.payment-success-pulse { animation: paymentSuccessPulse .65s ease both; }
@keyframes paymentSuccessPulse {
    0% { transform: scale(1); }
    45% { transform: scale(1.018); box-shadow: 0 0 0 8px rgba(53,224,182,.08), 0 0 48px rgba(53,224,182,.34); }
    100% { transform: scale(1); }
}

.product-scroll-animate {
    /* IMPORTANT: product cards are never hidden. Animation is visual only. */
    opacity: 1 !important;
    visibility: visible !important;
    transform: none;
    filter: none;
    will-change: transform, opacity, filter;
}
.product-scroll-animate.is-visible {
    animation: productScrollEntrance .72s cubic-bezier(.22,1,.36,1) var(--reveal-delay, 0ms) both,
               productGlassSettle .7s cubic-bezier(.22,1,.36,1) calc(var(--reveal-delay, 0ms) + 80ms) both;
}
@keyframes productScrollEntrance {
    0% { opacity: .72; transform: translate3d(0, 22px, 0) scale(.985); filter: blur(2px); }
    100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); }
}
@keyframes productGlassSettle {
    0% { box-shadow: 0 0 0 rgba(0,0,0,0); }
    55% { box-shadow: 0 18px 45px rgba(124,58,237,.18), 0 0 24px rgba(255,31,176,.10); }
    100% { box-shadow: 0 14px 34px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.05); }
}
.order-card-highlight {
    animation: orderHighlight 1.15s ease both;
}
@keyframes orderHighlight {
    0%,100% { transform: translateY(0); }
    35% { transform: translateY(-3px); box-shadow: 0 0 0 2px rgba(255,31,176,.22), 0 20px 55px rgba(124,58,237,.28); }
}
@media (prefers-reduced-motion: reduce) {
    .product-scroll-animate { opacity: 1 !important; visibility: visible !important; transform: none; filter: none; }
    .product-scroll-animate.is-visible,
    .order-card-highlight,
    .payment-success-pulse { animation: none; }
}


/* ---- Premium horizontal similar-products carousel ---- */
.similar-products-head {
    display:flex; align-items:flex-end; justify-content:space-between; gap:14px;
    margin:28px 0 12px;
    position:relative; z-index:2;
}
.similar-products-head .section-title { margin:0; }
.similar-products-subtitle {
    margin:5px 0 0; color:var(--text-muted); font-size:11px;
}
.similar-products-controls { display:flex; gap:8px; flex-shrink:0; }
.similar-scroll-btn {
    width:38px; height:38px; border-radius:50%; border:1px solid rgba(255,255,255,.15);
    background:rgba(255,255,255,.055); color:#fff; font-size:18px; cursor:pointer;
    backdrop-filter:blur(12px); box-shadow:0 8px 22px rgba(0,0,0,.18);
    transition:transform .18s ease, background .18s ease, border-color .18s ease;
}
.similar-scroll-btn:hover { transform:translateY(-2px); background:rgba(255,31,176,.14); border-color:var(--pink); }
.similar-products-carousel {
    position:relative; z-index:2; overflow-x:auto; overflow-y:visible;
    margin:0 -2px 26px; padding:4px 2px 18px;
    scrollbar-width:none; overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    scroll-behavior:smooth;
}
.similar-products-carousel::-webkit-scrollbar { display:none; }
.similar-products-carousel::before,
.similar-products-carousel::after {
    content:""; position:absolute; top:0; bottom:18px; width:34px; z-index:3; pointer-events:none;
}
.similar-products-carousel::before { left:0; background:linear-gradient(90deg, rgba(18,8,32,.95), transparent); }
.similar-products-carousel::after { right:0; background:linear-gradient(270deg, rgba(18,8,32,.95), transparent); }
.similar-products-track {
    display:flex; align-items:stretch; gap:14px; width:max-content; padding:0 8px;
}
.similar-product-item {
    width:min(78vw, 300px); flex:0 0 min(78vw, 300px);
    scroll-snap-align:start;
}
.similar-product-item .product-card { height:100%; box-sizing:border-box; }
.similar-products-carousel.is-dragging { cursor:grabbing; scroll-behavior:auto; }
.similar-products-carousel.is-dragging * { user-select:none; }
@media (min-width:720px) {
    .similar-product-item { width:280px; flex-basis:280px; }
}
@media (max-width:520px) {
    .similar-products-head { align-items:center; }
    .similar-products-controls { display:none; }
    .similar-products-subtitle { font-size:10.5px; }
    .similar-product-item { width:82vw; flex-basis:82vw; }
}

/* ---- Similar products: horizontal swipe/drag only ---- */
.similar-products-carousel {
    touch-action: pan-x pan-y;
    cursor: grab;
}
.similar-product-item {
    opacity: 1;
    transform: none;
    filter: none;
}
.similar-products-carousel.is-dragging { cursor: grabbing; }


