/* ==========================================================================
   Shine Labs Store — store-only components.
   Loads AFTER the shared styles.css, so it inherits every design token
   (--purple, --yellow, --glass-*, --text-*, --transition) and the base
   .glass / .btn / .gradient-text classes. Never hardcode brand colors here.
   ========================================================================== */

/* --- Nav additions -------------------------------------------------------- */
.nav-links a.active { color: var(--purple); }

.nav-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--text-primary);
    /* The cart centers on the tall nav row, which sits above the text. Nudge the
       whole link (icon + badge together) down to sit with the "Home/Services"
       labels. */
    top: 6px;
}
.nav-cart:hover { color: var(--purple); }
.nav-cart svg { display: block; }
/* Icon-only link: no hover underline (keeps the nav underlines consistent). */
.nav-links a.nav-cart::after { display: none; }
.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--purple), var(--purple-light));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

/* --- Page shell ----------------------------------------------------------- */
.store-main { padding-top: 120px; min-height: 70vh; }

.store-header {
    max-width: 1400px;
    margin: 0 auto 2.5rem;
    padding: 0 5%;
    text-align: center;
}
.store-header h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.75rem; }
.store-header p { color: var(--text-secondary); max-width: 640px; margin: 0 auto; }

.store-section { padding: 3rem 5%; }
.store-section .inner { max-width: 1400px; margin: 0 auto; }

.breadcrumb {
    /* Force block: the shared stylesheet styles bare <nav> as a flex space-between
       header, which would stretch the crumbs edge to edge like a second navbar. */
    display: block;
    max-width: 1400px;
    margin: 0 auto 1.5rem;
    padding: 0 5%;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--purple); }

/* --- Toolbar (search / sort) --------------------------------------------- */
.store-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto 2rem;
    padding: 1rem 1.25rem;
    border-radius: 18px;
}
.store-search {
    flex: 1 1 260px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
}
.store-search svg { width: 18px; height: 18px; stroke: var(--text-secondary); flex: 0 0 auto; }
.store-search input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
}
.store-sort {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.store-sort select {
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}
.result-count { color: var(--text-secondary); font-size: 0.9rem; margin: 0 auto 1.5rem; max-width: 1400px; padding: 0 5%; }

/* --- Section title row ---------------------------------------------------- */
.section-title-row {
    max-width: 1400px;
    margin: 0 auto 1.5rem;
    padding: 0 5%;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.section-title-row h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
.section-hint { color: var(--text-secondary); font-size: 0.85rem; }

/* --- Featured carousel (wide, one item at a time) ------------------------ */
.featured-section { padding-bottom: 1.5rem; }
.featured-carousel { position: relative; max-width: 1400px; margin: 0 auto; padding: 0 5%; }
.fh-viewport { overflow: hidden; border-radius: 26px; }
.featured-track {
    display: flex;
    will-change: transform;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.fh-slide {
    flex: 0 0 100%;
    width: 100%;
    display: flex;
    align-items: stretch;
    gap: 0;
    border-radius: 26px;
    overflow: hidden;
}
.fh-media {
    position: relative;
    flex: 0 0 55%;
    min-width: 0;
    aspect-ratio: 16 / 9;
    background: var(--glass-refraction);
    border-right: 1px solid var(--glass-border-subtle);
    display: block;
    overflow: hidden;
}
.fh-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fh-media .placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.fh-media .placeholder svg { width: 72px; height: 72px; stroke: var(--purple-light); opacity: 0.55; }
.fh-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 2.5rem; }
.fh-body h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 0.6rem; }
.fh-body h3 a { color: var(--text-primary); text-decoration: none; }
.fh-body h3 a:hover { color: var(--purple); }
.fh-tagline { color: var(--text-secondary); line-height: 1.6; margin-bottom: 1.25rem; }
.fh-price { font-size: 1.8rem; font-weight: 700; margin-bottom: 1.5rem; }
.fh-actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

.fh-dots { display: flex; justify-content: center; gap: 0.6rem; margin-top: 1.25rem; }
.fh-dot {
    width: 9px; height: 9px; border-radius: 50%; border: none; cursor: pointer; padding: 0;
    background: var(--glass-border); transition: var(--transition);
}
.fh-dot.active { background: linear-gradient(135deg, var(--purple), var(--purple-light)); transform: scale(1.25); }

@media (max-width: 768px) {
    .fh-slide { flex-direction: column; }
    .fh-media { flex-basis: auto; width: 100%; border-right: none; border-bottom: 1px solid var(--glass-border-subtle); }
    .fh-body { padding: 1.75rem; }
}

/* --- "More coming soon" category card ------------------------------------ */
.cat-soon { cursor: default; border-style: dashed; opacity: 0.85; }
.cat-soon:hover { transform: none; }
.cat-soon .cat-icon svg { stroke: var(--text-secondary); }
.cat-soon .cat-count { color: var(--text-secondary); }

/* --- Product grid (flexbox center pattern, per house convention) --------- */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}
.product-grid > .product-card { flex: 1 1 300px; max-width: 360px; }

