/* ======================================================
   Awin Store Pages — store-page.css  v2.3
   Theme-compatible: uses CSS custom properties
   ====================================================== */

.asp-page {
    --asp-primary:   var(--wp--preset--color--primary, #e85d2b);
    --asp-dark:      #111827;
    --asp-text:      #1f2937;
    --asp-muted:     #6b7280;
    --asp-border:    #e5e7eb;
    --asp-bg:        #f9fafb;
    --asp-card:      #ffffff;
    --asp-radius:    10px;
    --asp-shadow:    0 1px 4px rgba(0,0,0,.07);
    --asp-shadow-md: 0 4px 16px rgba(0,0,0,.11);
    font-family: inherit;
    color: var(--asp-text);
}

/* ── Layout ──────────────────────────────────────────── */
.asp-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.asp-body {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    padding: 32px 20px;
    max-width: 1200px;
    margin: 0 auto;
}
@media (max-width:900px) { .asp-body { grid-template-columns:1fr; } .asp-sidebar { order:-1; } }

/* ── Hero ─────────────────────────────────────────────── */
.asp-hero {
    background: linear-gradient(135deg,#111827 0%,#1e3a5f 100%);
    padding: 28px 0 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.asp-hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: .15;
}
.asp-hero .asp-container { position: relative; }

.asp-breadcrumb {
    font-size: .8rem; color: rgba(255,255,255,.55);
    display: flex; align-items: center; flex-wrap: wrap; gap: 5px;
    margin-bottom: 18px;
}
.asp-breadcrumb a { color: rgba(255,255,255,.7); text-decoration: none; }
.asp-breadcrumb a:hover { color: #fff; }

.asp-store-header { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.asp-store-logo-wrap {
    flex-shrink: 0; width: 88px; height: 66px;
    background: #fff; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    padding: 8px; box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.asp-store-logo { max-width: 72px; max-height: 50px; object-fit: contain; }
.asp-store-logo-fallback { font-size: 1.4rem; font-weight: 800; color: var(--asp-primary); }

.asp-store-info { flex: 1; min-width: 200px; }
.asp-store-title { font-size: 1.75rem; font-weight: 800; margin: 0 0 8px; color: #fff; line-height: 1.2; }

.asp-store-meta-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.asp-meta-pill {
    font-size: .75rem; padding: 3px 10px; border-radius: 20px;
    background: rgba(255,255,255,.12); color: rgba(255,255,255,.85);
    border: 1px solid rgba(255,255,255,.2);
}
.asp-rating { color: #fbbf24; background: rgba(251,191,36,.15); border-color: rgba(251,191,36,.3); }

.asp-store-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.asp-stat { display: flex; flex-direction: column; }
.asp-stat strong { font-size: 1.4rem; font-weight: 800; color: #fff; line-height: 1; }
.asp-stat span { font-size: .75rem; color: rgba(255,255,255,.55); margin-top: 2px; }

.asp-btn-visit {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--asp-primary); color: #fff !important;
    font-weight: 700; font-size: .9rem; padding: 12px 22px;
    border-radius: 8px; text-decoration: none;
    transition: opacity .15s, transform .15s;
    box-shadow: 0 4px 14px rgba(232,93,43,.4);
    white-space: nowrap;
}
.asp-btn-visit:hover { opacity: .88; transform: translateY(-1px); color: #fff !important; text-decoration: none; }

/* ── Section ──────────────────────────────────────────── */
.asp-section { margin-bottom: 36px; }
.asp-section-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.asp-section-title {
    font-size: 1.15rem; font-weight: 700; margin: 0; padding: 0;
    border: none; color: var(--asp-dark);
}

/* ── Filter Tabs ──────────────────────────────────────── */
.asp-filter-tabs { display: flex; gap: 6px; }
.asp-tab {
    padding: 6px 16px; border: 1.5px solid var(--asp-border);
    border-radius: 50px; background: var(--asp-card);
    color: var(--asp-text); font-size: .82rem; font-weight: 600;
    cursor: pointer; transition: all .15s;
}
.asp-tab:hover, .asp-tab.active {
    background: var(--asp-primary); border-color: var(--asp-primary); color: #fff;
}

/* ── Deals Grid ───────────────────────────────────────── */
.asp-deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* ── Deal Card ────────────────────────────────────────── */
.asp-deal-card {
    background: var(--asp-card); border: 1.5px solid var(--asp-border);
    border-radius: var(--asp-radius);
    transition: box-shadow .18s, transform .18s;
    overflow: hidden;
    display: flex; flex-direction: column;
}
.asp-deal-card:hover { box-shadow: var(--asp-shadow-md); transform: translateY(-2px); }
.asp-deal-card.type-coupon { border-top: 3px solid var(--asp-primary); }
.asp-deal-card.type-deal   { border-top: 3px solid #10b981; }

.asp-deal-image-wrap { width: 100%; height: 130px; overflow: hidden; flex-shrink: 0; }
.asp-deal-image { width: 100%; height: 100%; object-fit: cover; display: block; }

.asp-deal-inner { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.asp-deal-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.asp-deal-badge {
    font-size: .68rem; font-weight: 800; text-transform: uppercase;
    padding: 2px 9px; border-radius: 20px; letter-spacing: .05em;
}
.type-coupon .asp-deal-badge { background: #fff0eb; color: var(--asp-primary); }
.type-deal   .asp-deal-badge { background: #ecfdf5; color: #059669; }

.asp-discount-badge {
    font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 20px;
    background: var(--asp-primary); color: #fff; letter-spacing: .02em;
}
.asp-deal-exclusive {
    font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 20px;
    background: #fef3c7; color: #92400e;
}

.asp-deal-title { font-size: .95rem; font-weight: 700; line-height: 1.4; margin: 0; color: var(--asp-dark); }
.asp-deal-desc {
    font-size: .82rem; color: var(--asp-muted); line-height: 1.5; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.asp-min-order { font-size: .72rem; color: var(--asp-muted); font-style: italic; }

.asp-deal-expiry {
    font-size: .75rem; color: var(--asp-muted);
    display: flex; align-items: center; gap: 4px;
}
.asp-deal-expiry.urgent   { color: #dc2626; font-weight: 600; }
.asp-deal-expiry.expired  { color: #9ca3af; }
.asp-deal-expiry svg { flex-shrink: 0; }

/* ── Coupon Box ───────────────────────────────────────── */
.asp-coupon-box {
    border: 2px dashed var(--asp-primary);
    border-radius: 7px; overflow: hidden; display: flex;
    margin-top: 4px;
}
.asp-coupon-hidden {
    flex: 1; padding: 9px 12px; background: #fff8f5;
    display: flex; align-items: center; gap: 8px;
    font-size: .85rem; color: var(--asp-muted); cursor: pointer;
}
.asp-coupon-dots {
    font-size: 1rem; letter-spacing: 3px; font-weight: 700;
    color: var(--asp-primary); opacity: .6;
}
.asp-coupon-hint { font-size: .75rem; }
.asp-coupon-visible {
    flex: 1; padding: 9px 12px; background: #fff8f5;
    font-family: 'Courier New', monospace; font-size: 1rem;
    font-weight: 800; color: var(--asp-primary); letter-spacing: .08em;
    display: none; align-items: center;
}
.asp-coupon-visible.shown { display: flex; }
.asp-coupon-hidden.hidden  { display: none; }

.asp-reveal-btn {
    padding: 9px 14px; background: var(--asp-primary); color: #fff;
    border: none; cursor: pointer; font-size: .8rem; font-weight: 700;
    transition: background .15s; flex-shrink: 0;
}
.asp-reveal-btn:hover { background: #c9491f; }
.asp-copy-btn {
    padding: 9px 14px; background: #10b981; color: #fff;
    border: none; cursor: pointer; font-size: .8rem; font-weight: 700;
    transition: background .15s; flex-shrink: 0;
}
.asp-copy-btn:hover  { background: #059669; }
.asp-copy-btn.copied { background: #374151; }

/* View Offer buttons */
.asp-view-offer-btn {
    display: block; text-align: center; padding: 9px;
    background: var(--asp-dark); color: #fff !important;
    border-radius: 6px; font-weight: 700; font-size: .85rem;
    text-decoration: none; transition: background .15s; margin-top: 6px;
}
.asp-view-offer-btn:hover { background: #374151; color: #fff !important; text-decoration: none; }

.asp-deal-btn {
    display: block; text-align: center; padding: 10px;
    background: var(--asp-dark); color: #fff !important;
    border-radius: 6px; font-weight: 700; font-size: .85rem;
    text-decoration: none; transition: background .15s; margin-top: auto;
}
.asp-deal-btn:hover { background: #374151; color: #fff !important; text-decoration: none; }

/* ── Loading / Empty ──────────────────────────────────── */
.asp-loading {
    grid-column: 1/-1; padding: 56px;
    text-align: center; color: var(--asp-muted);
}
.asp-spinner {
    width: 30px; height: 30px;
    border: 3px solid var(--asp-border); border-top-color: var(--asp-primary);
    border-radius: 50%; animation: aspSpin .7s linear infinite;
    margin: 0 auto 12px;
}
@keyframes aspSpin { to { transform: rotate(360deg); } }

.asp-empty-state { grid-column: 1/-1; padding: 56px; text-align: center; color: var(--asp-muted); }
.asp-empty-icon { font-size: 2.5rem; margin-bottom: 8px; }

/* ── Load More ────────────────────────────────────────── */
.asp-load-more-wrap { text-align: center; margin-top: 20px; }
.asp-btn-load-more {
    padding: 11px 32px; border: 2px solid var(--asp-border);
    border-radius: 8px; background: var(--asp-card); font-size: .9rem;
    font-weight: 600; cursor: pointer; transition: all .15s; color: var(--asp-text);
}
.asp-btn-load-more:hover { border-color: var(--asp-primary); color: var(--asp-primary); }

/* ── About ────────────────────────────────────────────── */
.asp-about-content {
    background: var(--asp-card); border: 1px solid var(--asp-border);
    border-radius: var(--asp-radius); padding: 22px; line-height: 1.8;
}

/* ── Articles ─────────────────────────────────────────── */
.asp-articles-grid {
    display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 18px;
}
.asp-article-card {
    background: var(--asp-card); border: 1px solid var(--asp-border);
    border-radius: var(--asp-radius); overflow: hidden; transition: box-shadow .18s;
}
.asp-article-card:hover { box-shadow: var(--asp-shadow-md); }
.asp-article-thumb { display: block; aspect-ratio: 16/9; overflow: hidden; }
.asp-article-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.asp-article-thumb:hover img { transform: scale(1.04); }
.asp-article-body { padding: 14px; }
.asp-article-title { font-size: .9rem; font-weight: 700; margin: 0 0 6px; line-height: 1.4; }
.asp-article-title a { color: var(--asp-dark); text-decoration: none; }
.asp-article-title a:hover { color: var(--asp-primary); }
.asp-article-excerpt { font-size: .8rem; color: var(--asp-muted); margin: 0 0 10px; line-height: 1.5; }
.asp-article-link { font-size: .8rem; font-weight: 600; color: var(--asp-primary); text-decoration: none; }

/* ── Sidebar ──────────────────────────────────────────── */
.asp-sidebar { display: flex; flex-direction: column; gap: 18px; }
.asp-sidebar-card {
    background: var(--asp-card); border: 1px solid var(--asp-border);
    border-radius: var(--asp-radius); padding: 18px;
}
.asp-sidebar-title { font-size: .92rem; font-weight: 700; margin: 0 0 12px; color: var(--asp-dark); }
.asp-sidebar-logo {
    display: block; max-width: 110px; max-height: 56px;
    object-fit: contain; margin: 0 auto 12px;
}
.asp-btn-visit-sm {
    display: block; text-align: center; padding: 10px;
    background: var(--asp-primary); color: #fff !important;
    border-radius: 7px; font-weight: 700; font-size: .85rem;
    text-decoration: none; margin-bottom: 14px; transition: opacity .15s;
}
.asp-btn-visit-sm:hover { opacity: .88; color: #fff !important; text-decoration: none; }

.asp-store-meta { list-style: none; margin: 0; padding: 0; }
.asp-store-meta li {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 0; font-size: .83rem; color: var(--asp-text);
    border-bottom: 1px solid var(--asp-border);
}
.asp-store-meta li:last-child { border-bottom: none; }
.asp-store-meta span { font-size: .95rem; flex-shrink: 0; }

.asp-how-to { margin: 0; padding: 0 0 0 18px; }
.asp-how-to li { font-size: .83rem; line-height: 1.6; margin-bottom: 5px; color: var(--asp-text); }

.asp-related-stores { list-style: none; margin: 0; padding: 0; }
.asp-related-store-link {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 0; text-decoration: none; color: var(--asp-text);
    border-bottom: 1px solid var(--asp-border); transition: color .15s;
}
.asp-related-stores li:last-child .asp-related-store-link { border-bottom: none; }
.asp-related-store-link:hover { color: var(--asp-primary); text-decoration: none; }
.asp-related-store-link img {
    width: 40px; height: 30px; object-fit: contain; border-radius: 4px;
    background: var(--asp-bg); padding: 2px; border: 1px solid var(--asp-border);
}
.asp-rs-fallback {
    width: 40px; height: 30px; background: var(--asp-bg); border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .75rem; color: var(--asp-primary);
    flex-shrink: 0;
}
.asp-related-store-link span:last-child { font-size: .85rem; font-weight: 500; }

/* ── Archive Page ─────────────────────────────────────── */
.asp-archive-hero {
    background: linear-gradient(135deg,#111827,#1e3a5f);
    padding: 44px 0 36px; color: #fff; text-align: center;
}
.asp-archive-title { font-size: 2rem; font-weight: 800; margin: 0 0 8px; color: #fff; }
.asp-archive-desc  { font-size: .95rem; color: rgba(255,255,255,.65); margin: 0 0 22px; }
.asp-archive-search { position: relative; max-width: 400px; margin: 0 auto; }
.asp-archive-search input {
    width: 100%; padding: 11px 44px 11px 18px;
    border: none; border-radius: 8px; font-size: .95rem; box-sizing: border-box;
    outline: none;
}
.asp-archive-search svg {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    color: #9ca3af; pointer-events: none;
}

.asp-archive-cats {
    display: flex; flex-wrap: wrap; gap: 7px;
    padding: 22px 0 4px; max-width: 1200px; margin: 0 auto;
}
.asp-cat-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 14px; border: 1.5px solid var(--asp-border);
    border-radius: 50px; background: var(--asp-card);
    font-size: .8rem; font-weight: 600; cursor: pointer; transition: all .15s;
    color: var(--asp-text);
}
.asp-cat-pill span {
    background: var(--asp-bg); padding: 0 6px;
    border-radius: 20px; font-size: .7rem; color: var(--asp-muted);
}
.asp-cat-pill:hover, .asp-cat-pill.active {
    background: var(--asp-primary); border-color: var(--asp-primary); color: #fff;
}
.asp-cat-pill.active span { background: rgba(255,255,255,.2); color: rgba(255,255,255,.9); }

.asp-archive-grid {
    display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr));
    gap: 14px; padding: 20px 0;
}
.asp-archive-card {
    background: var(--asp-card); border: 1.5px solid var(--asp-border);
    border-radius: var(--asp-radius); padding: 18px 12px 14px;
    text-align: center; text-decoration: none; color: var(--asp-text);
    transition: all .18s; display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.asp-archive-card:hover {
    border-color: var(--asp-primary); box-shadow: var(--asp-shadow-md);
    transform: translateY(-2px); text-decoration: none; color: var(--asp-text);
}
.asp-archive-card-logo { width: 80px; height: 54px; display: flex; align-items: center; justify-content: center; }
.asp-archive-card-logo img { max-width: 80px; max-height: 54px; object-fit: contain; }
.asp-archive-fallback {
    width: 80px; height: 54px; background: var(--asp-bg); border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.1rem; color: var(--asp-primary);
}
.asp-archive-card-name   { font-size: .86rem; font-weight: 700; line-height: 1.3; }
.asp-archive-card-sector { font-size: .7rem; color: var(--asp-muted); }
.asp-archive-card-cta    { font-size: .72rem; color: var(--asp-primary); font-weight: 600; margin-top: auto; }

.asp-pagination { padding: 8px 0 28px; text-align: center; }
.asp-pagination .page-numbers {
    display: inline-block; padding: 6px 14px; margin: 0 2px;
    border: 1px solid var(--asp-border); border-radius: 6px;
    text-decoration: none; color: var(--asp-text); font-size: .85rem; transition: all .15s;
}
.asp-pagination .page-numbers.current,
.asp-pagination .page-numbers:hover {
    background: var(--asp-primary); border-color: var(--asp-primary); color: #fff;
}

/* ── Article Content (post_content rendered below deals) ── */
.asp-article-content {
    line-height: 1.8;
    color: var(--asp-text);
}
.asp-article-content h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 28px 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--asp-border);
    color: var(--asp-dark);
}
.asp-article-content h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 18px 0 6px;
    color: var(--asp-dark);
}
.asp-article-content p   { margin: 0 0 12px; }
.asp-article-content ul,
.asp-article-content ol  { margin: 0 0 14px; padding-left: 22px; }
.asp-article-content li  { margin-bottom: 5px; }

/* Coupons note inside article body */
.asp-coupons-note {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    padding: 12px 16px;
    font-size: .88rem;
    color: #1d4ed8;
    margin: 8px 0 20px;
    display: flex;
    align-items: center;
}

/* Related stores grid inside article */
.asp-related-stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 10px;
}
.asp-related-store-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--asp-card);
    border: 1px solid var(--asp-border);
    border-radius: var(--asp-radius);
    text-decoration: none;
    color: var(--asp-text);
    font-size: .8rem;
    font-weight: 600;
    text-align: center;
    transition: all .15s;
}
.asp-related-store-card:hover {
    border-color: var(--asp-primary);
    box-shadow: var(--asp-shadow);
    text-decoration: none;
    color: var(--asp-text);
}
.asp-related-store-card img {
    width: 60px; height: 40px;
    object-fit: contain;
}
.asp-rs-fallback {
    width: 60px; height: 40px;
    background: var(--asp-bg);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .85rem;
    color: var(--asp-primary);
}

/* SEO title as H1 + visual store name */
.asp-store-display-name {
    font-size: .82rem;
    font-weight: 600;
    color: rgba(255,255,255,.6);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 4px;
}
.asp-store-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 10px;
    color: #fff;
    line-height: 1.25;
}
