/* ==========================================================================
   SHOP PAGE STYLES
   ========================================================================== */

.shop-notice {
    background: linear-gradient(120deg, var(--color-brand), var(--color-brand-light));
    color: #fff;
    text-align: center;
    padding: 1.1rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    margin-top: 88px; /* clears the fixed site header so text doesn't overlap the nav */
    position: relative;
    z-index: 1;
}

.shop-notice strong { font-weight: 700; }

/* ---- Category folders ---- */

.shop-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    margin-top: var(--spacing-sm);
}

.category-card {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2.2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-card:hover,
.category-card.active {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent-light);
}

.category-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(30, 144, 255, 0.1);
    color: var(--color-brand);
}

.category-icon svg { width: 32px; height: 32px; }

.category-card h3 { margin-bottom: 0.3rem; }

.category-price {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-accent);
    background: rgba(30, 144, 255, 0.08);
    padding: 0.25rem 0.9rem;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    margin-top: 0.4rem;
}

/* ---- Item grid (shown after selecting a category) ---- */

.shop-items-wrap { display: none; margin-top: var(--spacing-md); }
.shop-items-wrap.active { display: block; }

.shop-items-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.back-to-categories {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    padding: 0.5rem 1.1rem;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-text);
    cursor: pointer;
    transition: background 0.2s ease;
    flex-shrink: 0;
}
.back-to-categories:hover { background: var(--color-border); }

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.item-card {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: visible;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.item-thumb-img,
.item-card > .item-thumb {
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
}

.item-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

.item-thumb {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
}

.item-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.item-body h4 { font-family: var(--font-heading); font-size: 1.02rem; color: var(--color-text); margin: 0; }
.item-price { font-family: var(--font-heading); font-weight: 600; color: var(--color-brand); font-size: 1.05rem; }

.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    overflow: hidden;
    width: fit-content;
}
.qty-control button {
    width: 32px; height: 32px;
    border: none;
    background: var(--color-bg);
    color: var(--color-brand);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
}
.qty-control button:hover { background: var(--color-border); }
.qty-control input {
    width: 34px;
    text-align: center;
    border: none;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text);
    background: transparent;
    -moz-appearance: textfield;
}
.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.add-to-cart-btn {
    margin-top: auto;
    background: var(--btn-bg);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.6rem 1rem;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.92rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: background 0.2s ease;
}
.add-to-cart-btn:hover { background: var(--btn-hover); }
.add-to-cart-btn.added { background: #16a34a; }

/* ---- Playful image-based product cards ---- */

.item-card {
    position: relative;
    cursor: default;
}

.item-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 2px;
    background: linear-gradient(135deg, #fbbf24, #ec4899, #38bdf8, #34d399);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.item-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-7px) rotate(-0.6deg);
}

.item-card:hover::before { opacity: 1; }

.item-thumb-img {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(135deg, #fef9c3, #fce7f3);
    cursor: zoom-in;
}

.item-thumb-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.item-card:hover .item-thumb-img img {
    transform: scale(1.12) rotate(1.5deg);
}

.item-thumb-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    transform: scale(0.85);
    opacity: 0;
    transition: all 0.25s ease;
}

.item-card:hover .item-thumb-icon {
    opacity: 1;
    transform: scale(1) rotate(12deg);
}

.item-card .add-to-cart-btn {
    transition: background 0.2s ease, transform 0.15s ease;
}
.item-card .add-to-cart-btn:active { transform: scale(0.95); }

/* ---- Load more button ---- */

.load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    grid-column: 1 / -1;
}

.load-more-btn {
    background: var(--color-bg-alt);
    border: 2px dashed var(--color-accent-light);
    color: var(--color-brand);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.7rem 1.6rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.25s ease;
}
.load-more-btn:hover {
    background: var(--color-brand);
    color: #fff;
    border-color: var(--color-brand);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ---- Quick-view lightbox ---- */

.quickview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
}
.quickview-overlay.open { opacity: 1; visibility: visible; }

