/* =====================================================================
   Crypto Corner Shop — Seller Directory
   Scoped to .ccs-stores so it cannot leak into the navbar, footer or
   the individual storefront pages.
   ===================================================================== */

.ccs-stores {
    --s-gold: #EBA71A;
    --s-gold-soft: #FFF6E3;
    --s-green: #2F4238;
    --s-green-soft: #EEF3F0;
    --s-ink: #1D2A24;
    --s-muted: #6C7A73;
    --s-line: #E7ECE9;
    --s-card: #FFFFFF;
    --s-bg: #F7F9F8;
    --s-radius: 16px;
    --s-shadow: 0 1px 2px rgba(29,42,36,.04), 0 10px 26px rgba(29,42,36,.06);
    --s-shadow-hi: 0 6px 14px rgba(29,42,36,.08), 0 22px 44px rgba(29,42,36,.10);

    background: var(--s-bg);
    color: var(--s-ink);
    font-family: 'Open Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
}

.ccs-stores h1, .ccs-stores h2, .ccs-stores h3,
.ccs-stores h4, .ccs-stores h5, .ccs-stores h6 {
    font-family: 'Raleway', 'Open Sans', sans-serif;
    color: var(--s-green);
    font-weight: 800;
    letter-spacing: -.01em;
}
.ccs-stores a { text-decoration: none; }
.ccs-stores .min-w-0 { min-width: 0; }
.ccs-stores .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- Hero */
.sd-hero {
    background: #fff;
    border-bottom: 1px solid var(--s-line);
    padding: 44px 0 34px;
}
.sd-kicker {
    display: inline-flex; align-items: center; gap: 8px;
    color: #C2900F; font-size: .74rem; font-weight: 800;
    letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px;
}
.sd-kicker::after { content: ""; width: 26px; height: 2px; background: var(--s-gold); border-radius: 2px; }
.sd-hero h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.2; margin-bottom: 10px; }
.sd-hero p { color: var(--s-muted); font-size: .96rem; line-height: 1.65; max-width: 580px; margin: 0; }

