/* ============================================================
   Dékolé — Seller Storefront
   Scoped under .dekole-store (inside .dekole-scope).
   Uses dekole-brand.css tokens where available with fallbacks.
   ============================================================ */

.dekole-store {
    --st-primary: var(--dekole-primary, #2563EB);
    --st-dark: var(--dekole-navy, #0F172A);
    --st-muted: var(--dekole-muted, #94A3B8);
    --st-text: var(--dekole-dark-text, #0F172A);
    --st-line: #E5E9F2;
    --st-surface: #FFFFFF;
    --st-tint: #F5F7FB;
    --st-radius: 14px;
    background: var(--st-tint);
    color: var(--st-text);
    padding-bottom: 60px;
}

/* Inherit the site's container width so the storefront lines up with the
   header/navbar above it (no wider-than-the-nav misalignment). */

/* ---------------- Hero ---------------- */
.dekole-store-hero { position: relative; background: var(--st-surface); }
.dekole-store-banner {
    height: 280px;
    background-size: cover;
    background-position: center;
    background-color: #1e293b;
    background-image: linear-gradient(120deg, #1e293b, #334155);
    position: relative;
}
.dekole-store-banner-scrim {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(2,6,23,.15), rgba(2,6,23,.55));
}

.dekole-store-identity {
    display: flex;
    align-items: flex-end;
    gap: 22px;
    margin-top: -70px;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
}

.dekole-store-logo {
    width: 128px; height: 128px;
    border-radius: 22px;
    background: #fff;
    border: 4px solid #fff;
    box-shadow: 0 12px 30px rgba(2,6,23,.18);
    overflow: hidden;
    flex: 0 0 auto;
    position: relative;
    display: grid; place-items: center;
}
.dekole-store-logo img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 2; }
.dekole-store-logo-initial {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    font-size: 52px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--st-primary), #38BDF8);
    z-index: 1;
}
.dekole-store-logo.is-fallback img { display: none; }

.dekole-store-headline { flex: 1 1 320px; padding-bottom: 6px; }
.dekole-store-name-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dekole-store-name { font-size: 30px; font-weight: 800; margin: 0; color: var(--st-text); line-height: 1.15; }
.dekole-store-verified {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(22,163,74,.1); color: #16A34A;
    font-size: 12.5px; font-weight: 700;
    padding: 4px 10px; border-radius: 999px;
}
.dekole-store-tagline { color: var(--st-muted); margin: 6px 0 0; font-size: 14.5px; }
.dekole-store-meta { display: flex; align-items: center; gap: 18px; margin-top: 10px; flex-wrap: wrap; }
.dekole-store-stars { color: #F59E0B; font-size: 14px; display: inline-flex; align-items: center; gap: 3px; }
.dekole-store-stars strong { color: var(--st-text); margin-left: 6px; }
.dekole-store-stars.sm { font-size: 12px; }
.dekole-store-meta-muted { color: var(--st-muted); font-size: 13px; font-weight: 500; }

.dekole-store-actions { display: flex; gap: 10px; padding-bottom: 6px; flex-wrap: wrap; }

.dekole-store-btn {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid transparent; cursor: pointer;
    font-size: 14px; font-weight: 700;
    padding: 10px 18px; border-radius: 10px;
    transition: all .15s ease; text-decoration: none; line-height: 1;
}
.dekole-store-btn-primary { background: var(--st-primary); color: #fff; }
.dekole-store-btn-primary:hover { background: #1d4ed8; color: #fff; }
.dekole-store-btn-primary.is-following { background: #16A34A; }
.dekole-store-btn-primary.is-following:hover { background: #b91c1c; }
.dekole-store-btn-primary.is-following:hover .label::after { content: ''; }
.dekole-store-btn-dark { background: var(--st-dark); color: #fff; }
.dekole-store-btn-dark:hover { background: #020617; color: #fff; }
.dekole-store-btn-ghost { background: #fff; color: var(--st-text); border-color: var(--st-line); }
.dekole-store-btn-ghost:hover { background: var(--st-tint); color: var(--st-text); }

/* ---------------- Stats ---------------- */
.dekole-store-stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 14px; margin: 24px 0 6px;
    background: var(--st-surface);
    border: 1px solid var(--st-line);
    border-radius: var(--st-radius);
    padding: 18px;
}
.dekole-store-stat { text-align: center; border-right: 1px solid var(--st-line); }
.dekole-store-stat:last-child { border-right: 0; }
.dekole-store-stat-num { display: block; font-size: 24px; font-weight: 800; color: var(--st-text); }
.dekole-store-stat-label { display: block; font-size: 12.5px; color: var(--st-muted); margin-top: 2px; font-weight: 600; }

/* ---------------- Sticky tabs ---------------- */
.dekole-store-tabs {
    position: sticky; top: 0; z-index: 30;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--st-line);
    margin-top: 22px;
}
.dekole-store-tabs ul {
    list-style: none; margin: 0; padding: 0;
    display: flex; gap: 6px; overflow-x: auto;
}
.dekole-store-tabs a {
    display: inline-block; padding: 15px 16px;
    font-size: 14px; font-weight: 700; color: var(--st-muted);
    white-space: nowrap; text-decoration: none;
    border-bottom: 2px solid transparent;
}
.dekole-store-tabs a:hover { color: var(--st-primary); }

/* ---------------- Sections ---------------- */
.dekole-store-body { padding-top: 8px; }
.dekole-store-section { padding: 34px 0; border-bottom: 1px solid var(--st-line); scroll-margin-top: 80px; }
.dekole-store-section:last-child { border-bottom: 0; }
.dekole-store-section-title {
    font-size: 20px; font-weight: 800; color: var(--st-text);
    margin: 0 0 18px; display: flex; align-items: center; gap: 10px;
}
.dekole-store-section-sub { color: var(--st-muted); margin: -10px 0 18px; font-size: 14px; }
.dekole-store-count {
    font-size: 13px; font-weight: 700; color: var(--st-muted);
    background: var(--st-tint); border: 1px solid var(--st-line);
    padding: 2px 10px; border-radius: 999px;
}
.dekole-store-badge-hot {
    font-size: 11px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, #EF4444, #F59E0B);
    padding: 3px 9px; border-radius: 6px; letter-spacing: .5px;
}

/* Product grid — auto-fill keeps cards a sensible ~220px wide instead of
   stretching to 1/4 of very wide screens, so they never balloon. */
.dekole-store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}
/* Force a compact, uniformly-cropped media box on the storefront (wins over
   the global card rules regardless of stylesheet load order). */
.dekole-store .dekole-store-grid .dekole-pcard-media {
    aspect-ratio: 1 / 1 !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden;
}
.dekole-store .dekole-store-grid .dekole-pcard-media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
.dekole-store .dekole-store-grid .dekole-pcard--v3 { max-width: 100%; }

/* Category chips: one-line rail that works with mouse, trackpad and touch. */
.dekole-store-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 9px;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 2px 1px 10px;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.dekole-store-chips::-webkit-scrollbar { display: none; }
.dekole-store-chip {
    display: inline-block; padding: 9px 16px;
    background: var(--st-surface); border: 1px solid var(--st-line);
    border-radius: 999px; font-size: 13.5px; font-weight: 600;
    color: var(--st-text); text-decoration: none; transition: all .15s ease;
    flex: 0 0 auto;
    scroll-snap-align: start;
    white-space: nowrap;
}
.dekole-store-chip:hover { border-color: var(--st-primary); color: var(--st-primary); background: #fff; }

/* Pickup notes */
.dekole-store-pickup-notes {
    display: flex; gap: 14px; align-items: flex-start;
    background: var(--st-surface); border: 1px solid var(--st-line);
    border-radius: var(--st-radius); padding: 16px 18px; margin-bottom: 18px;
}
.dekole-store-pickup-notes > i { color: var(--st-primary); font-size: 20px; margin-top: 2px; }
.dekole-store-pickup-notes ul { margin: 6px 0 0; padding-left: 18px; color: var(--st-muted); font-size: 13.5px; }

/* Policies */
.dekole-store-policy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dekole-store-policy {
    background: var(--st-surface); border: 1px solid var(--st-line);
    border-radius: var(--st-radius); padding: 22px;
}
.dekole-store-policy-head {
    display: flex; align-items: center; gap: 10px;
    font-size: 15px; font-weight: 800; color: var(--st-text); margin-bottom: 10px;
}
.dekole-store-policy-head i { color: var(--st-primary); }
.dekole-store-policy p { color: #475569; font-size: 13.5px; line-height: 1.6; margin: 0; white-space: pre-line; }

/* Reviews */
.dekole-store-reviews { display: grid; grid-template-columns: 280px 1fr; gap: 26px; align-items: start; }
.dekole-store-review-summary {
    background: var(--st-surface); border: 1px solid var(--st-line);
    border-radius: var(--st-radius); padding: 22px; text-align: center;
}
.dekole-store-review-score { font-size: 44px; font-weight: 800; color: var(--st-text); line-height: 1; }
.dekole-store-review-summary .dekole-store-stars { justify-content: center; margin: 8px 0 4px; }
.dekole-store-review-bars { margin-top: 16px; text-align: left; }
.dekole-store-review-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 12px; color: var(--st-muted); }
.dekole-store-review-bar .track { flex: 1; height: 7px; background: var(--st-tint); border-radius: 999px; overflow: hidden; }
.dekole-store-review-bar .fill { height: 100%; background: #F59E0B; }
.dekole-store-review-bar .cnt { width: 26px; text-align: right; }

.dekole-store-review {
    background: var(--st-surface); border: 1px solid var(--st-line);
    border-radius: var(--st-radius); padding: 18px; margin-bottom: 14px;
}
.dekole-store-review-top { display: flex; align-items: center; justify-content: space-between; }
.dekole-store-review-author { font-weight: 700; color: var(--st-text); font-size: 14px; }
.dekole-store-review-title { font-weight: 700; margin-top: 8px; color: var(--st-text); font-size: 14px; }
.dekole-store-review-body { color: #475569; font-size: 13.5px; line-height: 1.6; margin: 6px 0 8px; }
.dekole-store-review-date { color: var(--st-muted); font-size: 12px; }

/* Empty state */
.dekole-store-empty { text-align: center; padding: 46px 20px; color: var(--st-muted); }
.dekole-store-empty i { font-size: 40px; opacity: .5; }
.dekole-store-empty p { margin-top: 12px; font-size: 14px; }

/* Modals */
.dekole-store-modal { border: 0; border-radius: 16px; overflow: hidden; }
.dekole-store-modal .modal-header { border-bottom: 1px solid var(--st-line); }
.dekole-store-modal .modal-title { font-weight: 800; font-size: 17px; }
.dekole-store-modal .modal-footer { border-top: 1px solid var(--st-line); }
.dekole-store-modal textarea { border-radius: 10px; border-color: var(--st-line); resize: vertical; }
.dekole-store-modal-feedback { font-size: 13px; margin-top: 10px; font-weight: 600; }
.dekole-store-modal-feedback.is-ok { color: #16A34A; }
.dekole-store-modal-feedback.is-error { color: #EF4444; }

.dekole-store-share { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.dekole-store-share-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 14px; border: 1px solid var(--st-line);
    border-radius: 10px; font-weight: 600; font-size: 13.5px;
    color: var(--st-text); text-decoration: none;
}
.dekole-store-share-btn:hover { background: var(--st-tint); color: var(--st-text); }
.dekole-store-share-btn .fa-facebook { color: #1877f2; }
.dekole-store-share-btn .fa-twitter { color: #1da1f2; }
.dekole-store-share-btn .fa-whatsapp { color: #25d366; }
.dekole-store-share-btn .fa-linkedin { color: #0a66c2; }
.dekole-store-copy { display: flex; gap: 8px; margin-top: 14px; }
.dekole-store-copy input {
    flex: 1; border: 1px solid var(--st-line); border-radius: 10px;
    padding: 10px 12px; font-size: 13px; color: var(--st-muted);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
    .dekole-store-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dekole-store-policy-grid { grid-template-columns: 1fr; }
    .dekole-store-reviews { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .dekole-store-banner { height: 190px; }
    .dekole-store-identity { margin-top: -54px; gap: 16px; }
    .dekole-store-logo { width: 96px; height: 96px; border-radius: 18px; }
    .dekole-store-name { font-size: 23px; }
    .dekole-store-actions { width: 100%; }
    .dekole-store-actions .dekole-store-btn { flex: 1; justify-content: center; }
    .dekole-store-stats { grid-template-columns: repeat(2, 1fr); }
    .dekole-store-stat:nth-child(2) { border-right: 0; }
    .dekole-store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .dekole-store-section { padding: 26px 0; }
    .dekole-store-section-title { font-size: 18px; margin-bottom: 14px; }
    .dekole-store-chips { margin-right: -15px; padding-right: 15px; }
}
@media (max-width: 460px) {
    .dekole-store-grid {
        gap: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dekole-store .dekole-store-grid .dekole-pcard {
        min-width: 0;
        width: 100%;
    }

    .dekole-store .dekole-store-grid .dekole-pcard-media {
        aspect-ratio: auto !important;
        height: 112px !important;
        min-height: 112px !important;
    }

    .dekole-store .dekole-store-grid .dekole-pcard-media img {
        height: auto !important;
        max-height: 82px !important;
        max-width: 90% !important;
        object-fit: contain !important;
        width: auto !important;
    }

    .dekole-store-body {
        padding-left: 10px;
        padding-right: 10px;
    }

    .dekole-store-chips {
        margin-right: -10px;
        padding-right: 10px;
    }
}