.quickview-card {
    background: var(--color-bg);
    border-radius: var(--radius);
    max-width: 560px;
    width: 100%;
    display: flex;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    transform: scale(0.92) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.quickview-overlay.open .quickview-card { transform: scale(1) translateY(0); }

.quickview-image-wrap {
    flex: 0 0 45%;
    background: linear-gradient(135deg, #fef9c3, #fce7f3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.quickview-image-wrap img { width: 100%; height: 100%; object-fit: cover; }

.quickview-info {
    flex: 1;
    padding: 1.8rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.quickview-info h4 { font-family: var(--font-heading); font-size: 1.2rem; margin: 0; }

.quickview-close {
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
    background: rgba(255, 255, 255, 0.85);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
    transition: transform 0.2s ease;
}
.quickview-close:hover { transform: rotate(90deg); }

@media (max-width: 560px) {
    .quickview-card { flex-direction: column; max-height: 90vh; overflow-y: auto; }
    .quickview-image-wrap { flex: 0 0 auto; aspect-ratio: 1 / 1; }
}

/* ==========================================================================
   HI-TECH / CYBER SHOP THEME
   ========================================================================== */

.cyber-banner {
    position: relative;
    overflow: hidden;
}
.cyber-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(6, 10, 30, 0.82), rgba(15, 23, 60, 0.7) 45%, rgba(6, 182, 212, 0.35));
    z-index: 1;
}

.hero-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.cyber-grid-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(rgba(56, 189, 248, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.18) 1px, transparent 1px);
    background-size: 42px 42px;
    animation: gridDrift 14s linear infinite;
    mask-image: radial-gradient(ellipse at center, #000 40%, transparent 85%);
}
@keyframes gridDrift {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 42px 42px, 42px 42px; }
}

.cyber-chip {
    position: relative;
    z-index: 3;
    border: 1px solid rgba(252, 211, 77, 0.5);
    box-shadow: 0 0 14px rgba(252, 211, 77, 0.35);
    animation: chipPulse 2.4s ease-in-out infinite;
}
@keyframes chipPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(252, 211, 77, 0.3); }
    50% { box-shadow: 0 0 20px rgba(252, 211, 77, 0.65); }
}

/* Glitch title */
.glitch-title {
    position: relative;
    color: #fff;
    text-shadow: 0 0 18px rgba(56, 189, 248, 0.55), 0 0 42px rgba(236, 72, 153, 0.25);
}
.glitch-title::before,
.glitch-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    overflow: hidden;
    background: transparent;
}
.glitch-title::before {
    color: #38bdf8;
    z-index: -1;
    animation: glitchShift1 5s infinite linear;
    clip-path: inset(0 0 0 0);
}
.glitch-title::after {
    color: #ec4899;
    z-index: -1;
    animation: glitchShift2 6.5s infinite linear;
    clip-path: inset(0 0 0 0);
}
@keyframes glitchShift1 {
    0%, 92%, 100% { transform: translate(0, 0); clip-path: inset(0 0 0 0); opacity: 0; }
    93% { transform: translate(-3px, 1px); clip-path: inset(10% 0 60% 0); opacity: 0.8; }
    94% { transform: translate(3px, -1px); clip-path: inset(60% 0 5% 0); opacity: 0.8; }
    95% { transform: translate(-2px, 0); clip-path: inset(30% 0 30% 0); opacity: 0.6; }
    96% { opacity: 0; }
}
@keyframes glitchShift2 {
    0%, 90%, 100% { transform: translate(0, 0); clip-path: inset(0 0 0 0); opacity: 0; }
    91% { transform: translate(3px, -1px); clip-path: inset(20% 0 40% 0); opacity: 0.7; }
    92% { transform: translate(-3px, 1px); clip-path: inset(50% 0 15% 0); opacity: 0.7; }
    93% { transform: translate(2px, 0); clip-path: inset(5% 0 70% 0); opacity: 0.5; }
    94% { opacity: 0; }
}

/* ---- Neon category folders ---- */

.category-card {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.15s ease, box-shadow 0.3s ease;
}
.category-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius);
    padding: 2px;
    background: conic-gradient(from var(--angle, 0deg), #38bdf8, #ec4899, #fbbf24, #34d399, #38bdf8);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: spinBorder 3s linear infinite;
    pointer-events: none;
}
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
@keyframes spinBorder {
    to { --angle: 360deg; }
}
.category-card:hover::before { opacity: 1; }
.category-card:hover {
    box-shadow: 0 12px 40px rgba(56, 189, 248, 0.25), 0 4px 18px rgba(236, 72, 153, 0.18);
}
.category-card .category-icon {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
.category-card:hover .category-icon {
    transform: scale(1.15) rotate(-8deg);
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.45);
}

/* ---- Holographic sweep on product cards ---- */

