/* ACCOUNT V6 | minimal header icons and equal-height PRODUCT carousels.
 * Separate scopes prevent spillover into account dropdown bodies, gallery sliders
 * and product-detail thumbnails. Original icon SVGs and Owl behavior are preserved.
 */

/* Header triggers: only original white icons, without button capsules. */
header.main-header .g2-v4-header-actions .g2-v4-head-item {
    position: relative;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
header.main-header .g2-v4-header-actions .g2-v4-head-trigger,
header.main-header .g2-v4-header-actions .g2-v4-head-trigger[aria-expanded="true"] {
    position: relative;
    display: inline-flex;
    inline-size: 42px;
    min-inline-size: 42px;
    block-size: 44px;
    padding: 8px !important;
    margin: 0 !important;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    outline: 0;
    border-radius: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    color: #fff !important;
    transform: none !important;
    transition: color .18s ease !important;
}
header.main-header .g2-v4-header-actions .g2-v4-head-trigger::before,
header.main-header .g2-v4-header-actions .g2-v4-head-trigger::after {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}
header.main-header .g2-v4-header-actions .g2-v4-head-trigger .g2-original-header-svg {
    display: block;
    flex: none;
    inline-size: 25px;
    block-size: 25px;
    color: inherit !important;
    fill: currentColor !important;
    transition: color .18s ease, fill .18s ease !important;
}
header.main-header .g2-v4-header-actions .g2-v4-head-trigger .g2-original-header-svg path {
    fill: currentColor !important;
}
/* Keep the label available to assistive technology via aria-label on buttons. */
header.main-header .g2-v4-header-actions .g2-v4-head-trigger-text {display: none !important;}
/* Count is directly ON the icon; never an independent badge/pill. */
header.main-header .g2-v4-header-actions .g2-v4-head-trigger .g2-v4-head-count {
    position: absolute;
    z-index: 2;
    top: 8px;
    right: 2px;
    left: auto;
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    line-height: 1.15;
    font-size: 10px;
    font-weight: 900;
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,.6);
    direction: ltr;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
    transition: color .18s ease;
}
/* Hover (and keyboard focus) changes ONLY icon/count color, not button surface. */
header.main-header .g2-v4-header-actions .g2-v4-head-trigger:hover,
header.main-header .g2-v4-header-actions .g2-v4-head-trigger:focus-visible,
header.main-header .g2-v4-header-actions .g2-v4-head-trigger:hover .g2-v4-head-count,
header.main-header .g2-v4-header-actions .g2-v4-head-trigger:focus-visible .g2-v4-head-count {
    color: var(--primary-color, #ff6a6a) !important;
}
header.main-header .g2-v4-header-actions .g2-v4-head-trigger:focus-visible {
    outline: 2px solid currentColor !important;
    outline-offset: 2px;
}
@media (max-width: 640px) {
    header.main-header .g2-v4-header-actions {gap: 3px;}
    header.main-header .g2-v4-header-actions .g2-v4-head-trigger {
        inline-size: 38px;
        min-inline-size: 38px;
        block-size: 40px;
        padding: 6px !important;
    }
    header.main-header .g2-v4-header-actions .g2-v4-head-trigger .g2-original-header-svg {
        inline-size: 24px;
        block-size: 24px;
    }
}

/* Owl-based product CAROUSELS only; not image galleries inside product detail. */
:is(.product-carousel.carousel-md, .product-carousel.carousel-lg).owl-carousel .owl-stage {
    display: flex !important;
    align-items: stretch !important;
}
:is(.product-carousel.carousel-md, .product-carousel.carousel-lg).owl-carousel .owl-item {
    display: flex !important;
    align-self: stretch !important;
    height: auto !important;
    min-width: 0;
}
:is(.product-carousel.carousel-md, .product-carousel.carousel-lg).owl-carousel .owl-item > .item {
    display: flex !important;
    flex: 1 1 auto;
    width: 100%;
    height: auto !important;
    min-width: 0;
    margin-block: 0 !important;
    padding-block: 7px 16px;
}
:is(.product-carousel.carousel-md, .product-carousel.carousel-lg).owl-carousel .owl-item > .item > .product-card {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 100% !important;
    margin: 0 !important;
    padding: 9px 0 12px !important;
    overflow: hidden;
}
/* Reserve identical visual space, regardless of intrinsic image dimensions. */
:is(.product-carousel.carousel-md, .product-carousel.carousel-lg).owl-carousel .product-card > :is(.product-thumb, .product-thumb-hor) {
    flex: 0 0 auto;
    display: grid !important;
    place-items: center;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    padding: 10px !important;
    top: auto !important;
    min-height: 0 !important;
    overflow: hidden;
}
:is(.product-carousel.carousel-md, .product-carousel.carousel-lg).owl-carousel .product-card > .product-thumb-hor {
    aspect-ratio: 16 / 10;
}
:is(.product-carousel.carousel-md, .product-carousel.carousel-lg).owl-carousel .product-card > :is(.product-thumb, .product-thumb-hor) > img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    margin: 0 auto !important;
}
:is(.product-carousel.carousel-md, .product-carousel.carousel-lg).owl-carousel .product-card .product-card-body {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    margin-bottom: 40px;
    padding: 9px 12px 0 !important;
}
:is(.product-carousel.carousel-md, .product-carousel.carousel-lg).owl-carousel .product-card .product-title {
    flex: 0 0 auto;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    margin: 0 0 7px !important;
    overflow: hidden;
}
:is(.product-carousel.carousel-md, .product-carousel.carousel-lg).owl-carousel .product-card .product-title > a {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 22px !important;
    overflow-wrap: anywhere;
}
:is(.product-carousel.carousel-md, .product-carousel.carousel-lg).owl-carousel .product-card .product-meta {
    flex: 0 0 19px;
    min-height: 19px;
    max-height: 19px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin: 0 0 5px !important;
}
:is(.product-carousel.carousel-md, .product-carousel.carousel-lg).owl-carousel .product-card .price-index-h {
    margin-top: auto !important;
    min-height: 50px !important;
    height: auto !important;
    width: 100%;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
}
:is(.product-carousel.carousel-md, .product-carousel.carousel-lg).owl-carousel .product-card .product-prices-div {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 4px;
}
/* The source theme overlays its cart tab with position:absolute; keep it
 * overlayed. Reserving flex space for it would misalign prices by one row. */
:is(.product-carousel.carousel-md, .product-carousel.carousel-lg).owl-carousel .product-card > .product-head {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 6px 10px !important;
}
:is(.product-carousel.carousel-md, .product-carousel.carousel-lg).owl-carousel .product-card .countdown-timer {
    flex: 0 0 auto;
    min-height: 32px;
    margin: 0 !important;
}
@media (max-width: 575px) {
    :is(.product-carousel.carousel-md, .product-carousel.carousel-lg).owl-carousel .product-card .product-card-body {
        padding-inline: 9px !important;
    }
    :is(.product-carousel.carousel-md, .product-carousel.carousel-lg).owl-carousel .product-card .product-title {
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
    }
    :is(.product-carousel.carousel-md, .product-carousel.carousel-lg).owl-carousel .product-card .product-title > a {
        line-height: 21px !important;
        font-size: 11px;
    }
}
@media (prefers-reduced-motion: reduce) {
    header.main-header .g2-v4-header-actions .g2-v4-head-trigger,
    header.main-header .g2-v4-header-actions .g2-v4-head-count {transition: none !important;}
}
