/* ============================================================
   home-conversion.css
   Conversion-focused restyle of the home storefront sections.
   CSS-ONLY. Targets existing classes in the product / store /
   category card partials. Theme-aware (uses --bs-* vars, with
   explicit body[theme="dark"] overrides) and responsive.

   Scope note: deliberately avoids .rb-hero / .rbx- / .rbx2-
   (owned by the hero + new-arrivals redesign).
   ============================================================ */

:root {
    --hc-radius: 14px;
    --hc-radius-sm: 10px;
    --hc-card-bg: var(--bs-white);
    --hc-border: rgba(var(--bs-primary-rgb), 0.12);
    --hc-border-hover: rgba(var(--bs-primary-rgb), 0.45);
    --hc-shadow: 0 2px 12px rgba(20, 23, 28, 0.06);
    --hc-shadow-hover: 0 14px 32px rgba(20, 23, 28, 0.14);
    --hc-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ------------------------------------------------------------
   1. PRODUCT CARDS  (_product-large-card + _product-medium-card)
   Root: .product.get-view-by-onclick
   ------------------------------------------------------------ */
.product.get-view-by-onclick {
    border-radius: var(--hc-radius) !important;
    background: var(--hc-card-bg);
    transition: transform 0.3s var(--hc-ease),
                box-shadow 0.3s var(--hc-ease),
                border-color 0.3s var(--hc-ease);
    will-change: transform;
}

/* Large card carries .border in markup; give it a real frame + shadow */
.product.get-view-by-onclick.border {
    border-color: var(--hc-border) !important;
    box-shadow: var(--hc-shadow);
}

.product.get-view-by-onclick:hover {
    transform: translateY(-6px);
    box-shadow: var(--hc-shadow-hover);
    border-color: var(--hc-border-hover) !important;
}

/* Image frame: crop + zoom on hover */
.product.get-view-by-onclick .product__top {
    border-radius: var(--hc-radius-sm) !important;
    overflow: hidden;
}

.product.get-view-by-onclick .product__thumbnail img,
.product.get-view-by-onclick .product__top img {
    transition: transform 0.55s var(--hc-ease);
}

.product.get-view-by-onclick:hover .product__thumbnail img,
.product.get-view-by-onclick:hover .product__top img {
    transform: scale(1.08);
}

/* Title turns primary as the card is engaged */
.product.get-view-by-onclick .product__title {
    transition: color 0.25s var(--hc-ease);
}

.product.get-view-by-onclick:hover .product__title {
    color: var(--bs-primary);
}

/* Price: strong discounted price, quiet struck-through original */
.product.get-view-by-onclick .product__new-price {
    color: var(--bs-primary);
    letter-spacing: -0.2px;
}

.product.get-view-by-onclick .product__old-price {
    color: #9aa0a6 !important;
    text-decoration-thickness: 1px;
}

/* ------------------------------------------------------------
   2. HOVER ACTION ICONS (wishlist / compare / quick view)
   .product__actions a  +  quick-view eye buttons as the CTA
   ------------------------------------------------------------ */
.product__actions a {
    background: var(--bs-white);
    color: var(--bs-body-color);
    box-shadow: 0 3px 10px rgba(20, 23, 28, 0.16);
    transition: transform 0.25s var(--hc-ease),
                background-color 0.25s var(--hc-ease),
                color 0.25s var(--hc-ease);
}

.product__actions a:hover,
.product__actions a.wishlist_icon_active,
.product__actions a.compare_list_icon_active {
    background: var(--bs-primary);
    color: #fff;
    transform: translateY(-1px) scale(1.06);
}

/* Quick-view eye pill on store / category product thumbs = prominent CTA */
.store-product__action {
    background: var(--bs-white);
    color: var(--bs-body-color);
    box-shadow: 0 3px 10px rgba(20, 23, 28, 0.16);
    transition: transform 0.25s var(--hc-ease),
                background-color 0.25s var(--hc-ease),
                color 0.25s var(--hc-ease);
}

.store-product:hover .store-product__action,
.slide-shadow:hover .store-product__action {
    transform: scale(1.05);
}

.store-product__action:hover {
    background: var(--bs-primary);
    color: #fff;
}

/* ------------------------------------------------------------
   3. DISCOUNT + FLASH BADGES  (.discount-badge / .product__power-badge)
   ------------------------------------------------------------ */
.discount-badge {
    background: linear-gradient(135deg, #ff5b5e 0%, #d9363e 100%) !important;
    color: #fff !important;
    font-weight: 700;
    letter-spacing: 0.2px;
    box-shadow: 0 3px 8px rgba(217, 54, 62, 0.32);
    border-radius: var(--hc-radius-sm) 4px var(--hc-radius-sm) 4px;
}

/* keep the "save amount" inline pill readable when it reuses .discount-badge */
.product__save-amount.discount-badge {
    box-shadow: none;
}

.product__power-badge {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

/* ------------------------------------------------------------
   4. CATEGORY PRODUCT CARD  (_product-category-card -> .slide-shadow)
   ------------------------------------------------------------ */
.slide-shadow {
    border-radius: var(--hc-radius) !important;
    border: 1px solid var(--hc-border);
    box-shadow: var(--hc-shadow);
    transition: transform 0.3s var(--hc-ease),
                box-shadow 0.3s var(--hc-ease),
                border-color 0.3s var(--hc-ease);
}

.slide-shadow:hover {
    transform: translateY(-6px);
    box-shadow: var(--hc-shadow-hover);
    border-color: var(--hc-border-hover);
}

.slide-shadow .store-product__top {
    overflow: hidden;
}

.slide-shadow .store-product__top img {
    transition: transform 0.55s var(--hc-ease);
}

.slide-shadow:hover .store-product__top img {
    transform: scale(1.07);
}

.slide-shadow .fs-16.fw-bold {
    transition: color 0.25s var(--hc-ease);
}

.slide-shadow:hover .fs-16.fw-bold {
    color: var(--bs-primary);
}

/* ------------------------------------------------------------
   5. STORE CARDS  (_more-stores -> .store-product.border)
   and TOP-STORES product thumbnails
   ------------------------------------------------------------ */
.store-product.border {
    border-radius: var(--hc-radius) !important;
    border-color: var(--hc-border) !important;
    transition: transform 0.3s var(--hc-ease),
                box-shadow 0.3s var(--hc-ease),
                border-color 0.3s var(--hc-ease);
}

.store-product.border:hover {
    transform: translateY(-4px);
    box-shadow: var(--hc-shadow-hover);
    border-color: var(--hc-border-hover) !important;
}

.store-product.border h5 {
    transition: color 0.25s var(--hc-ease);
}

.store-product.border:hover h5 {
    color: var(--bs-primary);
}

/* product thumbnail frame inside top-stores vendor card */
.store-product__top {
    border-radius: var(--hc-radius-sm) !important;
    overflow: hidden;
    transition: border-color 0.25s var(--hc-ease);
}

.store-product:hover .store-product__top {
    border-color: var(--hc-border-hover) !important;
}

.store-product:hover .store-product__top img {
    transform: scale(1.06);
}

.store-product__top img {
    transition: transform 0.5s var(--hc-ease);
}

/* ------------------------------------------------------------
   6. SECTION HEADERS + "VIEW ALL" AFFORDANCE
   .styled-title (home-categories) + .btn-link chevron slide
   ------------------------------------------------------------ */
.styled-title::after {
    block-size: 0.2rem !important;
    inline-size: 2.75rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--bs-primary), rgba(var(--bs-primary-rgb), 0.35)) !important;
}

.btn-link {
    font-weight: 600;
    border-radius: 999px;
    transition: color 0.2s var(--hc-ease), background-color 0.2s var(--hc-ease);
}

.btn-link:hover {
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.08);
}