.item-card {
    position: relative;
}
.item-card .item-thumb-img::after,
.item-card .bookmark-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,0.55) 40%, rgba(56,189,248,0.35) 50%, transparent 65%);
    transform: translateX(-120%);
    transition: transform 0.7s ease;
    pointer-events: none;
    z-index: 2;
}
.item-card:hover .item-thumb-img::after,
.item-card:hover .bookmark-thumb::after {
    transform: translateX(120%);
}

/* ---- Cyber buttons ---- */

.load-more-btn,
.add-to-cart-btn {
    position: relative;
    overflow: hidden;
}
.add-to-cart-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: translateX(-120%);
    transition: transform 0.5s ease;
}
.add-to-cart-btn:hover::before { transform: translateX(120%); }

/* ---- Reduced motion respect ---- */
@media (prefers-reduced-motion: reduce) {
    .cyber-grid-overlay, .glitch-title::before, .glitch-title::after,
    .category-card::before, .chipPulse { animation: none !important; }
}

/* ---- Ambient floating gradient blobs (carries the hi-tech feel down the whole page) ---- */

body::before,
body::after {
    content: '';
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.16;
    z-index: -1;
    pointer-events: none;
    animation: blobDrift 18s ease-in-out infinite;
}
body::before {
    top: 10%;
    left: -8%;
    background: radial-gradient(circle, #38bdf8, transparent 70%);
    animation-delay: 0s;
}
body::after {
    bottom: 5%;
    right: -10%;
    background: radial-gradient(circle, #ec4899, transparent 70%);
    animation-delay: 6s;
}
@keyframes blobDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -30px) scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
    body::before, body::after { animation: none; }
}

/* ---- Live impact ticker strip ---- */

.impact-ticker {
    background: linear-gradient(120deg, #0b1330, #10214a 55%, #0b1330);
    position: relative;
    overflow: hidden;
    padding: 1.4rem 0;
}
.impact-ticker::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(56, 189, 248, 0.12) 1px, transparent 1px),
                       linear-gradient(90deg, rgba(56, 189, 248, 0.12) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 90%);
}
.impact-ticker-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.4rem 2.2rem;
}
.impact-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    min-width: 120px;
}
.impact-num {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 800;
    color: #7dd3fc;
    text-shadow: 0 0 16px rgba(56, 189, 248, 0.5);
}
.impact-label {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    white-space: nowrap;
}
.impact-divider {
    width: 1px;
    height: 34px;
    background: rgba(255, 255, 255, 0.15);
}
@media (max-width: 700px) {
    .impact-divider { display: none; }
    .impact-ticker-inner { gap: 1.2rem; }
}

/* ---- Category design-count badge (replaces static price pill) ---- */

.category-count {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-brand);
    background: var(--color-bg-alt);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(56, 189, 248, 0.35);
}

/* ---- Neon touches elsewhere on the page ---- */

#categoriesGrid ~ .load-more-wrap,
.shop-items-header h3 {
    text-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

.quickview-card {
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25), 0 20px 60px rgba(15, 23, 42, 0.35), 0 0 40px rgba(236, 72, 153, 0.12);
}

/* ==========================================================================
   END HI-TECH THEME
   ========================================================================== */

/* ---- Item toolbar (Amazon-style sort/count bar) ---- */

.item-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
    padding: 0.6rem 1rem;
    background: var(--color-bg-alt);
    border-radius: var(--radius-pill);
}

.item-count-label {
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-weight: 600;
}

.sort-select {
    border: 1.5px solid var(--color-accent-light);
    border-radius: var(--radius-pill);
    padding: 0.4rem 0.9rem;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-brand);
    background: var(--color-bg);
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}
.sort-select:hover { box-shadow: var(--shadow-sm); }

/* ---- Amazon-style ribbon badges ---- */