.product-card {
    display: flex;
    flex-direction: column;
    border-radius: 22px;
    overflow: hidden;
    padding: 0;
}
.product-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--glass-refraction);
    border-bottom: 1px solid var(--glass-border-subtle);
    overflow: hidden;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-media .placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}
.product-media .placeholder svg { width: 54px; height: 54px; stroke: var(--purple-light); opacity: 0.6; }

.badge-featured {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 0.3rem 0.7rem;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--purple-light));
}

.product-body { display: flex; flex-direction: column; flex: 1; padding: 1.4rem 1.5rem 1.6rem; }
.product-body h3 { font-size: 1.25rem; margin-bottom: 0.35rem; }
.product-body h3 a { color: var(--text-primary); text-decoration: none; }
.product-body h3 a:hover { color: var(--purple); }
.product-tagline { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.5; margin-bottom: 1.1rem; flex: 1; }

.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.price { font-size: 1.35rem; font-weight: 700; }

.btn-add {
    padding: 0.7rem 1.4rem;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(139, 92, 246, 0.3);
    background: linear-gradient(135deg, var(--purple), var(--purple-light));
    color: #fff;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-add:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(139, 92, 246, 0.35); }
.btn-add.in-cart { background: var(--glass-bg-strong); color: var(--text-primary); }

/* --- Product detail ------------------------------------------------------- */
.product-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: flex-start;
}
.detail-gallery { flex: 1 1 420px; min-width: 0; }
.detail-gallery .main-shot {
    border-radius: 22px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--glass-refraction);
    display: flex; align-items: center; justify-content: center;
}
.detail-gallery .main-shot img { width: 100%; height: 100%; object-fit: cover; }
.detail-gallery .main-shot .placeholder svg { width: 72px; height: 72px; stroke: var(--purple-light); opacity: 0.6; }