.btn-link .bi-chevron-right {
    transition: transform 0.2s var(--hc-ease);
}

.btn-link:hover .bi-chevron-right {
    transform: translateX(3px);
}

/* ------------------------------------------------------------
   7. SECTION SWIPER NAV BUTTONS (.rounded-10 prev/next used by
   top-stores / top-rated / featured-deals / find-what-you-need)
   ------------------------------------------------------------ */
.swiper-button-prev.rounded-10,
.swiper-button-next.rounded-10 {
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius-sm) !important;
    transition: background-color 0.2s var(--hc-ease),
                color 0.2s var(--hc-ease),
                border-color 0.2s var(--hc-ease);
}

.swiper-button-prev.rounded-10:hover,
.swiper-button-next.rounded-10:hover {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

/* ------------------------------------------------------------
   8. FIND-WHAT-YOU-NEED subcategory tiles (.find-what-you-need-items)
   ------------------------------------------------------------ */
.find-what-you-need-items .img-wrap {
    transition: transform 0.25s var(--hc-ease), box-shadow 0.25s var(--hc-ease);
}

.find-what-you-need-items a:hover .img-wrap {
    transform: translateY(-3px);
    box-shadow: var(--hc-shadow);
}

/* ------------------------------------------------------------
   9. DARK THEME OVERRIDES
   ------------------------------------------------------------ */
body[theme="dark"] .product.get-view-by-onclick.border,
body[theme="dark"] .slide-shadow,
body[theme="dark"] .store-product.border {
    border-color: var(--bs-border-color) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

body[theme="dark"] .product.get-view-by-onclick:hover,
body[theme="dark"] .slide-shadow:hover,
body[theme="dark"] .store-product.border:hover {
    border-color: var(--hc-border-hover) !important;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.6);
}

body[theme="dark"] .product__actions a,
body[theme="dark"] .store-product__action {
    background: var(--bg-icon);
    color: var(--bs-body-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}

body[theme="dark"] .product__actions a:hover,
body[theme="dark"] .product__actions a.wishlist_icon_active,
body[theme="dark"] .product__actions a.compare_list_icon_active,
body[theme="dark"] .store-product__action:hover {
    background: var(--bs-primary);
    color: #fff;
}

body[theme="dark"] .btn-link:hover {
    background: rgba(var(--bs-primary-rgb), 0.16);
}

body[theme="dark"] .product.get-view-by-onclick .product__old-price {
    color: #7d8288 !important;
}

/* ------------------------------------------------------------
   10. RESPONSIVE  (no horizontal overflow down to 360px)
   ------------------------------------------------------------ */
@media (max-width: 575.98px) {
    :root {
        --hc-radius: 12px;
    }

    .product.get-view-by-onclick:hover,
    .slide-shadow:hover,
    .store-product.border:hover {
        transform: translateY(-3px);
    }

    .discount-badge {
        font-size: 11px;
    }

    /* store cards go full width on phones; kill any inline min-width overflow */
    .store-list .store-product.border {
        width: 100%;
    }
}
