/* ══════════════════════════════
   SECTION HEADER
══════════════════════════════ */
.sec-head {
    display: flex;
    align-items: center;
}

.sec-head h2 {
    font-weight: 800;
    font-size: 1rem;
}

.sec-head a {
    margin-left: auto;
    color: var(--accent2);
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
}

/* ══════════════════════════════
   DEALS
══════════════════════════════ */
.deals-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 10px;
    flex-wrap: wrap;
}

.deals-head h2 {
    font-weight: 800;
    font-size: 1rem;
}

.deals-head a {
    margin-left: auto;
    color: var(--accent2);
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
}

.t-unit {
    background: var(--mzansi-orange);
    color: white;
    padding: 4px 7px;
    min-width: 32px;
    border-radius: 5px;
    font-weight: 700;
    font-size: .85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.t-unit small {
    font-size: .5rem;
    font-weight: 400;
    color: #ffffffc4;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* Horizontal scroll */
.hscroll {
    display: flex;
    gap: 9px;
    padding: 5px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.hscroll::-webkit-scrollbar {
    display: none;
}

.hscroll .pcard {
    flex-shrink: 0;
    width: 200px;
    scroll-snap-align: start;
}

/* ══════════════════════════════
   PRODUCT CARD
══════════════════════════════ */
.pcard {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 6px;
    position: relative;
    overflow: hidden;
    transition: transform .15s;
    width: 100%;
    display: flex;
    flex-direction: column;
    font-family: 'Syne', sans-serif !important;
}

.no-border {
    border: none;
    border-radius: 0;
}

.pcard:active {
    transform: scale(.97);
}

.pcard .badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: black;
    color: white;
    font-size: .62rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 1;
}

.pcard .badge.blue {
    background: var(--accent2);
}

.pcard .wl {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    z-index: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.i-dtls {
    display: flex;
    flex-direction: column;
    gap: 2.5px;
    margin-top: auto;
    flex: 1;
}

.pcard a {
    margin-bottom: 8px;
}

.pcard .pimg {
    width: auto;
    max-width: 100%;
    height: 30vw;
    padding: 5px;
    display: flex;
    margin: auto;
    object-fit: contain;
}

.with-bg {
    background: linear-gradient(to bottom, #fcf2e9, #fff8f135, #ffff);
    border-radius: 5px;
}

.pname {
    font-family: 'Syne', sans-serif !important;
    font-size: .8rem;
    line-height: 1.3 !important;
}

.d-rating {
    font-size: .865em;
    margin: 2px 0;
    align-items: center;

    i {
        color: #fbbf24;
    }
}

.rating-number {
    margin-left: 5px;
    color: var(--text-color);
    font-size: .65rem;
}

/* p-Seller information */
.p-seller {
    display: flex;
    align-items: center;
    gap: 5px;
}

.p-seller-name {
    color: #666;
    font-size: .6rem;
}

.verified-tag {
    color: #445fcb;
    font-size: .8rem;
    display: inline-flex;
}

/* Price Style */

.pcard .pprices {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.pcard .pprice {
    font-family: 'Syne', sans-serif !important;
    font-weight: 700;
    font-size: .9rem;
}

.price-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 1rem;
    margin: .5rem;
}

.item-price {
    font-size: .9rem;
    text-align: left;
}

.item-price .amount,
.item-price .decimal {
    font-family: "Syne", sans-serif !important;
    color: #111827;
    font-weight: bold;
}

.item-price.actual .amount {
    font-size: .9rem;
}

.item-price.actual .amount,
.item-price.actual .decimal {
    font-weight: 500;
    color: grey;
    text-decoration: line-through;
}

.search-price {
    font-family: "Syne", sans-serif !important;
    font-weight: 500;
}

.search-pname {
    font-family: 'Syne', sans-serif !important;
}

.decimal {
    font-size: 8pt;
    vertical-align: super;
    margin-left: 0px;
}


.pcard .pold {
    font-size: .7rem;
    color: var(--muted);
    text-decoration: line-through;
}

.pcard .pdis {
    background: #ffeee8;
    color: black;
    font-size: .62rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
}

.pcard .add-cart {
    width: 100%;
    background: #111827;
    background: white;
    border-radius: 0px;
    color: #111827;
    border: 1px solid #111827;
    padding: 8px;
    font-weight: 700;
    font-size: .765rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    transition: .35s ease-in;

    i {
        font-size: .9rem;
    }
}

.pcard .add-cart:hover {
    background: black;
    color: white;
}

.pcard .add-cart:active {
    background: black;
    color: white;
}


/* Adjust existing badge position to make room for condition badge */
.pcard .badge {
    z-index: 1;
}

/* Make sure pcard has relative positioning for absolute badges */
.pcard {
    position: relative;
}

/* ══════════════════════════════
   CAT SECTION
══════════════════════════════ */
.cat-sec {
    margin-top: 10px;
}


.small-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.scard {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    background: var(--card);
    transition: box-shadow .15s;
}

.scard:active {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.scard .si {
    font-size: 1.7rem;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    border-radius: 7px;
    flex-shrink: 0;
}

.scard .sn {
    font-size: .76rem;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scard .sp {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: .8rem;
    color: black;
}

.scard .sf {
    font-size: .62rem;
    color: var(--muted);
}

/* ══════════════════════════════
   RECOMMENDED
══════════════════════════════ */
/* View toggle styling */
.view-toggle {
    display: none;
    gap: 8px;
    justify-content: flex-end;
    /* or center / flex-start depending on your layout */
    margin: 12px 16px;
}

.view-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 5px;
    cursor: pointer;
    font-size: 1.3rem;
    color: #555;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.view-btn.active,
.view-btn:hover {
    background: #111827;
    color: white;
    border-color: #111827;
}

.rec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .8rem;
}

.rec-grid.rec-g-4 {
    grid-template-columns: repeat(2, 1fr);
}

/* ══════════════════════════════
   ANIMATIONS
══════════════════════════════ */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fin {
    animation: fadeUp .4s ease both;
}

.fin:nth-child(1) {
    animation-delay: .04s;
}

.fin:nth-child(2) {
    animation-delay: .08s;
}

.fin:nth-child(3) {
    animation-delay: .12s;
}

.fin:nth-child(4) {
    animation-delay: .16s;
}

.fin:nth-child(5) {
    animation-delay: .20s;
}

.fin:nth-child(6) {
    animation-delay: .24s;
}

.fin:nth-child(7) {
    animation-delay: .28s;
}

.fin:nth-child(8) {
    animation-delay: .32s;
}

.fin:nth-child(9) {
    animation-delay: .36s;
}

.fin:nth-child(10) {
    animation-delay: .40s;
}

.fin:nth-child(11) {
    animation-delay: .44s;
}

.fin:nth-child(12) {
    animation-delay: .48s;
}

.fin:nth-child(13) {
    animation-delay: .52s;
}

.fin:nth-child(14) {
    animation-delay: .56s;
}

.fin:nth-child(15) {
    animation-delay: .60s;
}

.fin:nth-child(16) {
    animation-delay: .64s;
}

.fin:nth-child(17) {
    animation-delay: .68s;
}

.fin:nth-child(18) {
    animation-delay: .72s;
}

.fin:nth-child(19) {
    animation-delay: .76s;
}

.fin:nth-child(20) {
    animation-delay: .80s;
}

/* ══════════════════════════════
   TABLET (≥600px)
══════════════════════════════ */
@media (min-width: 600px) {

    .small-grid,
    .rec-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hscroll .pcard {
        width: 160px;
    }

    .pcard .pimg {
        height: 15vw;
    }
}

/* ══════════════════════════════
   DESKTOP (≥820px)
══════════════════════════════ */
@media (min-width: 820px) {
    :root {
        --nav-h: 64px;
    }

    .page-wrap {
        display: grid;
        grid-template-columns: 218px 1fr;
    }

    .sidebar-desk {
        display: block;
        background: white;
        border-right: 1px solid var(--border);
        padding: 18px 0;
    }

    .sidebar-desk h3 {
        font-size: .62rem;
        font-weight: 700;
        letter-spacing: 2px;
        text-transform: uppercase;
        color: var(--muted);
        padding: 0 18px 8px;
    }

    .sidebar-desk a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 18px;
        color: #111827;
        text-decoration: none;
        font-size: .87rem;
        transition: background .15s;
        border-left: 3px solid transparent;
    }

    .sidebar-desk a:hover {
        background: var(--cream);
        border-left-color: black;
    }

    .sidebar-desk a.act {
        background: var(--cream);
        border-left-color: black;
        font-weight: 600;
    }

    .sidebar-desk a svg {
        width: 15px;
        height: 15px;
        color: var(--muted);
        flex-shrink: 0;
    }

    .sidebar-desk a.act svg,
    .sidebar-desk a:hover svg {
        color: black;
    }

    .sidebar-desk .more-link {
        color: var(--accent2);
        font-weight: 600;
        font-size: .82rem;
    }

    .hero {
        padding: 50px 44px;
        min-height: 270px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-float {
        font-size: 7rem;
        right: 50px;
    }

    .deals-head {
        padding: 16px 24px 10px;
    }

    .hscroll .pcard {
        width: 168px;
    }

    .small-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    .rec-grid {
        grid-template-columns: repeat(4, 1fr);
        /*  padding: 0 24px 20px; */
        gap: .5rem;
    }

    .rec-grid.rec-g-4 {
        grid-template-columns: repeat(3, 1fr);
    }

    .pname {
        font-size: 1rem;
    }

    /* p-Seller information */

    .p-seller-name {
        font-size: .8rem;
    }

    .verified-tag {
        font-size: 1.1rem;
    }

    .pcard .pprice {
        font-size: 1.1rem;
    }

    .item-price {
        font-size: 1.1rem;
    }

    .item-price.actual .amount {
        font-size: 1.1rem;
    }

    .pcard .pimg {
        height: 15vw;
    }
}

@media (min-width: 1100px) {

    .hscroll .pcard {
        width: 250px;
    }

    .rec-grid {
        grid-template-columns: repeat(5, 1fr);
        /* padding: 0 32px 24px; */
    }

    .rec-grid.rec-g-4 {
        grid-template-columns: repeat(3, 1fr);
    }

    .pcard .pimg {
        height: 9vw;
    }
}

/* Grid container */

/* List view modifier */

/* Card adjustments for list view (mobile-friendly + elegant) */
@media (max-width: 767px) {

    /* View toggle styling */
    .view-toggle {
        display: flex;
    }

    .rec-grid {
        gap: 14px;
    }

    .rec-grid.list-view {
        display: flex;
        flex-direction: column;
        gap: 12px;
        grid-template-columns: 1fr;

        .pcard {
            width: 75%;
            margin: auto;
        }
    }
}