/* ===========================================================
   Savedeals — Public design system (deals.php / deal.php)
   Bold "deal" palette: orange/red CTA, green price, red savings
   =========================================================== */

:root {
    --sd-bg: #f5f6f8;
    --sd-card: #ffffff;
    --sd-border: #eef0f3;
    --sd-text: #1f2430;
    --sd-muted: #6b7280;
    --sd-orange: #ff6a00;
    --sd-red: #f5365c;
    --sd-green: #16a34a;
    --sd-brand-grad: linear-gradient(135deg, #ff6a00 0%, #f5365c 100%);
    --sd-hero-grad: linear-gradient(135deg, #ff6a00 0%, #f5365c 60%, #e63946 100%);
    --sd-radius: 16px;
    --sd-shadow: 0 4px 14px rgba(17, 24, 39, .06);
    --sd-shadow-hover: 0 16px 32px rgba(17, 24, 39, .14);
}

/* Self-hosted fonts (no external request, display=swap) */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: optional; src: url('../fonts/poppins-400.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: optional; src: url('../fonts/poppins-600.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: optional; src: url('../fonts/poppins-700.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 800; font-display: optional; src: url('../fonts/poppins-800.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/inter-800.woff2') format('woff2'); }

body {
    background-color: var(--sd-bg);
    color: var(--sd-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }

/* ---------- Top navigation ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 14px rgba(17, 24, 39, .12);
}
.site-header .navbar-brand { letter-spacing: -.3px; }

/* ---------- Top search / filter bar (Amazon-style, sticky) ---------- */
.search-bar {
    background: #fff;
    border-bottom: 1px solid var(--sd-border);
    padding: 10px 0;
    position: sticky;
    top: 56px;
    z-index: 1020;
    box-shadow: 0 2px 10px rgba(17, 24, 39, .06);
}
.search-form { gap: 8px; }
.cat-select { max-width: 190px; border-radius: 8px !important; }
.search-group { flex: 1 1 320px; min-width: 220px; }
.search-group .form-control { border-radius: 8px 0 0 8px !important; border: 1px solid #dee2e6; }
.search-group .btn-deal { border-radius: 0 8px 8px 0 !important; }
.price-input { max-width: 110px; border-radius: 8px !important; }
.sort-select { max-width: 175px; border-radius: 8px !important; }

@media (max-width: 767px) {
    .search-bar { position: static; }
    .search-form { justify-content: stretch; }
    .cat-select,
    .price-input,
    .sort-select,
    .search-group { max-width: 100% !important; flex: 1 1 100% !important; }
}

/* ---------- Hero ---------- */
.hero {
    background: var(--sd-hero-grad);
    color: #fff;
    padding: 64px 0 76px;
    position: relative;
}
.hero .eyebrow {
    display: inline-block;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .25);
    padding: 5px 14px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .3px;
    margin-bottom: 14px;
}
.hero h1 {
    font-weight: 800;
    letter-spacing: -.6px;
}
.hero .lead { opacity: .92; }

.deal-search {
    background: #fff;
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 12px 30px rgba(17, 24, 39, .18);
}
.deal-search .form-control,
.deal-search .form-select {
    border: none;
    box-shadow: none;
    background: #f7f8fa;
    border-radius: 10px !important;
}
.deal-search .btn-deal { border-radius: 10px !important; }

/* ---------- Category chips ---------- */
.cat-chip {
    border: 1px solid #e2e6ec;
    color: #475065;
    background: #fff;
    border-radius: 999px;
    padding: 7px 16px;
    font-weight: 600;
    font-size: .9rem;
    transition: all .15s ease;
    white-space: nowrap;
}
.cat-chip:hover { border-color: var(--sd-orange); color: var(--sd-orange); }
.cat-chip.active {
    background: var(--sd-brand-grad);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(245, 54, 92, .3);
}

/* ---------- Deal cards ---------- */
.deal-card {
    background: var(--sd-card);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    overflow: hidden;
    box-shadow: var(--sd-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
    will-change: transform;
    height: 100%;
}
.deal-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--sd-shadow-hover);
}

.deal-media {
    position: relative;
    background: #fff;
    padding: 18px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f1f3f5;
    overflow: hidden;
}
.deal-media > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    text-decoration: none;
    outline: none;
}
.deal-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    min-width: 0;
    min-height: 0;
    transition: transform .3s ease;
}
.deal-card:hover .deal-img { transform: scale(1.04); }

.deal-img-placeholder {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #cbd2dc;
    background: #fff;
    border-bottom: 1px solid #f1f3f5;
}

/* Prominent, high-contrast play button overlay on deal cards */
.deal-media .video-play-btn {
    z-index: 4;
    width: 56px;
    height: 56px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(220, 53, 69, .92);
    border: 3px solid #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
}
.deal-media .video-play-btn .fa-play {
    color: #fff;
    font-size: 1.25rem;
    margin-left: 3px;
}
.deal-media .video-play-btn:hover { background: #dc3545; }

.discount-ribbon {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    background: var(--sd-brand-grad);
    color: #fff;
    font-weight: 800;
    font-size: .8rem;
    padding: 5px 11px;
    border-radius: 9px;
    box-shadow: 0 6px 14px rgba(245, 54, 92, .4);
}

/* Promotional corner ribbon (Top Seller / Top Saving / New Arrival) */
.deal-ribbon-corner {
    position: absolute;
    top: 0;
    left: 0;
    width: 88px;
    height: 88px;
    overflow: hidden;
    z-index: 4;
    pointer-events: none;
}
.deal-ribbon {
    position: absolute;
    top: 20px;
    left: -26px;
    width: 130px;
    transform: rotate(-45deg);
    text-align: center;
    color: #fff;
    font-weight: 800;
    font-size: .72rem;
    letter-spacing: .3px;
    padding: 5px 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .25);
}
.deal-ribbon--seller { background: linear-gradient(135deg, #f59e0b, #f97316); }
.deal-ribbon--saving { background: linear-gradient(135deg, #16a34a, #22c55e); }
.deal-ribbon--new    { background: linear-gradient(135deg, #2563eb, #3b82f6); }

.deal-cat {
    background: #eef0f3;
    color: #5a6472;
    font-weight: 600;
    font-size: .75rem;
    padding: 4px 9px;
    border-radius: 7px;
}
.deal-cat:hover { color: var(--sd-orange); }

.featured-badge {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    font-weight: 700;
}

/* ---------- Price block ---------- */
.price-old {
    color: #565f6b;
    text-decoration: line-through;
    font-size: .85rem;
}
.price-new {
    color: var(--sd-green);
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1.1;
}
.discount-badge {
    background: #d61f48;
    color: #fff;
    font-weight: 700;
    border-radius: 7px;
    padding: 2px 8px;
    font-size: .78rem;
}
.badge.bg-primary { color: #1f2430; }

.deal-card .card-title {
    font-size: calc(1rem - 6px);
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: .35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}
.deal-card .card-body { padding: 18px 16px; }
.deal-card .card-text { font-size: .82rem; }

/* ---------- Coupon ---------- */
.coupon-box {
    border: 2px dashed var(--sd-orange);
    background: #fff6ef;
    border-radius: 9px;
    padding: 7px 11px;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: #d44500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.copy-coupon-btn { border-radius: 8px; }

/* ---------- Buttons ---------- */
.btn-deal {
    background: var(--sd-brand-grad);
    color: #fff;
    border: none;
    font-weight: 700;
    border-radius: 11px;
    transition: transform .15s ease, box-shadow .2s ease;
}
.btn-deal:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(245, 54, 92, .35); }
.btn-deal i { transition: transform .2s ease; }
.btn-deal:hover i { transform: translateX(3px); }

/* ---------- Newsletter bar ---------- */
.newsletter-bar {
    background: linear-gradient(135deg, #1f2430 0%, #2b3242 100%);
    color: #fff;
    border-radius: 18px;
    padding: 26px 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 12px 30px rgba(17, 24, 39, .18);
    margin-bottom: 40px;
}
.newsletter-bar .nl-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: var(--sd-brand-grad);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex: 0 0 auto;
}
.newsletter-bar h3 { margin: 0; font-weight: 800; font-size: 1.25rem; }
.newsletter-bar p { margin: 2px 0 0; opacity: .75; font-size: .9rem; }
.newsletter-left { display: flex; align-items: center; gap: 16px; }
.newsletter-form { display: flex; gap: 8px; flex: 1; min-width: 260px; max-width: 440px; }
.newsletter-form input {
    border-radius: 11px;
    border: none;
    padding: 12px 16px;
    flex: 1;
    min-width: 0;
}
.newsletter-form .btn-deal { border-radius: 11px; padding: 12px 22px; white-space: nowrap; }
.newsletter-success { color: #7CFFB2; font-weight: 700; }

@media (max-width: 575px) {
    .newsletter-bar { flex-direction: column; align-items: stretch; text-align: left; }
    .newsletter-form { max-width: 100%; }
}

/* ===========================================================
   EShopper-inspired layout (shared public pages)
   =========================================================== */

/* Re-skin Bootstrap primary to the bold deal palette */
:root {
    --bs-primary: var(--sd-orange);
    --bs-primary-rgb: 255, 106, 0;
}

body {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Shared header ---------- */
.esh-logo {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -.5px;
    color: var(--sd-text);
    display: inline-flex;
    align-items: center;
}
.esh-logo-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--sd-brand-grad);
    color: #fff;
    font-weight: 900;
    border-radius: 8px;
    margin-right: 6px;
}
.esh-cta { white-space: nowrap; }

.esh-search .input-group .form-control {
    border-radius: 10px 0 0 10px;
    border: 1px solid #dee2e6;
}
.esh-search .input-group .btn { border-radius: 0 10px 10px 0; padding-left: 18px; padding-right: 18px; }
.esh-filterbar .form-control,
.esh-filterbar .form-select { border-radius: 10px; }

/* Category pills */
.cat-pills { overflow-x: auto; padding-bottom: 2px; }
.cat-pill {
    border: 1px solid var(--sd-border);
    color: #475065;
    background: #fff;
    border-radius: 999px;
    padding: 6px 16px;
    font-weight: 600;
    font-size: .88rem;
    white-space: nowrap;
    transition: all .15s ease;
}
.cat-pill:hover { border-color: var(--sd-orange); color: var(--sd-orange); }
.cat-pill.active {
    background: var(--sd-brand-grad);
    color: #fff;
    border-color: transparent;
}

/* ---------- Hero carousel ---------- */
.esh-hero { overflow: hidden; }
.esh-hero .carousel,
.esh-hero .carousel-inner,
.esh-hero .carousel-item { height: 400px; }
.esh-hero-slide {
    height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.esh-hero-slide::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(17,24,39,.65) 0%, rgba(17,24,39,.25) 60%, rgba(17,24,39,.1) 100%);
}
.esh-hero-fallback { background: var(--sd-hero-grad); }
.esh-hero-slide.grad { background: var(--sd-hero-grad); }
.esh-hero-slide.grad::before {
background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.4) 50%, rgba(0,0,0,.15) 100%);
}
.esh-hero-caption { position: absolute; inset: 0; z-index: 1; }
.esh-hero-caption .btn-primary { font-weight: 700; padding: .6rem 1.8rem; }
.esh-hero-caption .opacity-75 { opacity: 1 !important; }

/* ---------- Feature boxes ---------- */
.esh-feature { border-radius: 14px; transition: transform .2s ease, box-shadow .2s ease; will-change: transform; }
.esh-feature:hover { transform: translateY(-4px); box-shadow: var(--sd-shadow-hover); }
.esh-feature .fs-3 { line-height: 1; }

/* ---------- Offer banners ---------- */
.esh-offer { border-radius: 16px; }
.esh-offer-inner {
    border-radius: 16px;
    background: linear-gradient(135deg, #2b3242, #1f2430);
    transition: transform .3s ease;
}
.esh-offer:hover .esh-offer-inner { transform: translateY(-4px); }

/* ---------- Section title ---------- */
.section-title { position: relative; display: inline-block; font-weight: 800; font-family: 'Poppins', sans-serif; }
.section-title span { position: relative; z-index: 1; background: var(--sd-bg); padding: 0 .6rem; }
.section-title::before {
    content: '';
    position: absolute; left: 0; right: 0; top: 50%;
    border-top: 2px solid var(--sd-border);
}

/* ---------- Deal card as EShopper product-item ---------- */
.product-item { box-shadow: var(--sd-shadow); }
.product-item .deal-media {
    padding: 0;
    height: 200px;
    border-bottom: 1px solid var(--sd-border);
}
.product-item .deal-media > a { width: 100%; height: 100%; }
.product-item .deal-media .deal-img { object-fit: cover; }
.product-item:hover .deal-img { transform: scale(1.08); }
.product-item .card-body { text-align: center; padding: 16px 14px; }
.product-item .card-title { font-size: 1rem; font-weight: 700; }
.product-item .card-footer {
    background: #f8f9fa;
    border-top: 1px solid var(--sd-border);
}
.product-item .card-footer a { font-size: .85rem; font-weight: 600; }
.product-item .card-footer a:hover { color: var(--sd-orange); }

/* ---------- Trusted stores marquee ---------- */
.vendor-marquee { overflow: hidden; white-space: nowrap; }
.vendor-track {
    display: inline-flex; gap: 56px; align-items: center; padding: 10px 0;
    animation: vendorScroll 30s linear infinite;
    will-change: transform;
}
.vendor-item { font-weight: 800; font-size: 1.5rem; color: #565f6b; letter-spacing: .5px; }
@keyframes vendorScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Back to top ---------- */
.back-to-top {
    position: fixed; right: 18px; bottom: 18px;
    width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    z-index: 1040; box-shadow: 0 8px 20px rgba(0,0,0,.25);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: all .3s ease;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- Category sidebar (EShopper-style) ---------- */
#catSidebar { position: sticky; top: 1rem; }
.cat-sidebar { position: static; }
.cat-sidebar .card-header { border-bottom: 1px solid var(--sd-border); padding: .8rem 1.1rem; font-size: .95rem; }
.cat-sidebar .list-group-item {
    border-left: 3px solid transparent;
    color: var(--sd-text);
    font-weight: 500;
    padding: .65rem 1.15rem;
}
.cat-sidebar .list-group-item:hover { background: #f8f9fb; }
.cat-sidebar .list-group-item.active {
    background: var(--sd-primary);
    border-color: var(--sd-primary);
    border-left-color: #fff;
    color: #fff;
}
.cat-sidebar .list-group-item.active .badge.bg-light { background: rgba(255,255,255,.85) !important; color: var(--sd-primary) !important; }
.cat-sidebar-filter .form-control-sm:focus { border-color: var(--sd-primary); box-shadow: 0 0 0 .2rem rgba(255,106,0,.15); }

/* Top header inline nav (Home / Deals / Categories / Top Stores / Contact) */
.esh-topnav { gap: .25rem 1rem; }
.esh-topnav-link {
    color: var(--sd-text);
    font-weight: 600;
    padding: .35rem .6rem;
    border-radius: .4rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.esh-topnav-link:hover { background: rgba(0,0,0,.05); color: var(--sd-primary); }

.esh-saved-link {
    display: inline-flex;
    align-items: center;
    position: relative;
    color: #ef4444 !important;
}
.esh-saved-link i { font-size: 1.1rem; }
.esh-saved-link .sd-heart-icon {
    transition: transform .2s ease;
    filter: drop-shadow(0 1px 2px rgba(231,76,60,.3));
}
.esh-saved-link:hover .sd-heart-icon {
    transform: scale(1.2);
}
.esh-saved-count {
    position: absolute;
    top: -6px;
    right: -8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #ef4444;
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    line-height: 1;
}

@media (max-width: 991.98px) {
    #catSidebar { position: static; }
}

/* Collapsible category tree (deals sidebar) */
.cat-sidebar .cat-node { line-height: 1.25; }
.cat-sidebar .cat-row { min-height: 2.4rem; }
.cat-sidebar .cat-toggle {
    width: 1.5rem;
    padding: .1rem 0;
    border: 0;
    background: none;
    color: var(--sd-text-muted, #6c757d);
    flex: 0 0 auto;
}
.cat-sidebar .cat-toggle i { transition: transform .15s ease; }
.cat-sidebar .cat-toggle:not(.collapsed) i { transform: rotate(90deg); }
.cat-sidebar .cat-toggle-spacer { display: inline-block; width: 1.5rem; flex: 0 0 auto; }
.cat-sidebar .cat-name { padding: .5rem .2rem; font-size: .92rem; color: var(--sd-text); }
.cat-sidebar .cat-name:hover { color: var(--sd-primary); }
.cat-sidebar .cat-children { margin-left: .75rem; border-left: 1px solid var(--sd-border, #eee); padding-left: .35rem; }
.cat-sidebar .list-group-item { border-left: 0; border-right: 0; }

/* Amazon-style breadcrumb (Home › Dept › Subcat) */
.breadcrumb {
    background: transparent;
    padding: 0;
}
.breadcrumb.cat-breadcrumb { font-size: .82rem; }
.breadcrumb .breadcrumb-item a { color: #0a58ca; text-decoration: none; }
.breadcrumb .breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb .breadcrumb-item.active { color: #495057; }
.breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "\203A"; /* › */
    color: #adb5bd;
    padding: 0 .4rem;
    font-weight: 700;
}

/* ===========================================================
   Mobile enhancements
   =========================================================== */

/* Sticky bottom "View Deal" bar — deal detail page, phones/tablets only */
.mobile-deal-cta {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1035;
    background: rgba(31, 36, 48, .97);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 -6px 22px rgba(0, 0, 0, .28);
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-deal-cta .price-new { color: #4ade80; }

@media (max-width: 991.98px) {
    /* Keep the page content clear of the fixed CTA bar */
    .deal-detail { padding-bottom: 82px; }
}

/* Header top-nav: one horizontally scrolling row on mobile (no messy wrap) */
@media (max-width: 991.98px) {
    .esh-topnav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        -ms-overflow-style: none;
        scrollbar-width: none;
        padding-bottom: 2px;
        justify-content: center !important;
    }
    .esh-topnav::-webkit-scrollbar { display: none; }
    .esh-topnav-link { white-space: nowrap; }
}

/* Shorter hero on phones so it doesn't dominate the screen */
@media (max-width: 767px) {
    .esh-hero .carousel,
    .esh-hero .carousel-item,
    .esh-hero-slide { height: 260px; }
    .esh-hero-caption h2 { font-size: 1.5rem; }
    .esh-hero-caption .p-4 { padding: 1rem !important; }
}

/* ---------- Accessibility / contrast refinements ---------- */

/* Category count badge: light background + dark text passes AA contrast
   (white on the brand orange failed). */
.cat-sidebar .badge.bg-primary {
    background-color: #ffe8d6 !important;
    color: #a84300 !important;
}
.cat-sidebar .list-group-item.active .badge.bg-primary {
    background-color: rgba(255, 255, 255, .9) !important;
    color: var(--sd-primary) !important;
}

/* Topbar social icons need a usable tap target (>= 24px). */
.topbar-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
}

/* Footer brand text must be light on the dark footer. */
#siteFooter .esh-logo { color: #fff; }

/* ---------- Storefront horizontal product rows ---------- */
.hscroll-row { position: relative; }
.hscroll-track {
    display: flex;
    gap: .75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: .25rem .25rem .75rem;
    scrollbar-width: thin;
}
.hscroll-col {
    flex: 0 0 auto;
    width: 230px;
    max-width: 78vw;
    scroll-snap-align: start;
    display: flex;
}
.hscroll-col > .deal-card { width: 100%; }
@media (max-width: 575.98px) {
    .hscroll-col { width: 165px; }
}
.hscroll-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: .92;
    color: #212529;
}
.hscroll-nav:hover { color: #000; }
.hscroll-nav svg { display: block; }
.hscroll-prev { left: 2px; }
.hscroll-next { right: 2px; }

/* ---------- Category gradient tiles ---------- */
.cat-tile {
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    transition: transform .2s ease, box-shadow .2s ease;
    overflow: hidden;
    position: relative;
}
.cat-tile.has-img {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.cat-tile.has-img::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 45%, rgba(0,0,0,.05) 100%);
    z-index: 0;
}
.cat-tile.has-img .cat-tile-name,
.cat-tile.has-img .cat-tile-count { position: relative; z-index: 1; }
a:hover > .cat-tile,
.cat-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--sd-shadow-hover);
    color: #fff;
    text-decoration: none;
}
.cat-tile-name {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.cat-tile-count { font-size: .8rem; opacity: .92; margin-top: .2rem; }

/* ---------- Departments offcanvas ---------- */
#deptMenu .list-group { width: 100%; border-radius: 0; }
#deptMenu .cat-tree-link { padding: .5rem .25rem; }

/* Keep the category sidebar fixed while the deal cards scroll/load (deals.php). */
@media (min-width: 992px) {
    #catSidebar {
        position: sticky;
        top: 84px;
        align-self: flex-start;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }
}

/* ---------- Store logo in deal cards ---------- */
.deal-store-logo {
    height: 18px;
    width: auto;
    max-width: 72px;
    object-fit: contain;
    border-radius: 3px;
    vertical-align: middle;
    background: #fff;
    padding: 1px;
}

/* ---------- Shop by Category tiles (deals page) ---------- */
.cat-card {
    transition: transform .15s ease, box-shadow .2s ease;
    overflow: hidden;
    border-radius: var(--sd-radius);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(0,0,0,.10); }
.cat-card-media {
    height: 104px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 10px;
    overflow: hidden;
    border-bottom: 1px solid #f1f3f5;
}
.cat-card-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.cat-card-fallback { color: #cbd2dc; font-size: 1.8rem; }
.cat-card-body { padding: 10px 12px; }
.cat-card-name { display: block; font-weight: 600; font-size: .9rem; color: var(--sd-text); line-height: 1.2; }

/* Force Font Awesome icons to swap (FA's CDN CSS ships font-display:block,
   which can hide icons for up to 3s and hurt LCP). Redeclare with swap. */
@font-face { font-family: 'Font Awesome 6 Free'; font-style: normal; font-weight: 900; font-display: swap; src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/webfonts/fa-solid-900.woff2') format('woff2'); }
@font-face { font-family: 'Font Awesome 6 Brands'; font-style: normal; font-weight: 400; font-display: swap; src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/webfonts/fa-brands-400.woff2') format('woff2'); }

/* Load-more skeleton placeholders — fixed dimensions so swapping in real
   cards causes zero layout shift (CLS). */
.skeleton-card { border: 1px solid var(--sd-border); }
.skeleton-media { width: 100%; aspect-ratio: 3 / 2; background: #eef0f3; }
.skeleton-line { height: .7rem; border-radius: 6px; margin: .5rem 0; background: #eef0f3; }
.skeleton-card, .skeleton-media, .skeleton-line {
    background: linear-gradient(100deg, #eef0f3 30%, #f7f8fa 50%, #eef0f3 70%);
    background-size: 200% 100%;
    animation: sd-shimmer 1.2s ease-in-out infinite;
}
@keyframes sd-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
    .skeleton-card, .skeleton-media, .skeleton-line { animation: none; }
}

/* Expired deal card (greyed). Kept visible during the grace window. */
.deal-card.deal-expired { opacity: .6; filter: grayscale(1); }
.deal-card.deal-expired .btn-get-deal,
.deal-card.deal-expired .btn-outline-secondary { pointer-events: none; opacity: .65; }
.deal-card.deal-expired .deal-card-media { background: #f6f6f6; }

/* Slim always-visible affiliate disclosure line */
.affiliate-disclosure-bar {
    font-size: .85rem;
    background: #f8f9fb;
    border-color: #e6e8ec !important;
    color: #4a4f57;
    margin-bottom: 1rem;
}
.affiliate-disclosure-bar a { text-decoration: underline; }

/* Shared discovery/account shell refinements */
.sd-discover-hero{border:1px solid rgba(17,24,39,.08);border-radius:18px;background:linear-gradient(135deg,rgba(255,106,0,.10),rgba(13,110,253,.06));}
.sd-discover-filter{position:sticky;top:14px;}
@media(max-width:991.98px){.sd-discover-filter{position:static;}}

/* Phase 4/5 robust homepage */
.sd-home-hero{background:linear-gradient(135deg,#fff8f1,#fff);border-bottom:1px solid var(--sd-border)}
.sd-hero-proof{background:#fff;border:1px solid var(--sd-border);border-radius:20px;padding:1.5rem;box-shadow:var(--sd-shadow)}
.sd-hero-proof-badge{display:inline-flex;gap:.4rem;align-items:center;background:#ecfdf3;color:#166534;border:1px solid #bbf7d0;border-radius:999px;padding:.35rem .7rem;font-size:.75rem;font-weight:800;margin-bottom:1rem}
.sd-home-card{overflow:hidden;border-radius:16px;transition:transform .15s ease,box-shadow .15s ease;will-change:transform}
.sd-home-card:hover{transform:translateY(-3px);box-shadow:0 14px 32px rgba(17,24,39,.10)!important}
.sd-home-card-media{display:block;background:#fff}
.sd-home-card-media img{display:block;width:100%;height:210px;object-fit:contain;padding:1rem}
.sd-home-card-placeholder{display:flex;align-items:center;justify-content:center;height:210px;background:#f8fafc;color:#98a2b3;font-size:2rem}
.sd-home-discount{display:inline-flex;padding:.22rem .48rem;border-radius:999px;background:#fff1eb;color:#c2410c;font-weight:800;font-size:.7rem}
.sd-category-tile{min-height:130px;border-radius:16px;padding:1rem;color:#fff;background:#334155;box-shadow:0 8px 22px rgba(17,24,39,.08);position:relative;overflow:hidden}
.sd-category-tile:after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,transparent 30%,rgba(0,0,0,.28));}
.sd-category-tile strong,.sd-category-tile span{position:relative;z-index:1}
.sd-category-tile strong{font-size:.92rem;line-height:1.2}.sd-category-tile span{font-size:.72rem;opacity:.9;margin-top:.2rem}
.sd-store-chip{display:flex;flex-direction:column;gap:.15rem;padding:.85rem 1rem;border:1px solid var(--sd-border);border-radius:12px;background:#fff;color:var(--sd-text);height:100%}.sd-store-chip span{font-size:.72rem;color:#667085}
.sd-home-cta{display:flex;align-items:center;justify-content:space-between;gap:1rem;border:1px solid var(--sd-border);border-radius:18px;padding:1.25rem 1.4rem;background:linear-gradient(135deg,#fff,#fff8f1)}
@media(max-width:767.98px){.sd-home-card:hover{transform:none}.sd-home-hero{padding-block:2.5rem!important}.sd-home-card-media img,.sd-home-card-placeholder{height:180px}.sd-home-cta{flex-direction:column;align-items:flex-start}.sd-home-cta .btn{width:100%}}

.sd-category-tile{background-position:center!important;background-size:cover!important;}
.sd-category-has-image{min-height:150px;text-shadow:0 2px 8px rgba(0,0,0,.35)}
.sd-category-has-image strong{max-width:95%;}
@media(max-width:575.98px){.sd-category-has-image{min-height:135px;}}


/* Phase 4/5 — Discover, Guides & Best Deals refinements */
.sd-best-hero{background:linear-gradient(135deg,#171a21 0%,#303746 70%,#4a3b2b 100%);color:#fff;border-radius:22px;padding:clamp(1.4rem,4vw,2.5rem);box-shadow:0 18px 42px rgba(17,24,39,.14);}
.sd-best-hero p{color:#d7dde7;max-width:850px}.sd-best-facts{display:flex;flex-wrap:wrap;gap:.6rem}.sd-best-facts span{display:inline-flex;align-items:center;gap:.4rem;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.08);border-radius:999px;padding:.42rem .7rem;font-size:.78rem;color:#f5f7fa}.sd-best-facts i{color:#ffb45a}.sd-discover-proof{margin-top:-8px}.sd-discover-stat{height:100%;text-align:center;background:#fff;border:1px solid var(--sd-border);border-radius:14px;padding:.9rem .5rem;box-shadow:0 8px 20px rgba(17,24,39,.04)}.sd-discover-stat strong{display:block;font-size:1.15rem}.sd-discover-stat span{display:block;font-size:.72rem;color:#667085}.sd-discover-start{padding:1.15rem;border:1px solid var(--sd-border);border-radius:18px;background:linear-gradient(135deg,#fffaf4,#fff)}.sd-discover-chip{display:inline-flex;gap:.45rem;align-items:center;text-decoration:none;color:#1f2937;background:#fff;border:1px solid #e6eaf0;padding:.55rem .75rem;border-radius:999px;font-size:.82rem;font-weight:700}.sd-discover-chip span{font-size:.7rem;color:#667085;background:#f2f4f7;padding:.12rem .35rem;border-radius:999px}.sd-empty-icon{width:46px;height:46px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:#fff7ed;color:#c46b00;margin-bottom:.75rem}.sd-guides-intent{padding:1.25rem;border:1px solid var(--sd-border);border-radius:18px;background:#fff}.sd-guides-intent-head{display:flex;align-items:end;justify-content:space-between;gap:1rem}.sd-guide-topic{height:100%;display:flex;flex-direction:column;gap:.25rem;text-decoration:none;color:var(--sd-text);padding:.85rem 1rem;border:1px solid var(--sd-border);border-radius:13px;background:#fafbfc}.sd-guide-topic span{font-size:.74rem;color:#667085}.sd-guide-topic em{font-style:normal;font-size:.72rem;font-weight:800;color:var(--sd-orange);margin-top:auto}.sd-editorial-card{transition:transform .15s ease,box-shadow .15s ease}.sd-editorial-card:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(17,24,39,.08)}
@media(max-width:767.98px){.sd-best-facts{gap:.35rem}.sd-best-facts span{font-size:.7rem;padding:.35rem .55rem}.sd-guides-intent-head{align-items:flex-start;flex-direction:column}.sd-discover-stat{padding:.7rem .2rem}}


/* Compact social sharing icons */
.sd-social-share{display:flex;align-items:center;gap:.55rem;margin-top:1rem;padding-top:.9rem;border-top:1px solid var(--sd-border);min-height:44px}
.sd-social-label{font-size:.78rem;font-weight:800;color:#667085;margin-right:.15rem}
.sd-social-icon{width:38px;height:38px;border-radius:50%;border:1px solid #e1e5ea;background:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:1rem;color:#344054;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease;padding:0;line-height:1;appearance:none;-webkit-appearance:none;cursor:pointer}.sd-social-icon svg{width:18px;height:18px;display:block}
.sd-social-icon:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(17,24,39,.10);border-color:#c9ced6}
.sd-social-facebook:hover{color:#1877f2}.sd-social-instagram:hover{color:#c13584}.sd-social-x:hover{color:#111}
.sd-social-status{font-size:.72rem;color:#166534;font-weight:700;margin-left:.2rem;min-width:72px}
@media(max-width:575.98px){.sd-social-share{justify-content:center}.sd-social-label{margin-right:.15rem}.sd-social-icon{width:40px;height:40px}}


/* SaveDeals premium commerce refinements */
.btn-deal, .sd-home-card .btn-primary {
  background:#ffd814;
  border:1px solid #f3c300;
  border-color:#f3c300;
  color:#111827;
  box-shadow:0 1px 2px rgba(15,23,42,.08);
  font-weight:800;
}
.btn-deal:hover, .sd-home-card .btn-primary:hover {
  background:#f7ca00;
  border-color:#e5b800;
  color:#111827;
  transform:translateY(-1px);
  box-shadow:0 5px 13px rgba(15,23,42,.12);
}
.sd-card-rank.compact{margin:.55rem 0 0;padding:.48rem .58rem;border-radius:8px;background:#f8fafc;border:1px solid #e4e7ec}
.sd-card-rank.compact .sd-card-rank-top{font-size:.66rem}
.sd-card-rank.compact .sd-card-rank-note{display:none}
.sd-bought-proof{font-size:.72rem;color:#256c45;background:#f3faf6;border:1px solid #d9eee2;border-radius:7px;padding:.34rem .5rem;display:inline-flex;align-items:center;width:max-content}
/* Reduce visual noise: store and verification metadata are quieter than the title/price. */
.deal-store,.deal-verified{color:#667085!important;font-size:.72rem}
.deal-store-logo{width:18px;height:18px;border-radius:3px}
.deal-card .card-title{font-size:1rem;line-height:1.4;font-weight:750;letter-spacing:-.012em}
.deal-card .price-new{font-size:1.35rem;color:#111827;letter-spacing:-.02em}
.deal-card .price-old{color:#697586}
.deal-card .discount-badge{background:#cc0c39;color:#fff;border:0;border-radius:4px;font-size:.68rem;padding:.22rem .38rem;font-weight:850}
/* Premium section rhythm */
.section-heading,.sd-section-heading{display:flex;align-items:end;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.section-heading h2,.sd-section-heading h2{font-size:1.35rem;font-weight:800;letter-spacing:-.025em;color:#17212b;margin:0}
.section-heading p,.sd-section-heading p{color:#667085;font-size:.82rem;margin:.25rem 0 0}
/* Subtle surfaces instead of gradients everywhere. */
.filter-card,.card.filter-card,.sd-page-hero{border:1px solid #e3e7eb!important;box-shadow:0 2px 9px rgba(16,24,40,.04)!important}
.form-select,.form-control{border-color:#d5dae1;border-radius:8px}
.form-select:focus,.form-control:focus{border-color:#d8a728;box-shadow:0 0 0 .18rem rgba(255,216,20,.16)}
/* Premium empty/loading states */
.sd-empty-state,.empty-state{background:#fff;border:1px dashed #cfd6dd;border-radius:14px;box-shadow:0 2px 9px rgba(16,24,40,.03);padding:2.2rem}
.sd-empty-state h2,.empty-state h2{font-weight:800;color:#17212b}
/* Store chips / logos */
.store-chip,.sd-store-chip{border:1px solid #e2e6ea!important;background:#fff;box-shadow:0 1px 3px rgba(16,24,40,.03);transition:box-shadow .15s ease,transform .15s ease,border-color .15s ease}
.store-chip:hover,.sd-store-chip:hover{border-color:#cfd6de!important;box-shadow:0 7px 17px rgba(16,24,40,.08);transform:translateY(-1px)}
/* Account panels */
.account-card,.sd-account-card,.sd-section{border:1px solid #e2e6ea!important;background:#fff;box-shadow:0 2px 10px rgba(16,24,40,.045);border-radius:12px}
/* Detail page: the title and price should dominate the fold. */
.deal-detail h1,.deal-page-shell h1{font-size:clamp(1.55rem,2.5vw,2.15rem);line-height:1.18;font-weight:800;letter-spacing:-.035em;color:#121b26}
.deal-detail .price-new,.deal-page-shell .price-new{font-size:2rem;font-weight:850;color:#111827}
.deal-detail .sd-score-hero,.deal-page-shell .sd-score-hero{border:1px solid #e6e1d6;background:linear-gradient(180deg,#fffaf0,#fff);box-shadow:0 3px 11px rgba(16,24,40,.035)}
@media(max-width:575.98px){.deal-card .price-new{font-size:1.2rem}.deal-card .card-title{font-size:.93rem}.sd-card-rank.compact{padding:.42rem .5rem}.sd-bought-proof{font-size:.68rem}}

/* SaveDeals Premium Commerce v3 shared shell */
:root{--sd-navy:#131921;--sd-navy-2:#232f3e;--sd-yellow:#ffd814;--sd-yellow-dark:#f3c300;--sd-page:#f6f7f9;--sd-text:#17212b;--sd-muted:#667085;--sd-border:#e1e5ea;--sd-green:#16823b;--sd-red:#cc0c39;--sd-shadow-sm:0 2px 8px rgba(16,24,40,.06);--sd-shadow-md:0 8px 24px rgba(16,24,40,.10)}
html,body{background:var(--sd-page);color:var(--sd-text)}body{font-family:Arial,Helvetica,sans-serif}
.topbar-social{background:var(--sd-navy)!important;border-bottom:1px solid rgba(255,255,255,.08)}
.topbar-social a{color:#d7dde5!important;opacity:.9}.topbar-social a:hover{color:#fff!important;opacity:1}
.esh-logo{color:#fff!important;font-size:1.35rem;font-weight:800;letter-spacing:-.02em;display:inline-flex;align-items:center;gap:.45rem}.esh-logo:hover{color:#fff!important}.esh-logo-box{display:inline-flex!important;align-items:center;justify-content:center;width:34px;height:34px;border-radius:6px;background:var(--sd-yellow);color:#111827!important;font-weight:900}
.esh-search .form-control{height:44px;border:0;border-radius:7px 0 0 7px!important;background:#fff;color:#111827}.esh-search .form-control:focus{box-shadow:0 0 0 3px rgba(255,216,20,.28);outline:0}.esh-search .input-group .btn{height:44px;border:0!important;border-radius:0 7px 7px 0!important;background:var(--sd-yellow)!important;color:#111827!important;font-weight:800;box-shadow:none!important}.esh-search .input-group .btn:hover{background:#f7ca00!important;color:#111827!important}
.esh-topnav{gap:.25rem .35rem}.esh-topnav-link{color:#fff!important;border:1px solid transparent;border-radius:6px;padding:.55rem .65rem;font-weight:700;font-size:.82rem;line-height:1;text-decoration:none!important}.esh-topnav-link:hover{background:rgba(255,255,255,.09)!important;color:#fff!important}.esh-saved-count{background:var(--sd-yellow);color:#111827;border-radius:999px;min-width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;font-size:.68rem;font-weight:900;margin-left:.25rem}
.btn-deal,.sd-home-card .btn-primary,.btn-get-deal{background:var(--sd-yellow)!important;border-color:var(--sd-yellow-dark)!important;color:#111827!important;font-weight:800;box-shadow:0 1px 2px rgba(15,23,42,.08)!important}.btn-deal:hover,.sd-home-card .btn-primary:hover,.btn-get-deal:hover{background:#f7ca00!important;border-color:#e5b800!important;color:#111827!important;box-shadow:0 5px 13px rgba(15,23,42,.12)!important;transform:translateY(-1px)}
.deal-card{border:1px solid var(--sd-border)!important;border-radius:12px!important;background:#fff!important;box-shadow:var(--sd-shadow-sm)!important;overflow:hidden;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.deal-card:hover{transform:translateY(-2px);box-shadow:var(--sd-shadow-md)!important;border-color:#d4dae1!important}.deal-card .card-title{font-weight:800!important;color:#182230!important}.deal-card .price-new{color:#111827!important;font-weight:850!important}.deal-card .discount-badge{background:var(--sd-red)!important;color:#fff!important}.sd-card-rank.compact{background:#f8fafc!important;border:1px solid #e4e7ec!important}.sd-card-rank-bar span{background:var(--sd-green)!important}.sd-bought-proof{color:#166534!important;background:#f0fdf4!important;border-color:#d1fae5!important}
.sd-home-card{border:1px solid var(--sd-border)!important;background:#fff!important;box-shadow:var(--sd-shadow-sm)!important}.sd-home-card:hover{box-shadow:var(--sd-shadow-md)!important}.sd-home-card-media{background:#fff!important}.sd-home-discount{background:#fff1f2!important;color:var(--sd-red)!important;border:1px solid #ffe4e6}
.filter-card,.card.filter-card{background:#fff!important;border:1px solid var(--sd-border)!important;border-radius:12px!important;box-shadow:var(--sd-shadow-sm)!important}.form-control,.form-select{background:#fff;border-color:#d5dae1}
#siteFooter{background:var(--sd-navy)!important;border-top:1px solid #0b1016}#siteFooter a{color:#dce3eb!important}#siteFooter a:hover{color:#fff!important}
@media(max-width:767.98px){.esh-logo{font-size:1.15rem}.esh-topnav{justify-content:space-between!important;gap:.05rem!important;overflow:hidden;flex-wrap:nowrap!important;padding:0;white-space:nowrap}.esh-topnav > li{flex:0 0 auto;margin:0}.esh-topnav-link{font-size:.68rem;padding:.35rem .3rem;line-height:1;white-space:nowrap}.esh-saved-count{min-width:17px;height:17px;font-size:.62rem;margin-left:.12rem}}


/* SaveDeals Amazon-style department rail */
.sd-amazon-rail{
  position:sticky;
  top:0;
  z-index:1025;
  width:100%;
  background:var(--sd-navy-2,#232f3e);
  border-top:1px solid rgba(255,255,255,.06);
  border-bottom:1px solid rgba(0,0,0,.28);
  box-shadow:0 2px 8px rgba(15,23,42,.12);
}
.sd-amazon-rail-inner{
  max-width:1440px;
  margin:0 auto;
  min-height:42px;
  padding:.18rem .75rem;
  display:flex;
  align-items:center;
  gap:.08rem;
  overflow-x:auto;
  scrollbar-width:none;
  white-space:nowrap;
}
.sd-amazon-rail-inner::-webkit-scrollbar{display:none}
.sd-amazon-rail-link,
.sd-amazon-rail-all{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  gap:.38rem;
  flex:0 0 auto;
  padding:.5rem .72rem;
  border:1px solid transparent;
  border-radius:4px;
  color:#fff!important;
  text-decoration:none!important;
  font-size:.78rem;
  line-height:1;
  font-weight:700;
  transition:background .14s ease,border-color .14s ease,transform .14s ease;
}
.sd-amazon-rail-all{
  font-weight:850;
  border-color:rgba(255,255,255,.75);
  padding-left:.78rem;
  padding-right:.78rem;
}
.sd-amazon-rail-all i{font-size:.78rem}
.sd-amazon-rail-link:hover,
.sd-amazon-rail-all:hover{
  color:#fff!important;
  background:rgba(255,255,255,.09)!important;
  border-color:rgba(255,255,255,.55);
  transform:translateY(-1px);
}
.sd-amazon-rail-featured{font-weight:850}
.sd-amazon-rail-more{margin-left:auto}
.sd-amazon-rail-more i{font-size:.62rem}

/* Premium Deal Rank card */
.sd-card-rank.compact{
  position:relative;
  margin:.62rem 0 0;
  padding:.62rem .66rem .58rem;
  border-radius:9px;
  background:linear-gradient(180deg,#fff,#f7faf8)!important;
  border:1px solid #dbe7df!important;
  box-shadow:0 2px 6px rgba(16,24,40,.04);
  overflow:hidden;
}
.sd-card-rank.compact:before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:3px;
  background:#9aa4af;
}
.sd-card-rank.compact.great:before{background:#16823b}
.sd-card-rank.compact.good:before{background:#2f7d4a}
.sd-card-rank.compact.fair:before{background:#c58b18}
.sd-card-rank.compact.watch:before{background:#a8623d}
.sd-card-rank.compact.great{border-color:#cde4d5!important;background:linear-gradient(180deg,#fbfffc,#f3faf5)!important}
.sd-card-rank.compact .sd-card-rank-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  font-size:.68rem;
  line-height:1.2;
  color:#52606d;
}
.sd-card-rank.compact .sd-card-rank-top span{
  display:inline-flex;
  align-items:center;
  font-weight:800;
  color:#344054;
}
.sd-card-rank.compact .sd-card-rank-top i{color:#c58b18}
.sd-card-rank.compact.great .sd-card-rank-top i{color:#16823b}
.sd-card-rank.compact .sd-card-rank-top strong{
  color:#17212b;
  font-size:.78rem;
  font-weight:900;
  letter-spacing:-.01em;
}
.sd-card-rank.compact.great .sd-card-rank-top strong{color:#12652d}
.sd-card-rank.compact .sd-card-rank-bar{
  height:5px;
  margin-top:.42rem;
  border-radius:999px;
  background:#e8edf0;
  overflow:hidden;
}
.sd-card-rank.compact .sd-card-rank-bar span{
  display:block;
  height:100%;
  min-width:3px;
  border-radius:999px;
  background:#16823b!important;
  box-shadow:0 0 0 1px rgba(22,130,59,.05);
}
.sd-card-rank.compact.good .sd-card-rank-bar span{background:#2f7d4a!important}
.sd-card-rank.compact.fair .sd-card-rank-bar span{background:#c58b18!important}
.sd-card-rank.compact.watch .sd-card-rank-bar span{background:#a8623d!important}

@media(max-width:767.98px){
  .sd-amazon-rail-inner{padding-left:.5rem;padding-right:.5rem}
  .sd-amazon-rail-link,.sd-amazon-rail-all{font-size:.74rem;padding:.48rem .6rem;min-height:36px}
}

/* ===========================================================
   SAVEDEALS AMAZON-INSPIRED MARKETPLACE LAYER
   Layout and information hierarchy inspired by large retail deal
   discovery pages; SaveDeals branding/data semantics remain intact.
   =========================================================== */
:root{
  --sd-amz-navy:#131921;
  --sd-amz-navy-2:#232f3e;
  --sd-amz-orange:#ff9900;
  --sd-amz-link:#007185;
  --sd-amz-bg:#eaeded;
  --sd-amz-border:#d5d9d9;
  --sd-amz-text:#0f1111;
  --sd-amz-muted:#565959;
  --sd-amz-green:#007600;
}
body.sd-deals-page{background:var(--sd-amz-bg);color:var(--sd-amz-text)}
.sd-header-container{width:100%;max-width:1500px;margin:0 auto;padding:0 16px}
.sd-utility-bar{background:#111827;color:#d5d9d9}
.sd-utility-left,.sd-utility-right{display:flex;align-items:center;gap:14px}
.sd-utility-bar .sd-header-container{height:30px;display:flex;align-items:center;justify-content:space-between}
.sd-utility-note{font-size:11px}
.sd-utility-right a{color:#fff;font-size:12px}
.sd-header-count{display:inline-flex;min-width:18px;height:18px;padding:0 5px;align-items:center;justify-content:center;border-radius:9px;background:var(--sd-amz-orange);color:#111;font-size:10px;font-weight:800}
.sd-main-header{background:var(--sd-amz-navy);color:#fff}
.sd-main-header-inner{min-height:68px;display:grid;grid-template-columns:190px minmax(260px,1fr) auto;gap:14px;align-items:center}
.sd-brand{display:flex;align-items:center;gap:8px;color:#fff!important}
.sd-brand-mark{display:grid;place-items:center;width:36px;height:36px;border:2px solid #fff;border-radius:4px;font-size:20px;line-height:1}
.sd-brand-text{font-size:20px;font-weight:800;letter-spacing:-.6px}
.sd-global-search{height:42px;display:flex;min-width:0;margin:0}
.sd-global-search input{flex:1;min-width:0;border:3px solid transparent;border-right:0;border-radius:5px 0 0 5px;padding:0 14px;background:#fff;color:#111;font:400 14px Arial,Helvetica,sans-serif}
.sd-global-search input:focus{border-color:#f3a847;outline:0;box-shadow:0 0 0 1px #f3a847}
.sd-global-search button{width:52px;border:0;border-radius:0 5px 5px 0;background:var(--sd-amz-orange);color:#111;font-size:17px}
.sd-header-actions{display:flex;align-items:stretch;gap:2px}
.sd-header-actions a{display:flex;flex-direction:column;justify-content:center;color:#fff!important;min-width:78px;padding:6px 8px;border:1px solid transparent;border-radius:2px}
.sd-header-actions a:hover{border-color:#fff}
.sd-action-small{display:block;color:#ddd;font-size:11px;line-height:1.15}.sd-action-small+strong{font-size:13px;line-height:1.25}
.sd-department-nav{background:var(--sd-amz-navy-2);color:#fff}
.sd-department-inner{min-height:42px;display:flex;align-items:center;gap:0;overflow:auto;white-space:nowrap}
.sd-department-inner a{display:inline-flex;align-items:center;gap:6px;color:#fff!important;padding:11px 13px;font:600 13px Arial,Helvetica,sans-serif;border:1px solid transparent}
.sd-department-inner a:hover,.sd-department-inner a.is-accent{border-color:#fff}
.sd-all-departments{font-weight:700!important}
.sd-nav-more{margin-left:auto}
.sd-site-shell + *{margin-top:0}
.sd-deals-page .container{max-width:1500px}
.sd-deals-page main{background:var(--sd-amz-bg)}
.sd-deals-page .container.my-5{margin-top:22px!important;margin-bottom:34px!important}
.sd-deals-page .row{--bs-gutter-x:18px}
.sd-deals-page aside{position:relative}
.sd-deals-page aside .collapse{display:block}
.sd-deals-page .filter-card{border:0!important;border-radius:2px!important;box-shadow:none!important;background:#fff}
.sd-deals-page .filter-card .card-body{padding:16px 14px}
.sd-deals-page .cat-sidebar-section-title,
.sd-deals-page .sd-filter-title{font-size:15px;font-weight:700;color:var(--sd-amz-text);margin-bottom:8px}
.sd-deals-page .cat-sidebar-quick{display:flex;flex-direction:column}
.sd-deals-page .cat-sidebar-quick a,
.sd-deals-page .sd-amazon-filter-group a{display:flex;justify-content:space-between;gap:8px;padding:4px 0;color:#111!important;font-size:13px}
.sd-deals-page .cat-sidebar-quick a:hover,
.sd-deals-page .sd-amazon-filter-group a:hover,
.sd-deals-page .sd-amazon-filter-group a.is-selected{color:var(--sd-amz-link)!important;text-decoration:underline}
.sd-amazon-filter-group{border-top:1px solid var(--sd-amz-border);margin-top:12px;padding-top:12px}
.sd-deals-page .list-group{gap:0}
.sd-deals-page .list-group-item{border:0;border-radius:0!important;padding:4px 0;background:transparent;color:#111;font-size:13px}
.sd-deals-page .list-group-item.active{background:transparent;color:var(--sd-amz-link);font-weight:700}
.sd-deals-page .list-group-item .badge{background:transparent!important;color:#565959!important;font-weight:400}
.sd-deals-page .cat-node{position:relative}
.sd-deals-page .cat-row{min-height:28px}
.sd-deals-page .cat-toggle{width:24px;height:24px;padding:0;border:0;background:transparent;color:#555;border-radius:2px}
.sd-deals-page .cat-toggle .fa-chevron-right{transition:transform .15s ease}
.sd-deals-page .cat-toggle[aria-expanded="true"] .fa-chevron-right{transform:rotate(90deg)}
.sd-deals-page .cat-name{padding:4px 0;color:#111!important;font-size:13px;gap:8px}
.sd-deals-page .cat-name:hover{color:var(--sd-amz-link)!important;text-decoration:underline}
.sd-deals-page .cat-name .badge{background:transparent!important;color:#565959!important;font-size:11px;font-weight:400}
.sd-deals-page .cat-children{margin-left:13px;padding-left:11px;border-left:1px solid #e3e6e6}
.sd-deals-page .cat-toggle-spacer{display:inline-block;width:24px}
.sd-deals-page .card.border-0.shadow-sm.mb-4{border:1px solid var(--sd-amz-border)!important;border-radius:2px!important;box-shadow:none!important}
.sd-deals-page h1{font-size:28px;line-height:1.2;letter-spacing:-.3px}
.sd-deals-page h2.h5{font-size:21px}
.sd-deals-page .esh-filterbar{min-height:54px;background:#fff;border:1px solid var(--sd-amz-border);border-radius:2px;padding:9px 12px;justify-content:flex-start}
.sd-deals-page .sd-sort-select{width:250px;border:1px solid #a6a6a6;border-radius:3px;background:#f7fafa;font-size:13px}
.sd-result-count{margin-left:auto;color:#565959;font-size:13px}
.sd-result-count strong{color:#111}
.sd-deals-page #dealsGrid{row-gap:14px}
.sd-deals-page #dealsGrid > [class*="col-"]{padding-bottom:0}
.sd-deals-page .deal-card{border:1px solid #ddd;border-radius:2px;background:#fff;box-shadow:none;transition:border-color .15s,box-shadow .15s,transform .15s}
.sd-deals-page .deal-card:hover{transform:none;border-color:#a2a6ac;box-shadow:0 2px 6px rgba(15,17,17,.16)}
.sd-deals-page .deal-media{height:245px;padding:18px 16px;border-bottom:0;background:#fff}
.sd-deals-page .deal-img{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;aspect-ratio:auto}
.sd-deals-page .deal-img-placeholder{height:245px;background:#fff;border:0}
.sd-deals-page .deal-card .card-body{padding:11px 12px 12px}
.sd-deals-page .deal-store{display:inline-flex;align-items:center;gap:5px;color:#565959!important;font-size:12px;font-weight:600}
.sd-deals-page .deal-store-logo{width:18px;height:18px;object-fit:contain}
.sd-deals-page .deal-cat{display:none!important}
.sd-deals-page .deal-card .card-title{font-family:Arial,Helvetica,sans-serif;font-size:14px;font-weight:400;line-height:1.35;margin:7px 0 8px}
.sd-deals-page .deal-card .card-title a{color:#007185!important}
.sd-deals-page .deal-card .card-title a:hover{color:#c45500!important;text-decoration:underline!important}
.sd-deals-page .deal-card .price-new{color:#111;font-size:22px;font-weight:600;letter-spacing:-.2px}
.sd-deals-page .deal-card .price-old{font-size:12px;color:#565959}
.sd-deals-page .deal-card .discount-badge{color:#b12704;background:#fef0f0;padding:2px 5px;border-radius:2px;font-size:12px;font-weight:700}
.sd-deals-page .sd-bought-proof{font-size:11px;color:#565959;margin:3px 0}
.sd-deals-page .sd-card-rank{margin-top:7px!important;padding:7px 0 0;border-top:1px solid #eaeded}
.sd-deals-page .sd-card-rank-top{font-size:11px!important;color:#565959}
.sd-deals-page .sd-card-rank-top strong{color:#111}
.sd-deals-page .sd-card-rank-bar{height:4px;background:#eaeded;border-radius:0;margin-top:5px}
.sd-deals-page .sd-card-rank-bar span{display:block;height:100%;background:#007600}
.sd-deals-page .sd-card-rank-note{font-size:10px!important;color:#6a6a6a!important}
.sd-deals-page .btn-deal{background:#ffd814!important;border:1px solid #fcd200!important;color:#111!important;box-shadow:none!important;border-radius:8px!important;font-size:13px;font-weight:600}
.sd-deals-page .btn-deal:hover{background:#f7ca00!important;transform:none!important}
.sd-deals-page .coupon-box{border:1px dashed #c7c7c7;background:#fffdf5;padding:6px 8px;font-size:11px}
.sd-deals-page .pagination .page-link{border-radius:2px!important;color:#2162a1}
.sd-deals-page .pagination .active .page-link{background:#e7e9ec;color:#111;border-color:#a2a6ac}
.sd-deals-page .cat-card{border:1px solid var(--sd-amz-border)!important;border-radius:2px!important;box-shadow:none!important}
.sd-deals-page .cat-card-media{height:145px}
.sd-deals-page .cat-card-img{width:100%;height:100%;object-fit:contain}
.sd-deals-page .cat-card-body{padding:9px}
.sd-deals-page .cat-card-name{color:var(--sd-amz-link);font-size:13px}
.sd-deals-page .sd-mobile-deals-toolbar{background:#fff;border-bottom:1px solid var(--sd-amz-border);padding:8px 10px}
.sd-mobile-filter-trigger{border:1px solid #a2a6ac;background:#fff;border-radius:3px;padding:7px 10px;font-size:13px}
.sd-mobile-sort-form select{border:1px solid #a2a6ac;border-radius:3px;padding:7px 8px;background:#fff;font-size:13px}
@media(min-width:1200px){.sd-deals-page .col-lg-9{width:calc(100% - 250px)}.sd-deals-page .col-lg-3{width:250px}}
@media(min-width:1400px){.sd-deals-page #dealsGrid > .col-xl-3,.sd-deals-page #dealsGrid > .col-lg-4{width:25%}}
@media(max-width:1199px){.sd-main-header-inner{grid-template-columns:170px minmax(240px,1fr) auto}}
@media(max-width:991.98px){
  .sd-utility-bar{display:none}
  .sd-main-header-inner{grid-template-columns:1fr;gap:9px;padding-top:10px;padding-bottom:10px}
  .sd-brand{justify-self:start}.sd-global-search{width:100%}
  .sd-header-actions{display:none}
  .sd-deals-page .col-lg-3,.sd-deals-page .col-lg-9{width:100%}
  .sd-deals-page aside .collapse:not(.show){display:none}
}
@media(max-width:767.98px){
  .sd-header-container{padding:0 10px}
  .sd-brand-text{font-size:18px}
  .sd-department-inner a{font-size:12px;padding:9px 10px}
  .sd-deals-page .deal-media,.sd-deals-page .deal-img-placeholder{height:180px}
  .sd-deals-page .deal-card .card-title{font-size:13px}
  .sd-deals-page .deal-card .price-new{font-size:19px}
  .sd-result-count{width:100%;margin-left:0}
  .sd-deals-page .esh-filterbar{padding:9px;gap:8px!important}
}

/* Global storefront finishing: keep the same retail hierarchy beyond /deals/. */
.sd-home-card,.sd-home-card.card{border:1px solid #ddd!important;border-radius:2px!important;background:#fff;box-shadow:none!important}
.sd-home-card:hover{border-color:#a2a6ac!important;box-shadow:0 2px 6px rgba(15,17,17,.16)!important;transform:none!important}
.sd-home-card .card-body{padding:11px 12px 13px}
.sd-home-card .sd-home-card-media{height:220px;background:#fff}
.sd-home-card .sd-home-card-media img{height:100%;width:100%;object-fit:contain}
.sd-home-card .sd-home-discount{color:#b12704;background:#fef0f0;border-radius:2px;padding:2px 5px;font-size:12px;font-weight:700}
.sd-home-card h3 a{color:#007185!important;font-size:14px}
.sd-home-card h3 a:hover{color:#c45500!important;text-decoration:underline!important}
.sd-home-card .fw-bold.fs-5{color:#111!important;font-size:22px!important}
.sd-home-card .btn-primary,.sd-home-card .btn-deal{background:#ffd814!important;border:1px solid #fcd200!important;color:#111!important;box-shadow:none!important}
#siteFooter{background:#131a22!important;border-top:1px solid #232f3e;margin-top:0!important}
#siteFooter a:hover{color:#fff!important}
.sd-deals-page .filter-card input.form-control,
.sd-deals-page .filter-card select.form-select{border:1px solid #a6a6a6;border-radius:3px;font-size:13px}
.sd-deals-page .filter-card .btn-primary{background:#ffd814;border:1px solid #fcd200;color:#111;box-shadow:none;border-radius:3px}


/* Permanent mobile deal-grid rule: every standard deal-card grid stays 2-up. */
@media (max-width: 767.98px) {
  #deal-grid > [class*="col-"],
  .sd-deals-page #deal-grid > .col-6,
  .sd-deals-page #dealsGrid > [class*="col-"] {
    width: 50% !important;
    max-width: 50% !important;
    flex: 0 0 50% !important;
  }
  .sd-home-deals-grid > [class*="col-"],
  .sd-homepage .sd-home-deals-grid > .col-6 {
    width: 50% !important;
    max-width: 50% !important;
    flex: 0 0 50% !important;
  }
}

/* ============================================================
   Mobile Deals — restore the sticky filter toolbar + full-screen sheet
   Keep this behavior independent from the mobile 2-up deal-card rule.
   ============================================================ */
@media (max-width: 991.98px) {
  .sd-deals-page .sd-mobile-deals-toolbar {
    position: sticky;
    top: 0;
    z-index: 1035;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 8px 10px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #d7dce2;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
  }

  .sd-deals-page .sd-mobile-filter-trigger {
    flex: 0 0 auto;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
  }

  .sd-deals-page .sd-mobile-result-count {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: #4b5563;
  }

  .sd-deals-page .sd-mobile-sort-form {
    flex: 0 0 auto;
    margin: 0;
  }

  .sd-deals-page .sd-mobile-sort-form select {
    min-height: 36px;
    max-width: 132px;
  }

  /* The filter sheet must not remain trapped inside the sidebar's grid column. */
  .sd-deals-page #catCollapse.collapse:not(.show) {
    display: none !important;
  }

  .sd-deals-page #catCollapse.collapse.show {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1060 !important;
    display: block !important;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0 !important;
    padding: 58px 12px 18px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .24);
  }

  .sd-deals-page .sd-mobile-filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(15, 23, 42, .48);
  }

  .sd-deals-page .sd-mobile-filter-backdrop[hidden] {
    display: none !important;
  }

  .sd-deals-page .sd-mobile-filter-head {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1065;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    background: #fff;
    border-bottom: 1px solid #d7dce2;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
  }

  .sd-deals-page #sdMobileFilterClose {
    min-width: 40px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid #cfd5dc;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    font-size: 13px;
    font-weight: 700;
  }

  body.sd-mobile-filter-open {
    overflow: hidden;
  }

  body.sd-mobile-filter-open #sdMobileFilterBackdrop {
    display: block !important;
  }
}

@media (max-width: 575.98px) {
  .sd-deals-page .sd-mobile-deals-toolbar {
    gap: 6px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .sd-deals-page .sd-mobile-sort-form select {
    max-width: 116px;
    padding-left: 7px;
    padding-right: 7px;
  }

  .sd-deals-page #catCollapse.collapse.show {
    padding-left: 10px;
    padding-right: 10px;
  }
}
