/* ==========================================================================
   WOWMART — ERLI-inspired storefront layer
   --------------------------------------------------------------------------
   Everything here is scoped under `body.wow-erli`, and the grey page ground
   under `body.wow-erli-home`, so the whole look reverts by removing those two
   classes from <body> in resources/views/frontend/layouts/app.blade.php.

   Loaded AFTER aiz-core.css / custom-style.css.
   ========================================================================== */

.wow-erli {
    --wow-ink: #1a1a1a;
    --wow-ink-soft: #5a5a5a;
    --wow-muted: #787878;
    --wow-muted-soft: #969696;
    --wow-line: #e2e2e2;
    --wow-ground: #f4f4f4;
    --wow-accent: #d0021b;      /* WOWMART red. Swap for #0097bc to go full ERLI teal. */
    --wow-price: #17882d;       /* ERLI's green "deal" price */
    --wow-price-soft: #eaf5ec;
    --wow-radius: 8px;
    --wow-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    --wow-shadow-hov: 0 6px 22px rgba(0, 0, 0, .12);
}

/* --------------------------------------------------------------------------
   Page ground — grey behind white cards, home page only.
   -------------------------------------------------------------------------- */
.wow-erli-home .aiz-main-wrapper {
    background: var(--wow-ground) !important;
}

/* Section headings: ERLI sets these much larger than the stock theme.
   Scoped to `.wow-section`, which only the home-page blocks carry — a bare
   `section >` selector also matched the footer's "Last viewed products"
   heading and blew it up to 28px. */
.wow-erli .wow-section > .container > .d-flex > h3,
.wow-erli .wow-section > .container > div > .d-flex > h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--wow-ink);
    letter-spacing: -.01em;
}

@media (min-width: 768px) {

    .wow-erli .wow-section > .container > .d-flex > h3,
    .wow-erli .wow-section > .container > div > .d-flex > h3 {
        font-size: 28px;
    }
}

/* --------------------------------------------------------------------------
   Hero slider fit.
   The category rail narrowed the hero from full-bleed to ~840px, but the theme
   boxes each slide at a fixed height (h-xl-370px) with object-fit: cover, so
   the artwork got cropped left and right. The three banners run 3.25 / 3.44 /
   3.55 : 1, so the box takes a 3.4 aspect and `contain` fits each one whole —
   the widest and narrowest are within ~1% of the box, so there is no visible
   letterboxing.
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) {
    .wow-erli .home-banner-area .home-slider .carousel-box > a > div {
        height: auto !important;
        aspect-ratio: 3.4;
    }

    .wow-erli .home-banner-area .home-slider .carousel-box > a > div > img {
        width: 100%;
        height: 100% !important;
        object-fit: contain;
        object-position: center;
    }
}

/* --------------------------------------------------------------------------
   Top nav white line.
   The header menu is a horizontal swipe list (`overflow-x: auto`). Between the
   Kategorie block and the cart it only gets ~589px, and its five items measure
   ~627px, so Chrome painted the light scrollbar as a white bar straight across
   the top of the hero — and clipped "Wszystkie kategorie".
   Trimming each link from 16px to 12px of side padding saves 40px and clears
   the 38px overflow; hiding the scrollbar keeps the list swipeable on touch
   without ever painting that bar again.
   -------------------------------------------------------------------------- */
