/* ── custom_webstore.css — Funnelly Webstore ─────────────────────────────── */
/* Loaded after components.css — webstore-specific overrides and page styles  */

/* ── Webstore header ────────────────────────────────────────────────────── */
.webstore-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--white, #fff);
    box-shadow: 0 1px 0 #e5e7eb;
}
.webstore-header .navbar { background: transparent; box-shadow: none; }
/* Override dark-theme nav colours for light header */
.webstore-header .navbar-brand      { color: var(--text-color, #111827) !important; }
.webstore-header .nav-link          { color: var(--text-muted, #374151); }
.webstore-header .nav-link:hover    { color: var(--primary, #3b82f6); }
.webstore-header .navbar ul li a    { color: var(--text-muted, #374151); }
.webstore-header .navbar-toggler-bar { background: var(--text-color, #374151); }
.nav-cart { display: flex; align-items: center; }

/* ── Webstore footer ────────────────────────────────────────────────────── */
/* container inside footer must stack, not flex-row (components.css default) */
.webstore-footer .container,
footer .container { display: block; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.footer-grid      { display: flex; flex-wrap: wrap; gap: 2rem; padding: 3rem 0; }
.footer-brand {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #fff;
    text-decoration: none;
    display: inline-block;
    margin-bottom: .5rem;
}
.footer-description {
    font-size: .875rem;
    color: rgba(255,255,255,.55);
    line-height: 1.65;
    margin-top: .25rem;
    max-width: 280px;
}
.footer-heading {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.45);
    margin: 0 0 .875rem;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.footer-link a {
    font-size: .875rem;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    transition: color .15s;
}
.footer-link a:hover { color: #fff; }

/* ── Webstore main container ────────────────────────────────────────────── */
.webstore-main { background: #f9fafb; flex: 1 1 auto; min-height: 60vh; }

/* ── Hero section ───────────────────────────────────────────────────────── */
.webstore-hero {
    background: linear-gradient(135deg, var(--primary, #3b82f6) 0%, #6366f1 100%);
    color: #fff;
    padding: 4rem 0 3rem;
    overflow: hidden;
}
.webstore-hero-inner {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}
@media (min-width: 768px) {
    .webstore-hero-inner { grid-template-columns: 1fr 340px; }
}

.webstore-hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.3rem 0.875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.875rem;
    color: rgba(255,255,255,0.9);
}
.webstore-hero-heading {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 1rem;
    color: #fff;
}
.webstore-hero-sub {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: rgba(255,255,255,0.85);
    margin: 0 0 1.75rem;
    max-width: 520px;
}
.webstore-hero-actions {
    display: flex;
    gap: 0.875rem;
    flex-wrap: wrap;
}
.btn-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.7);
    color: #fff;
    padding: 0.6875rem 1.375rem;
    border-radius: var(--radius-md, 6px);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background var(--transition-fast, 0.15s), border-color var(--transition-fast, 0.15s);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: #fff; color: #fff; }

/* Hero stat cards */
.webstore-hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}
.webstore-hero-cards {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    width: 100%;
    max-width: 280px;
}
.hero-stat-card {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius-md, 6px);
    padding: 1.125rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(4px);
}
.hero-stat-card--accent {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
}
.hero-stat-num {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    min-width: 2.5rem;
}
.hero-stat-label {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}

/* ── Section headings ───────────────────────────────────────────────────── */
.section-heading-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.section-heading {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-color, #111);
}
.section-link {
    font-size: 0.9rem;
    color: var(--primary, #3b82f6);
    text-decoration: none;
    font-weight: 500;
}
.section-link:hover { text-decoration: underline; }

/* Spacing helpers for webstore sections */
.py-1 { padding-top: 1rem; padding-bottom: 1rem; }
.py-2 { padding-top: 2rem; padding-bottom: 2rem; }

/* ── Product card enhancements ──────────────────────────────────────────── */
/* Override .container inside product grids — components.css sets flex */
.product-grid .container,
.webstore-main .container { display: block; }

/* Keep product-card images at a consistent aspect ratio */
.product-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #f3f4f6;
    display: block;
}

/* Category pills in webstore context */
.webstore-main .category-pills { padding: 0.25rem 0; }

/* ── Webstore footer ────────────────────────────────────────────────────── */
/* inherits global footer styles */

/* ── Storefront: products + categories pages ──────────────────────────────── */
/* .container override — components.css sets flex, storefront needs block */
.store-layout ~ .container,
.store-main .container { display: block; }

.store-breadcrumb {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    color: #888;
    padding: 1rem 0 .5rem;
}
.store-breadcrumb a { color: var(--primary, #3b82f6); text-decoration: none; }
.store-breadcrumb a:hover { text-decoration: underline; }
.store-breadcrumb-sep { color: #ccc; }

.store-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0 1.5rem;
}
.store-page-title { font-size: 1.6rem; font-weight: 700; margin: 0 0 .2rem; }
.store-page-sub   { color: #888; font-size: .9rem; margin: 0; }

/* Two-column layout: sidebar + main */
.store-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-top: 1rem;
    margin-bottom: 2rem;
}
.store-sidebar {
    width: 210px;
    flex-shrink: 0;
}
.store-main { flex: 1; min-width: 0; }

.store-sidebar-section { margin-bottom: 1.5rem; }
.store-sidebar-heading {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #999;
    margin-bottom: .5rem;
}
.store-cat-list { list-style: none; margin: 0; padding: 0; }
.store-cat-list li { margin: 0; }
.store-cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .35rem .5rem;
    border-radius: 6px;
    color: #444;
    text-decoration: none;
    font-size: .9rem;
    transition: background .12s;
}
.store-cat-link:hover { background: #f0f2f5; color: #222; text-decoration: none; }
.store-cat-link.active { background: var(--primary, #3b82f6); color: #fff; font-weight: 600; }
.store-cat-link.active .store-cat-count { background: rgba(255,255,255,.25); color: #fff; }
.store-cat-count {
    font-size: .72rem;
    background: #e9ecef;
    color: #666;
    border-radius: 10px;
    padding: .1rem .45rem;
    flex-shrink: 0;
}

/* Sort bar */
.store-sort-bar {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.store-sort-label { font-size: .82rem; color: #888; margin-right: .3rem; }
.store-sort-btn {
    padding: .25rem .7rem;
    border-radius: 16px;
    background: #f0f2f5;
    color: #555;
    font-size: .82rem;
    text-decoration: none;
    border: 1px solid #ddd;
    transition: all .12s;
}
.store-sort-btn:hover, .store-sort-btn.active {
    background: var(--primary, #3b82f6);
    color: #fff;
    border-color: transparent;
    text-decoration: none;
}

/* Category card grid */
.store-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.store-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: 1.5rem 1rem;
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all .15s;
}
.store-category-card:hover {
    border-color: var(--primary, #3b82f6);
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    transform: translateY(-2px);
    text-decoration: none;
    color: #111;
}
.store-category-icon { font-size: 2rem; color: var(--primary, #3b82f6); opacity: .7; }
.store-category-name  { font-weight: 600; font-size: .95rem; text-align: center; }
.store-category-count { font-size: .8rem; color: #888; }

.store-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #888;
}
.store-empty p { margin-bottom: 1rem; }

@media (max-width: 640px) {
    .store-layout  { flex-direction: column; }
    .store-sidebar { width: 100%; }
    .store-cat-list { display: flex; flex-wrap: wrap; gap: .3rem; }
    .store-cat-link { padding: .25rem .6rem; border: 1px solid #ddd; border-radius: 14px; }
    .store-category-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Store Sub-Nav ──────────────────────────────────────────────────────────── */
.store-subnav {
    background: var(--dark, #1a1a2e);
    border-bottom: 1px solid rgba(255,255,255,.08);
    position: sticky;
    top: 57px; /* sits just below the sticky webstore-header (~56px tall) */
    z-index: 100;
}
.store-subnav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
}
.store-subnav-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.store-subnav-brand {
    font-weight: 700;
    font-size: .9rem;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .4rem;
    letter-spacing: .02em;
    opacity: .9;
}
.store-subnav-brand:hover { opacity: 1; color: #fff; }
.store-subnav-links {
    display: flex;
    align-items: center;
    gap: .25rem;
}
.store-subnav-link {
    font-size: .85rem;
    color: rgba(255,255,255,.7);
    text-decoration: none;
    padding: .3rem .75rem;
    border-radius: 20px;
    transition: background .15s, color .15s;
}
.store-subnav-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.store-subnav-link.active { background: rgba(255,255,255,.15); color: #fff; font-weight: 600; }
.store-subnav-right { display: flex; align-items: center; }
.store-subnav-cart {
    position: relative;
    color: rgba(255,255,255,.8);
    font-size: 1.1rem;
    padding: .3rem .5rem;
    border-radius: 8px;
    transition: color .15s, background .15s;
    text-decoration: none;
}
.store-subnav-cart:hover { color: #fff; background: rgba(255,255,255,.1); }
.store-cart-badge {
    position: absolute;
    top: -.2rem;
    right: -.3rem;
    background: #ef4444;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* ── Payment Method Cards ─────────────────────────────────────────────────── */
.pay-methods {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 1.5rem;
}
.pay-method-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.pay-method-card:hover { border-color: var(--primary, #3b82f6); box-shadow: 0 2px 12px rgba(59,130,246,.08); }
.pay-method-disabled { opacity: .55; pointer-events: none; }
.pay-method-left { display: flex; align-items: center; gap: .9rem; flex: 1; min-width: 0; }
.pay-method-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #64748b;
    flex-shrink: 0;
}
.pay-method-icon-stripe  { background: #e0e7ff; color: #6366f1; }
.pay-method-icon-crypto  { background: #fef3c7; color: #d97706; }
.pay-method-icon-pm      { background: #dcfce7; color: #16a34a; }
.pay-method-icon-paypal  { background: #dbeafe; color: #2563eb; }
.pay-method-name { font-weight: 600; font-size: .95rem; color: #1e293b; }
.pay-method-desc { font-size: .8rem; color: #64748b; margin-top: .15rem; }
.pay-method-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}
.pay-method-amount {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
}
.pay-method-btn { white-space: nowrap; }
.pay-method-unavailable { font-size: .8rem; color: #94a3b8; font-style: italic; }
.pay-back-link { margin-top: 1rem; }

@media (max-width: 600px) {
    .store-subnav-brand span { display: none; }
    .pay-method-card { flex-wrap: wrap; }
    .pay-method-right { width: 100%; justify-content: flex-end; }
}

/* ── Checkout address cards ────────────────────────────────────
   Horizontal grid of address cards; each card is a flex row with the
   radio on the left (vertically centred) and the address lines to its
   right. Used for both the billing-grid and shipping-grid. */
.checkout-address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
    margin: 0 0 1rem;
}
.checkout-addr-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: border-color .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.checkout-addr-card:hover {
    border-color: #94a3b8;
}
.checkout-addr-card input[type=radio] {
    flex-shrink: 0;
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
}
.checkout-addr-card.selected {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}
.checkout-addr-lines {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #1f2937;
}
.checkout-addr-lines > div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.checkout-addr-default {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}
/* "+ Add new" card: dashed border, centred icon+label */
.checkout-addr-add {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    border-style: dashed;
    color: #6b7280;
    background: #fafafa;
    text-decoration: none;
}
.checkout-addr-add:hover {
    color: #3b82f6;
    border-color: #3b82f6;
    background: #eff6ff;
}