.item-ribbon {
    position: absolute;
    top: 10px;
    left: -6px;
    z-index: 4;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    padding: 0.28rem 0.7rem 0.28rem 0.9rem;
    border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
    box-shadow: var(--shadow-sm);
    animation: ribbonPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.item-ribbon::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    border-width: 5px 0 0 6px;
    border-style: solid;
    border-color: transparent transparent transparent transparent;
}
.ribbon-bestseller { background: linear-gradient(120deg, #f97316, #ec4899); }
.ribbon-new { background: linear-gradient(120deg, #22c55e, #16a34a); }
.ribbon-discount { background: linear-gradient(120deg, #6366f1, #38bdf8); }

@keyframes ribbonPop {
    0% { transform: scale(0) rotate(-15deg); opacity: 0; }
    70% { transform: scale(1.15) rotate(2deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); }
}

/* ---- Star ratings ---- */

.item-rating {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    margin: 0.15rem 0 0.4rem;
}
.item-rating .stars {
    color: #f59e0b;
    letter-spacing: 1px;
    font-size: 0.9rem;
}
.item-rating .rating-num { font-weight: 700; color: var(--color-text); }
.item-rating .rating-count { color: var(--color-text-light); }

/* ---- Price row with MRP strike-through ---- */

.item-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}
.item-price-row .item-price {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-brand);
}
.item-mrp {
    font-size: 0.85rem;
    color: var(--color-text-light);
    text-decoration: line-through;
}
.item-discount {
    font-size: 0.82rem;
    font-weight: 700;
    color: #16a34a;
}

/* ---- Flip cards: front <-> back (Amazon-style alternate image) ---- */

.flip-zone {
    perspective: 1200px;
    background: none !important;
}
.flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
}
.item-card:hover .flip-inner { transform: rotateY(180deg); }

.flip-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.flip-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flip-back { transform: rotateY(180deg); }

.flip-hint {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 3;
    white-space: nowrap;
}
.item-card:hover .flip-hint { opacity: 1; }

/* On hover, disable the generic zoom transform for flip cards so it doesn't
   fight with the 3D flip; the flip itself is animation enough. */
.flip-zone img { transition: none; }
.item-card:hover .flip-zone img { transform: none; }

/* ---- Quick-view flip button ---- */

.quickview-flip-btn {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    border: none;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    z-index: 3;
    transition: transform 0.2s ease, background 0.2s ease;
}
.quickview-flip-btn:hover { background: rgba(15, 23, 42, 0.95); transform: translateX(-50%) scale(1.05); }

#quickviewImage { transition: opacity 0.18s ease, transform 0.18s ease; }
#quickviewImage.flipping { opacity: 0; transform: scale(0.94) rotateY(90deg); }

/* ---- Confetti burst on add-to-cart ---- */

.confetti-piece {
    position: fixed;
    z-index: 2000;
    font-size: 1.1rem;
    pointer-events: none;
    animation: confettiFly 0.8s ease-out forwards;
}
@keyframes confettiFly {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.4); opacity: 0; }
}

/* ---- Extra sparkle in shop items background ---- */

.shop-items-wrap {
    position: relative;
}
.shop-items-wrap.active::before,
.shop-items-wrap.active::after {
    content: '✦';
    position: absolute;
    font-size: 1.4rem;
    color: var(--color-accent-light);
    opacity: 0.5;
    animation: sparkleFloat 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}
.shop-items-wrap.active::before { top: -10px; right: 6%; animation-delay: 0s; }
.shop-items-wrap.active::after { top: 30%; left: 2%; animation-delay: 1.8s; }
@keyframes sparkleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.35; }
    50% { transform: translateY(-14px) rotate(25deg); opacity: 0.8; }
}

/* ---- Bookmark cards: show the real tall bookmark shape, no cropping ---- */

.item-grid[data-category="bookmarks"] {
    grid-template-columns: repeat(auto-fill, minmax(150px, 170px));
    justify-content: center;
}

.bookmark-thumb {
    aspect-ratio: 1 / 3; /* matches the real 600x1800 bookmark proportions */
    background: #f1f5f9;
}
.bookmark-thumb .flip-face img {
    object-fit: contain; /* shows the whole bookmark, front and back, uncropped */
}
.bookmark-card .item-thumb-icon { top: 6px; right: 6px; width: 24px; height: 24px; font-size: 0.8rem; }
.bookmark-card .item-body { padding: 0.8rem 0.9rem 1rem; gap: 0.45rem; }
.bookmark-card .item-body h4 { font-size: 0.88rem; line-height: 1.25; }
.bookmark-card .item-rating { font-size: 0.72rem; }
.bookmark-card .item-price-row .item-price { font-size: 1rem; }
.bookmark-card .item-mrp,
.bookmark-card .item-discount { font-size: 0.72rem; }
.bookmark-card .qty-control button { width: 26px; height: 26px; }
.bookmark-card .qty-control input { width: 30px; }
.bookmark-card .add-to-cart-btn { padding: 0.5rem 0.8rem; font-size: 0.82rem; }