.wow-erli header .hor-swipe {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.wow-erli header .hor-swipe::-webkit-scrollbar {
    display: none;
}

@media (min-width: 1200px) {

    /* beats bootstrap's .px-3, which is itself !important */
    .wow-erli header .hor-swipe > li > a {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

/* --------------------------------------------------------------------------
   Category sidebar — ERLI's always-visible card next to the hero banner.
   Keeps .aiz-category-menu / .category-nav-element / .sub-cat-menu so the
   existing AJAX sub-category flyout keeps working.
   -------------------------------------------------------------------------- */
/* aiz-core reserves exactly 270px for this column (.home-slider is
   max-width: calc(100% - 270px) from 1200px up), so the card is 256px wide and
   the remaining 14px becomes the gutter ERLI leaves next to its hero banner. */
.wow-erli .wow-cat-col {
    padding-right: 14px;
}

.wow-erli .wow-cat-sidebar {
    width: 256px;
    background: #fff;
    border: 1px solid var(--wow-line);
    border-radius: var(--wow-radius);
    padding: 6px 0;
    box-shadow: var(--wow-shadow);
}

.wow-erli .wow-cat-sidebar .categories {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wow-erli .wow-cat-sidebar .category-nav-element {
    border: 0;
}

/* Specificity here has to beat `.aiz-category-menu .category-nav-element > a`. */
.wow-erli .aiz-category-menu .category-nav-element > a.wow-cat-link {
    display: flex;
    align-items: center;
    padding: 9px 18px;
    font-size: 14px;
    line-height: 1.3;
    color: var(--wow-ink);
    text-decoration: none;
    background: transparent;
    transition: color .15s ease, background-color .15s ease;
}

.wow-erli .aiz-category-menu .category-nav-element:hover > a.wow-cat-link {
    background: #fafafa;
    color: var(--wow-accent);
}

.wow-erli .aiz-category-menu .category-nav-element:hover > a.wow-cat-link .wow-cat-name {
    margin-left: 0;
}

.wow-erli .wow-cat-icon {
    flex: 0 0 26px;
    width: 26px;
    margin-right: 12px;
    text-align: center;
    font-size: 21px;
    color: var(--wow-ink-soft);
    opacity: .8;
    transition: color .15s ease, opacity .15s ease;
}

.wow-erli .wow-cat-link:hover .wow-cat-icon {
    color: var(--wow-accent);
    opacity: 1;
}

.wow-erli .wow-cat-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wow-erli .wow-cat-all {
    display: block;
    margin: 6px 18px 2px;
    padding: 12px 0 6px;
    border-top: 1px solid var(--wow-line);
    text-align: center;
    font-size: 14px;
    color: var(--wow-ink);
    text-decoration: none;
    transition: color .15s ease;
}

.wow-erli .wow-cat-all:hover {
    color: var(--wow-accent);
}

/* The AJAX flyout sits flush against the card. */
.wow-erli .wow-cat-sidebar .sub-cat-menu {
    border-radius: var(--wow-radius);
    box-shadow: var(--wow-shadow-hov);
    border: 1px solid var(--wow-line);
}

/* --------------------------------------------------------------------------
   Category image tiles — "shop by category", the answer to ERLI's
   category-led homepage. Uses each category's cover image.
   -------------------------------------------------------------------------- */
.wow-erli .wow-tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (min-width: 576px) {
    .wow-erli .wow-tiles {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .wow-erli .wow-tiles {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 992px) {
    .wow-erli .wow-tiles {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1200px) {
    .wow-erli .wow-tiles {
        grid-template-columns: repeat(7, 1fr);
    }
}

.wow-erli .wow-tile {
    display: block;
    background: #fff;
    border: 1px solid var(--wow-line);
    border-radius: var(--wow-radius);
    padding: 10px;
    text-decoration: none;
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.wow-erli .wow-tile:hover {
    border-color: transparent;
    box-shadow: var(--wow-shadow-hov);
    transform: translateY(-2px);
}

.wow-erli .wow-tile-img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    background: var(--wow-ground);
}

.wow-erli .wow-tile-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 10px;
    min-height: 36px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--wow-ink);
    transition: color .15s ease;
}

.wow-erli .wow-tile:hover .wow-tile-name {
    color: var(--wow-accent);
}

/* --------------------------------------------------------------------------
   Product card — ERLI's borderless white tile: photo, badges, big split
   price, then the title underneath.
   -------------------------------------------------------------------------- */

/* Neutralise the stock theme's 1px grid around each carousel cell. */
.wow-erli .wow-pcell {
    padding: 0 5px;
    border: 0 !important;
}

.wow-erli .wow-pcard {
    position: relative;
    height: 100%;
    background: #fff;
    border: 1px solid transparent;
    border-radius: var(--wow-radius);
    padding: 10px 10px 14px;
    transition: box-shadow .18s ease, border-color .18s ease;
}

.wow-erli .wow-pcard:hover {
    border-color: var(--wow-line);
    box-shadow: var(--wow-shadow-hov);
}

.wow-erli .wow-pmedia {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #fff;
}

.wow-erli .wow-pmedia-link {
    display: block;
    position: relative;
}

.wow-erli .wow-pmedia img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    transition: transform .3s ease, opacity .25s ease;
}

.wow-erli .wow-pcard:hover .wow-pmedia .product-main-image {
    transform: scale(1.04);
}

/* Second photo cross-fades in on hover, when the product has one. */
.wow-erli .wow-pmedia .product-hover-image {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.wow-erli .wow-pcard:hover .wow-pmedia .product-hover-image {
    opacity: 1;
}

/* Badges */
.wow-erli .wow-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    pointer-events: none;
}

.wow-erli .wow-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #fff;
    background: var(--wow-accent);
}

.wow-erli .wow-badge--wholesale {
    background: #455a64;
}

/* Wishlist / compare, revealed on hover like ERLI's card affordances. */
.wow-erli .wow-pactions {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateX(6px);
    transition: opacity .18s ease, transform .18s ease;
}

.wow-erli .wow-pcard:hover .wow-pactions {
    opacity: 1;
    transform: none;
}

.wow-erli .wow-pactions > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .16);
    transition: background-color .15s ease;
}

.wow-erli .wow-pactions > a:hover {
    background: var(--wow-accent);
}

.wow-erli .wow-pactions > a:hover svg path {
    fill: #fff;
}

/* Add-to-cart overlay, hidden until hover so it stays out of the layout. */
.wow-erli .wow-cart-btn {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    background: var(--wow-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity .18s ease, transform .18s ease;
}

.wow-erli .wow-pcard:hover .wow-cart-btn {
    opacity: 1;
    transform: none;
}

.wow-erli .wow-cart-btn:hover,
.wow-erli .wow-cart-btn:focus {
    color: #fff;
    filter: brightness(.92);
}

/* Sales count — ERLI's "750+ osób kupiło" social proof line. */
.wow-erli .wow-psold {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--wow-muted-soft);
}

/* Price: large integer, small fraction, green when discounted. */
.wow-erli .wow-price {
    display: flex;
    align-items: flex-start;
    margin-top: 4px;
    line-height: 1;
    color: var(--wow-ink);
}

.wow-erli .wow-price--deal {
    color: var(--wow-price);
}

.wow-erli .wow-price-int {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.02em;
}

@media (min-width: 768px) {
    .wow-erli .wow-price-int {
        font-size: 26px;
    }
}

.wow-erli .wow-price-frac {
    margin-left: 2px;
    padding-top: 2px;
    font-size: 13px;
    font-weight: 700;
}

.wow-erli .wow-price-was {
    margin-top: 3px;
    font-size: 12px;
    color: var(--wow-muted-soft);
    text-decoration: line-through;
}

.wow-erli .wow-ptitle {
    margin: 8px 0 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
}

.wow-erli .wow-ptitle a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
    color: var(--wow-ink);
    text-decoration: none;
    transition: color .15s ease;
}

.wow-erli .wow-ptitle a:hover {
    color: var(--wow-accent);
}

/* --------------------------------------------------------------------------
   Home category rows — the banner-plus-carousel blocks.
   -------------------------------------------------------------------------- */
.wow-erli .wow-cat-banner {
    display: block;
    position: relative;
    overflow: hidden;
    height: 100%;
    border-radius: var(--wow-radius);
}

.wow-erli .wow-cat-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.wow-erli .wow-cat-banner:hover img {
    transform: scale(1.05);
}

.wow-erli .wow-cat-banner-name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 14px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, .68), rgba(0, 0, 0, 0));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

/* metro lays the banner and rail out as one white panel */
.wow-erli .wow-cat-row {
    background: #fff;
    border: 1px solid var(--wow-line);
    border-radius: var(--wow-radius);
}

.wow-erli .wow-cat-rail {
    background: #fff;
    border: 1px solid var(--wow-line);
    border-radius: var(--wow-radius);
    padding: 6px 4px;
}