.detail-info { flex: 1 1 340px; min-width: 0; padding: 2rem; border-radius: 22px; }
.detail-info h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 0.5rem; }
.detail-info .product-tagline { font-size: 1.05rem; margin-bottom: 1.5rem; }
.detail-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.5rem; }
.detail-price { font-size: 2rem; font-weight: 700; margin-bottom: 1.5rem; }
.detail-desc { color: var(--text-secondary); line-height: 1.7; margin-bottom: 2rem; }
.detail-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* --- Cart ----------------------------------------------------------------- */
.cart-wrap { max-width: 1000px; margin: 0 auto; }
.cart-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.cart-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.1rem 1.4rem;
    border-radius: 18px;
}
.cart-row .thumb { flex: 0 0 84px; width: 84px; height: 60px; border-radius: 10px; overflow: hidden; background: var(--glass-refraction); }
.cart-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-row .info { flex: 1; min-width: 0; }
.cart-row .info h4 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.cart-row .info .muted { color: var(--text-secondary); font-size: 0.85rem; }
.cart-row .line-price { font-weight: 700; font-size: 1.05rem; }
.cart-remove {
    background: none; border: none; cursor: pointer;
    color: var(--text-secondary); padding: 0.4rem; border-radius: 8px;
    transition: var(--transition);
}
.cart-remove:hover { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.cart-remove svg { width: 20px; height: 20px; stroke: currentColor; }

.cart-summary {
    display: flex; flex-direction: column; gap: 1rem;
    padding: 1.75rem; border-radius: 20px; margin-left: auto; max-width: 380px;
}
.cart-summary .row { display: flex; justify-content: space-between; color: var(--text-secondary); }
.cart-summary .total { display: flex; justify-content: space-between; font-size: 1.3rem; font-weight: 700; color: var(--text-primary); padding-top: 1rem; border-top: 1px solid var(--glass-border-subtle); }

/* --- Checkout ------------------------------------------------------------- */
.checkout-grid { display: flex; flex-wrap: wrap; gap: 2.5rem; max-width: 1100px; margin: 0 auto; align-items: flex-start; }
.checkout-main { flex: 1 1 380px; min-width: 0; }
.checkout-aside { flex: 1 1 300px; min-width: 0; }
.checkout-box { padding: 2rem; border-radius: 22px; margin-bottom: 1.5rem; }
.checkout-box h2 { font-size: 1.3rem; margin-bottom: 1.25rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.9rem; margin-bottom: 0.4rem; color: var(--text-secondary); }
.field input {
    width: 100%; padding: 0.85rem 1rem; border-radius: 12px;
    background: var(--glass-bg-strong); border: 1px solid var(--glass-border);
    color: var(--text-primary); font-size: 0.95rem; outline: none;
}
.field input:focus { border-color: var(--purple-light); }
#paypal-buttons { margin-top: 1rem; min-height: 48px; }
.pay-note { font-size: 0.82rem; color: var(--text-secondary); margin-top: 1rem; line-height: 1.5; }
.pay-error { color: #ef4444; font-size: 0.9rem; margin-top: 1rem; display: none; }

/* --- Order / downloads ---------------------------------------------------- */
.order-box { max-width: 820px; margin: 0 auto; padding: 2.5rem; border-radius: 24px; text-align: center; }
.order-icon { width: 68px; height: 68px; margin: 0 auto 1.25rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(135deg, var(--purple), var(--purple-light)); }
.order-icon svg { width: 34px; height: 34px; stroke: #fff; }
.download-list { display: flex; flex-direction: column; gap: 1rem; margin: 2rem 0; text-align: left; }
.download-item { padding: 1.25rem 1.4rem; border-radius: 16px; }
.download-item .top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.download-item .fname { font-weight: 600; }
.download-item .hash-label { font-size: 0.78rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.25rem; }
.download-item .hash {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.8rem; word-break: break-all; color: var(--text-primary);
    background: var(--glass-refraction); padding: 0.6rem 0.75rem; border-radius: 8px;
}

/* --- License page --------------------------------------------------------- */
.license-page { max-width: 860px; margin: 0 auto; padding: 2.5rem; border-radius: 24px; }
.license-page h1 { margin-bottom: 0.5rem; }
.license-page h2 { font-size: 1.2rem; margin: 1.75rem 0 0.6rem; }
.license-page p, .license-page li { color: var(--text-secondary); line-height: 1.7; }
.license-page ul { margin: 0.5rem 0 0.5rem 1.25rem; }
.license-updated { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 2rem; }
.license-body h2 { font-size: 1.2rem; margin: 1.75rem 0 0.6rem; }
.license-body h3 { font-size: 1.05rem; margin: 1.25rem 0 0.5rem; }
.license-body p, .license-body li { color: var(--text-secondary); line-height: 1.7; }
.license-body ul, .license-body ol { margin: 0.5rem 0 0.9rem 1.25rem; }
.license-body li { margin-bottom: 0.35rem; }
.license-body hr { border: none; border-top: 1px solid var(--glass-border-subtle); margin: 1.5rem 0; }
.license-body strong { color: var(--text-primary); }

.category-license-note {
    max-width: 1400px;
    margin: 1.5rem auto 0;
    padding: 0 5%;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.category-license-note a { color: var(--purple); }

/* --- Category chips (store home) ----------------------------------------- */
.cat-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; max-width: 1400px; margin: 0 auto; }
.cat-grid > .cat-card { flex: 1 1 300px; max-width: 420px; }
.cat-card {
    position: relative;
    padding: 2rem;
    border-radius: 22px;
    text-decoration: none;
    color: var(--text-primary);
    display: block;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    /* Only shadow + border animate: no geometry change, so no hover flicker. */
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.cat-card:not(.cat-soon):hover {
    border-color: var(--purple-light);
    box-shadow: 0 16px 36px var(--glass-shadow-strong);
}
.cat-card .cat-icon { width: 60px; height: 60px; border-radius: 15px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; background: var(--glass-refraction); transition: background-color 0.3s ease; }
.cat-card .cat-icon svg { width: 30px; height: 30px; stroke: var(--purple); transition: stroke 0.3s ease; }
.cat-card:not(.cat-soon):hover .cat-icon { background-color: var(--purple); }
.cat-card:not(.cat-soon):hover .cat-icon svg { stroke: #fff; }
.cat-card h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.cat-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; }
/* The count reads as a call-to-action button, not a plain text link. */
.cat-card .cat-count {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 12px;
    background-color: var(--glass-refraction);
    border: 1px solid var(--glass-border-subtle);
    color: var(--purple);
    font-weight: 600;
    font-size: 0.88rem;
    /* Interpolable properties only (solid color), so the fill is smooth. */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.cat-card:not(.cat-soon):hover .cat-count {
    background-color: var(--purple);
    color: #fff;
    border-color: transparent;
}

/* --- 404 ------------------------------------------------------------------ */
.notfound { max-width: 640px; margin: 2rem auto; padding: 3rem 5%; text-align: center; }
.notfound-code { font-size: clamp(4rem, 14vw, 8rem); font-weight: 800; line-height: 1; }
.notfound h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 0.5rem 0 0.75rem; }
.notfound p { color: var(--text-secondary); margin-bottom: 2rem; }
.notfound-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.notfound-actions .btn-secondary { margin-left: 0; }

/* --- Empty state ---------------------------------------------------------- */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text-secondary); }
.empty-state svg { width: 60px; height: 60px; stroke: var(--purple-light); opacity: 0.5; margin-bottom: 1rem; }
.empty-state h3 { color: var(--text-primary); margin-bottom: 0.5rem; }

/* --- Store CTA on main site ----------------------------------------------- */
.store-promo .promo-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 2rem; justify-content: center; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 768px) {
    .store-main { padding-top: 100px; }
    .store-toolbar { flex-direction: column; align-items: stretch; }
    .store-sort { justify-content: space-between; }
    .cart-summary { max-width: none; }
    .detail-info, .checkout-box, .order-box, .license-page { padding: 1.5rem; }
    .cart-row { flex-wrap: wrap; }
    .cart-row .thumb { flex-basis: 64px; width: 64px; }
}