/* ---- Badge cards: smaller footprint (only a couple of designs, don't stretch huge) ---- */

.item-grid[data-category="badges"] {
    grid-template-columns: repeat(auto-fill, minmax(160px, 190px));
    justify-content: center;
}

/* ---- Donate section ---- */

.donate-shop-section { background: var(--color-bg-alt); }

.donate-note {
    max-width: 640px;
    margin: 0 auto var(--spacing-sm);
    text-align: center;
    background: rgba(30,144,255,0.07);
    border: 1px dashed var(--color-accent-light);
    border-radius: var(--radius);
    padding: 1rem 1.4rem;
    font-size: 0.95rem;
}

.donate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
}

.donate-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.donate-card .item-thumb {
    aspect-ratio: auto;
    height: 90px;
    border-radius: var(--radius);
    background: rgba(30,144,255,0.08);
    font-size: 2.2rem;
}

.donate-card h4 { font-family: var(--font-heading); color: var(--color-text); }
.donate-card .unit-label { font-size: 0.85rem; color: var(--color-text-light); }

.donate-btn { background: #f59e0b; }
.donate-btn:hover { background: #d97706; }
.donate-btn.added { background: #16a34a; }

/* ---- Expandable donate card details ---- */

.expandable-card { cursor: pointer; }

.card-toggle-hint {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-accent);
    user-select: none;
}
.card-toggle-hint .hint-arrow {
    display: inline-block;
    transition: transform 0.25s ease;
}
.expandable-card.expanded .card-toggle-hint .hint-arrow { transform: rotate(180deg); }

.kit-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.expandable-card.expanded .kit-details { max-height: 320px; }

.kit-details-list {
    list-style: none;
    margin: 0;
    padding: 0.7rem 0.9rem;
    background: rgba(30,144,255,0.06);
    border-radius: var(--radius);
    font-size: 0.88rem;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.kit-details-list li { position: relative; padding-left: 1rem; }
.kit-details-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-accent);
}

/* ---- Cart drawer ---- */

.cart-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
    position: fixed;
    top: 0; right: 0;
    width: min(420px, 100%);
    height: 100%;
    background: var(--color-bg-alt);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.3rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
}
.cart-drawer-header h3 { margin: 0; }
.cart-close-btn { background: none; border: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--color-text-light); }

.cart-drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }

.cart-section-label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-light);
    margin: 1.2rem 0 0.7rem;
}
.cart-section-label:first-child { margin-top: 0; }

.cart-line-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--color-border);
}
.cart-line-thumb {
    width: 42px; height: 42px;
    border-radius: 8px;
    background: rgba(30,144,255,0.08);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-info .name { font-family: var(--font-heading); font-weight: 500; font-size: 0.92rem; color: var(--color-text); }
.cart-line-info .price { font-size: 0.82rem; color: var(--color-text-light); }
.cart-line-remove {
    background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 0.85rem;
    text-decoration: underline;
}
.cart-line-remove:hover { color: #f43f5e; }

.cart-empty { text-align: center; padding: 3rem 1rem; color: var(--color-text-light); }
.cart-empty-icon { font-size: 2.6rem; margin-bottom: 0.8rem; }

.cart-drawer-footer {
    border-top: 1px solid var(--color-border);
    padding: 1.2rem 1.5rem 1.5rem;
}
.cart-total-row { display: flex; justify-content: space-between; font-family: var(--font-heading); font-weight: 600; margin-bottom: 0.3rem; }
.cart-total-row.grand { font-size: 1.15rem; color: var(--color-brand); padding-top: 0.5rem; border-top: 1px dashed var(--color-border); margin-top: 0.5rem; }

.checkout-btn {
    width: 100%;
    margin-top: 1rem;
    background: var(--btn-bg);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.85rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}
.checkout-btn:hover { background: var(--btn-hover); }
.checkout-note { text-align: center; font-size: 0.78rem; color: var(--color-text-light); margin-top: 0.6rem; }

/* ---- Responsive ---- */

@media (max-width: 900px) {
    .shop-categories { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .shop-categories { grid-template-columns: 1fr; }
    .shop-notice { font-size: 0.92rem; padding: 0.9rem 1.1rem; margin-top: 70px; }
    .cart-drawer { width: 100%; }
}