.sd-searchbar {
    background: #fff; border: 1px solid var(--s-line); border-radius: 999px;
    padding: 5px 5px 5px 18px; display: flex; align-items: center; gap: 10px;
    width: 100%; max-width: 460px; transition: border-color .18s ease, box-shadow .18s ease;
}
.sd-searchbar:focus-within { border-color: var(--s-gold); box-shadow: 0 0 0 3px rgba(235,167,26,.12); }
.sd-searchbar input {
    border: 0; outline: 0; flex: 1; min-width: 0; padding: 9px 0;
    font-size: .92rem; background: transparent; color: var(--s-ink);
}
.sd-searchbar button {
    border: 0; background: var(--s-gold); color: #fff; border-radius: 999px;
    padding: 9px 20px; font-weight: 700; font-size: .87rem; transition: background .2s ease;
}
.sd-searchbar button:hover { background: #d4930f; }

/* Headline numbers under the hero copy */
.sd-facts { display: flex; flex-wrap: wrap; gap: 22px 34px; margin-top: 22px; }
.sd-fact .n { font-family: 'Raleway', sans-serif; font-size: 1.35rem; font-weight: 800; color: var(--s-green); line-height: 1; }
.sd-fact .l { font-size: .76rem; color: var(--s-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }

/* ------------------------------------------------------------ Sections */
.sd-section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.sd-section-head h2 { font-size: 1.25rem; margin: 0; }
.sd-section-head p { color: var(--s-muted); font-size: .85rem; margin: 4px 0 0; }

/* -------------------------------------------------------------- Chips */
.sd-seg { display: inline-flex; background: var(--s-green-soft); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.sd-seg button {
    border: 0; background: transparent; color: var(--s-muted);
    padding: 7px 14px; border-radius: 8px; font-size: .82rem; font-weight: 700; transition: all .16s ease;
}
.sd-seg button.on { background: #fff; color: var(--s-green); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.sd-activefilters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sd-pill {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--s-gold-soft); color: #A9760A; border: 1px solid rgba(235,167,26,.35);
    font-size: .78rem; font-weight: 700; padding: 5px 10px; border-radius: 999px;
}
.sd-pill button { border: 0; background: none; color: inherit; padding: 0; line-height: 1; font-size: .8rem; }
.sd-pill button:hover { color: #7a5606; }

/* ------------------------------------------------------------ Filters */
.sd-filters {
    background: #fff; border: 1px solid var(--s-line); border-radius: var(--s-radius);
    padding: 14px; margin-bottom: 18px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px;
}
.sd-input, .sd-select {
    width: 100%; background: #fff; color: var(--s-ink);
    border: 1px solid var(--s-line); border-radius: 10px;
    padding: 10px 12px; font-size: .86rem; outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.sd-input:focus, .sd-select:focus { border-color: var(--s-gold); box-shadow: 0 0 0 3px rgba(235,167,26,.12); }
.sd-field label {
    display: block; font-size: .7rem; font-weight: 800; letter-spacing: .07em;
    text-transform: uppercase; color: var(--s-muted); margin-bottom: 6px;
}
.sd-filters-actions { display: flex; align-items: flex-end; gap: 8px; }

/* ------------------------------------------------------------ Buttons */
.sd-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--s-gold); color: #fff; border: 1px solid var(--s-gold);
    padding: 10px 18px; border-radius: 10px; font-weight: 700; font-size: .87rem;
    transition: all .18s ease; white-space: nowrap;
}
.sd-btn:hover { background: #d4930f; border-color: #d4930f; color: #fff; }
.sd-btn.ghost { background: #fff; color: var(--s-green); border-color: var(--s-line); }
.sd-btn.ghost:hover { border-color: var(--s-gold); background: var(--s-gold-soft); color: var(--s-green); }
.sd-btn.sm { padding: 8px 13px; font-size: .8rem; border-radius: 9px; }
.sd-btn.block { width: 100%; }

/* -------------------------------------------------------------- Cards */
.sd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 20px; }
.sd-grid.list { grid-template-columns: 1fr; }

.sd-card {
    background: var(--s-card); border: 1px solid var(--s-line); border-radius: var(--s-radius);
    overflow: hidden; display: flex; flex-direction: column; height: 100%;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.sd-card:hover { transform: translateY(-4px); box-shadow: var(--s-shadow-hi); border-color: #DCE4E0; }

.sd-cover { position: relative; aspect-ratio: 16 / 8; background: var(--s-green-soft); overflow: hidden; }
.sd-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.sd-card:hover .sd-cover img { transform: scale(1.04); }
.sd-cover::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(20,30,25,.55) 0%, rgba(20,30,25,0) 55%);
}
.sd-cover .sd-cat {
    position: absolute; left: 12px; top: 12px; z-index: 2;
    background: rgba(255,255,255,.94); color: var(--s-green);
    font-size: .72rem; font-weight: 700; padding: 5px 11px; border-radius: 999px;
    backdrop-filter: blur(6px);
}
.sd-cover .sd-rank {
    position: absolute; right: 12px; top: 12px; z-index: 2;
    background: var(--s-gold); color: #fff; font-size: .72rem; font-weight: 800;
    padding: 5px 10px; border-radius: 999px;
}
.sd-cover .sd-loc {
    position: absolute; left: 12px; bottom: 10px; z-index: 2;
    color: #fff; font-size: .78rem; font-weight: 600; display: flex; align-items: center; gap: 5px;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

.sd-body { padding: 16px 16px 14px; display: flex; flex-direction: column; flex: 1; }
.sd-name { font-size: 1.05rem; line-height: 1.35; margin: 0 0 6px; }
.sd-name a { color: var(--s-green); }
.sd-card:hover .sd-name a { color: #C2900F; }

.sd-rating { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--s-muted); margin-bottom: 10px; }
.sd-stars { color: var(--s-gold); letter-spacing: 1px; font-size: .85rem; }
.sd-stars .off { color: #D8E0DB; }

.sd-summary {
    color: var(--s-muted); font-size: .855rem; line-height: 1.6; margin-bottom: 14px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.sd-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    background: var(--s-green-soft); border-radius: 11px; padding: 10px; margin-bottom: 12px;
}
.sd-stat { text-align: center; min-width: 0; }
.sd-stat .n { font-size: .95rem; font-weight: 800; color: var(--s-green); font-family: 'Raleway', sans-serif; line-height: 1.1; }
.sd-stat .l { font-size: .66rem; color: var(--s-muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 3px; font-weight: 700; }

.sd-coins { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.sd-coin {
    background: var(--s-gold-soft); color: #A9760A; font-size: .68rem; font-weight: 800;
    padding: 3px 8px; border-radius: 5px; letter-spacing: .03em;
}
.sd-coin.more { background: var(--s-green-soft); color: var(--s-muted); }

.sd-ships { font-size: .78rem; color: var(--s-muted); display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.sd-ships i { color: var(--s-gold); }
.sd-freeship {
    background: #E4F4EA; color: #1E7A45; font-size: .66rem; font-weight: 800;
    padding: 2px 7px; border-radius: 5px; text-transform: uppercase; letter-spacing: .04em;
}

.sd-foot { margin-top: auto; }

/* List view tweaks */
.sd-grid.list .sd-card { flex-direction: row; }
.sd-grid.list .sd-cover { flex: 0 0 260px; aspect-ratio: auto; }
.sd-grid.list .sd-body { flex: 1; }
.sd-grid.list .sd-summary { -webkit-line-clamp: 3; }

/* ------------------------------------------------------- Top stores */
.sd-top { background: #fff; border-bottom: 1px solid var(--s-line); padding: 30px 0 34px; }
.sd-top .sd-card { border-color: #E2E8E4; }
.sd-medal {
    width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center;
    font-size: .72rem; font-weight: 800; flex: 0 0 auto;
}
.sd-medal.g1 { background: #FDF0D2; color: #8A6508; }
.sd-medal.g2 { background: #ECEFF1; color: #5C6B64; }
.sd-medal.g3 { background: #F6E7DC; color: #8A5A32; }

/* ------------------------------------------------------------ States */
.sd-empty { text-align: center; padding: 64px 20px; color: var(--s-muted); }
.sd-empty i { font-size: 2.6rem; color: #CBD6D0; display: block; margin-bottom: 16px; }
.sd-empty h5 { margin-bottom: 8px; }

.sd-skeleton { background: var(--s-card); border: 1px solid var(--s-line); border-radius: var(--s-radius); overflow: hidden; }
.sd-skeleton .sk { background: linear-gradient(90deg, #EFF3F1 25%, #F7FAF8 50%, #EFF3F1 75%); background-size: 400% 100%; animation: sd-shimmer 1.3s ease infinite; }
.sd-skeleton .sk-cover { aspect-ratio: 16/8; }
.sd-skeleton .sk-line { height: 12px; border-radius: 6px; margin: 12px 16px; }
.sd-skeleton .sk-line.short { width: 45%; }
@keyframes sd-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.sd-count { font-size: .87rem; color: var(--s-muted); }
.sd-count strong { color: var(--s-ink); }

/* -------------------------------------------------------- Pagination */
.sd-pager { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 34px; }
.sd-pager button {
    min-width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--s-line);
    background: #fff; color: var(--s-green); font-weight: 600; font-size: .88rem; padding: 0 12px;
    transition: border-color .16s ease;
}
.sd-pager button:hover:not(:disabled) { border-color: var(--s-gold); }
.sd-pager button.on { background: var(--s-green); border-color: var(--s-green); color: #fff; }
.sd-pager button:disabled { opacity: .4; }

/* --------------------------------------------------------- Responsive */
@media (max-width: 991.98px) {
    .sd-grid.list .sd-card { flex-direction: column; }
    .sd-grid.list .sd-cover { flex: none; aspect-ratio: 16/8; }
}
@media (max-width: 767.98px) {
    .sd-hero { padding: 28px 0 26px; }
    .sd-searchbar { max-width: none; margin-top: 18px; }
    .sd-facts { gap: 16px 26px; }
    .sd-fact .n { font-size: 1.15rem; }
    .sd-grid { grid-template-columns: 1fr; }
    .sd-filters { grid-template-columns: 1fr 1fr; }
    .sd-filters-actions { grid-column: 1 / -1; }
    .sd-top { padding: 22px 0 26px; }
}
@media (max-width: 479.98px) {
    .sd-filters { grid-template-columns: 1fr; }
}
