/* Full Premium Grid CSS Cleanup & Re-architecture */
.wfg-df479111-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap: 8px;
    row-gap: 32px;
    width: 100%;
    direction: rtl !important;
    font-family: "Assistant", sans-serif !important;
}

/* Apply Assistant directly to every visible text node so Elementor/theme
   typography cannot replace it through a more specific inherited rule. */
.wfg-df479111-grid a,
.wfg-df479111-grid button,
.wfg-df479111-grid input,
.wfg-df479111-grid select,
.wfg-df479111-grid textarea,
.wfg-df479111-grid h1,
.wfg-df479111-grid h2,
.wfg-df479111-grid h3,
.wfg-df479111-grid h4,
.wfg-df479111-grid h5,
.wfg-df479111-grid h6,
.wfg-df479111-grid p,
.wfg-df479111-grid span:not(.wfg-df479111-heart-icon),
.wfg-df479111-grid .wfg-df479111-badge,
.wfg-df479111-grid .wfg-df479111-product-title,
.wfg-df479111-grid .wfg-df479111-product-title a,
.wfg-df479111-grid .wfg-df479111-price-container,
.wfg-df479111-grid .wfg-df479111-size-btn,
.wfg-df479111-grid .wfg-df479111-mobile-size-option,
.wfg-df479111-grid .wfg-df479111-mobile-size-toggle,
.wfg-df479111-grid .wfg-df479111-more-colors,
.wfg-df479111-grid .wfg-df479111-empty {
    font-family: "Assistant", sans-serif !important;
}

/* Elementor Grid Alignment control. RTL affects grid placement only, so an
   incomplete row starts from the right. Card internals are isolated below. */
.wfg-df479111-grid.wfg-df479111-align-right {
    direction: rtl !important;
}

.wfg-df479111-grid.wfg-df479111-align-left {
    direction: ltr !important;
}

.wfg-df479111-grid > .wfg-df479111-product-card {
    direction: ltr;
}

/* Preserve the existing internal card alignment. */
.wfg-df479111-product-title,
.wfg-df479111-product-title a {
    direction: rtl;
}

@media (max-width: 1024px) {
    .wfg-df479111-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 767px) {
    .wfg-df479111-grid {
        width: 100%;
        direction: rtl !important;
    }

    .wfg-df479111-grid.wfg-df479111-mobile-layout-slider {
        display: flex;
        flex-wrap: nowrap;
        gap: 5px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 18px 10px 0;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .wfg-df479111-grid.wfg-df479111-mobile-layout-slider::-webkit-scrollbar {
        display: none;
    }

    .wfg-df479111-grid.wfg-df479111-mobile-layout-slider > .wfg-df479111-product-card {
        flex: 0 0 43%;
        width: 43%;
        min-width: 43%;
        scroll-snap-align: start;
        direction: ltr;
    }

    .wfg-df479111-grid.wfg-df479111-mobile-layout-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 5px;
        row-gap: 24px;
        overflow: visible;
        padding: 0;
    }

    .wfg-df479111-grid.wfg-df479111-mobile-layout-grid > .wfg-df479111-product-card {
        width: auto;
        min-width: 0;
        direction: ltr;
    }
}

/* Base Card structure with consistent height */
.wfg-df479111-product-card {
    display: flex;
    flex-direction: column;
    background: transparent;
    position: relative;
    overflow: hidden;
    height: 100%;
}

/* Tall editorial product area matching the target grid */
.wfg-df479111-media-box {
    position: relative;
    width: 100%;
    padding-top: 176%;
    background: #f5f5f5;
    overflow: hidden;
}

.wfg-df479111-gallery-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.wfg-df479111-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms ease;
}

.wfg-df479111-slide.active {
    opacity: 1;
    visibility: visible;
}

.wfg-df479111-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.35s ease;
}

/* Image zoom effect on hover */
.wfg-df479111-product-card:hover .wfg-df479111-slide.active img {
    transform: scale(1.05);
}

/* Thin SVG Slider Arrows */
.wfg-df479111-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: color 0.3s ease;
    z-index: 5;
    padding: 0;
    color: #111111;
}

.wfg-df479111-arrow svg {
    width: 24px;
    height: 24px;
    stroke: #111111;
}

.wfg-df479111-prev { left: 4px; }
.wfg-df479111-next { right: 4px; }

.wfg-df479111-arrow:hover {
    color: #666666;
}

/* Vertical Top-Left Badges Stack */
.wfg-df479111-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
}

.wfg-df479111-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 0.5px;
    width: fit-content;
}

.wfg-df479111-badge-new {
    background: #ffffff;
    color: #111111;
}

.wfg-df479111-badge-discount {
    background: #E30613;
    color: #ffffff;
}

/* Transparent Wishlist Icon */
.wfg-df479111-wishlist-wrap {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 18px;
    height: 18px;
    z-index: 10;
}

.wfg-df479111-wishlist {
    position: relative;
    width: 18px;
    height: 18px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    padding: 0;
    display: block;
}

.wfg-df479111-heart-icon {
    width: 18px;
    height: 18px;
    fill: transparent;
    stroke: #111111;
    stroke-width: 1.5;
    transition: stroke 0.3s ease, fill 0.3s ease;
}

.wfg-df479111-wishlist:hover .wfg-df479111-heart-icon {
    fill: transparent;
    stroke: #666666;
}

.wfg-df479111-wishlist.active .wfg-df479111-heart-icon {
    fill: #111111;
    stroke: #111111;
}

.wfg-df479111-wishlist.loading {
    opacity: 0.55;
    pointer-events: none;
}

/* YITH supplies the wishlist state/AJAX action; the grid keeps its own heart UI. */
.wfg-df479111-yith-bridge {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    pointer-events: none !important;
}

#yith-wcwl-popup-message,
.wfg-df479111-yith-bridge .feedback,
.wfg-df479111-yith-bridge .yith-wcwl-tooltip {
    display: none !important;
}

/* Sizing Hover Overlay (White, 0.98 Opacity, slides up) */
.wfg-df479111-sizes-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
    z-index: 8;
    padding: 0;
}

.wfg-df479111-product-card:hover .wfg-df479111-sizes-overlay {
    transform: translateY(0);
    opacity: 1;
}

.wfg-df479111-mobile-size-toggle {
    display: none;
}

.wfg-df479111-mobile-controls {
    display: none;
}

.wfg-df479111-sizes-inner {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    justify-content: stretch;
    width: 100%;
    direction: rtl;
}

/* Premium size button states */
.wfg-df479111-size-btn {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
    height: 40px;
    border: 0;
    background: #ffffff;
    color: #111111;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0;
}

.wfg-df479111-size-btn:hover,
.wfg-df479111-size-btn.selected {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}

/* Info Row Styling matching Zara/H&M reference */
.wfg-df479111-info {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    padding: 7px 0 4px;
    column-gap: 10px;
    row-gap: 8px;
}

.wfg-df479111-info-left {
    display: block;
    width: 100%;
    grid-column: 1;
    grid-row: 2;
}

/* Color swatches displayed below the product image */
.wfg-df479111-swatches {
    position: relative;
    display: flex;
    gap: 7px;
    align-items: center;
    min-height: 20px;
    margin-top: 0;
    padding: 0 1px;
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
}

.wfg-df479111-swatches.is-empty {
    visibility: hidden;
}

.wfg-df479111-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    border: 1px solid #b8b8b8;
    outline: 1px solid transparent;
    outline-offset: 2px;
    transition: border-color 0.2s, outline-color 0.2s, transform 0.2s;
    box-sizing: border-box;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
}

.wfg-df479111-swatch:hover,
.wfg-df479111-swatch.selected {
    border: 1px solid #111111;
    outline-color: #111111;
}

.wfg-df479111-swatch:focus,
.wfg-df479111-swatch:active {
    outline-color: #111111;
}

/* Store color terms: remain stable on normal, hover, focus and selected states. */
.wfg-df479111-swatch[data-color="beige"] { background-color: #d2b48c !important; }
.wfg-df479111-swatch[data-color="black"] { background-color: #111111 !important; }
.wfg-df479111-swatch[data-color="brown"] { background-color: #795548 !important; }
.wfg-df479111-swatch[data-color="light-blue"] { background-color: #add8e6 !important; }
.wfg-df479111-swatch[data-color="lilac"] { background-color: #c8a2c8 !important; }
.wfg-df479111-swatch[data-color="navy"] { background-color: #000080 !important; }
.wfg-df479111-swatch[data-color="opaque"] { background-color: #f5f5f5 !important; }
.wfg-df479111-swatch[data-color="opiate"] { background-color: #987d7d !important; }
.wfg-df479111-swatch[data-color="stone"] { background-color: #aaa58b !important; }
.wfg-df479111-swatch[data-color="white"] { background-color: #ffffff !important; }
.wfg-df479111-swatch[data-color="red"] { background-color: #e30613 !important; }
.wfg-df479111-swatch[data-color="blue"] { background-color: #1f4e8c !important; }
.wfg-df479111-swatch[data-color="green"] { background-color: #3f704d !important; }
.wfg-df479111-swatch[data-color="grey"],
.wfg-df479111-swatch[data-color="gray"] { background-color: #808080 !important; }

.wfg-df479111-product-card:hover .wfg-df479111-swatches {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

/* Price Line Formatting */
.wfg-df479111-price-container {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    direction: ltr;
    text-align: left;
}

.wfg-df479111-price-container del {
    color: #888888;
    margin-right: 6px;
    text-decoration: line-through;
}

.wfg-df479111-price-container ins {
    text-decoration: none;
    font-weight: 700;
    color: #E30613;
}

/* Product title (Right aligned, max 2 lines ellipsis) */
.wfg-df479111-info-right {
    width: 100%;
    max-width: 100%;
    text-align: right;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
}

.wfg-df479111-product-title {
    font-size: 12px;
    margin: 0;
    line-height: 1.4;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 17px;
}

.wfg-df479111-product-title a {
    color: #111111;
    text-decoration: none;
}

.wfg-df479111-media-box.is-product-link {
    cursor: pointer;
}

@media (max-width: 1024px) {
    .wfg-df479111-media-box {
        padding-top: 150%;
    }
}

@media (max-width: 767px) {
    .wfg-df479111-media-box {
        padding-top: 160%;
    }

    .wfg-df479111-sizes-overlay {
        display: none;
        transform: translateY(100%);
        opacity: 0;
        padding: 0;
    }

    .wfg-df479111-mobile-size-toggle {
        position: absolute;
        left: 8px;
        bottom: 8px;
        z-index: 4;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        min-width: 18px;
        padding: 0;
        margin: 0;
        border: 1px solid #d5d5d5 !important;
        border-radius: 50%;
        background: #ffffff !important;
        color: #666666 !important;
        box-shadow: none !important;
        font-size: 15px;
        font-weight: 300;
        line-height: 1;
        cursor: pointer;
        pointer-events: auto;
    }

    .wfg-df479111-mobile-size-toggle svg {
        width: 10px;
        height: 10px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .wfg-df479111-product-card.mobile-sizes-open .wfg-df479111-mobile-size-toggle {
        color: #111111 !important;
    }

    .wfg-df479111-mobile-controls {
        position: absolute;
        inset: 0;
        z-index: 11;
        display: block;
        width: auto;
        height: auto;
        padding: 0;
        margin: 0;
        background: transparent;
        box-sizing: border-box;
        direction: ltr;
        pointer-events: none;
    }

    .wfg-df479111-mobile-dots {
        position: absolute;
        left: 50%;
        bottom: 9px;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        height: 12px;
    }

    .wfg-df479111-mobile-dot {
        display: block;
        width: 5px;
        height: 4px;
        border-radius: 5px;
        background: #9d9d9d;
        transition: width 0.2s ease, background-color 0.2s ease;
    }

    .wfg-df479111-mobile-dot.active {
        width: 15px;
        background: #111111;
    }

    .wfg-df479111-mobile-sizes-panel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: stretch;
        width: 100%;
        height: 36px;
        padding: 0 4px 0 30px;
        box-sizing: border-box;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        direction: rtl;
        opacity: 0;
        transform: translateY(8px);
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    }

    .wfg-df479111-product-card.mobile-sizes-open .wfg-df479111-mobile-sizes-panel {
        display: flex;
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
    }

    .wfg-df479111-product-card.mobile-sizes-open .wfg-df479111-mobile-dots {
        display: none;
    }

    .wfg-df479111-mobile-size-option {
        flex: 1 1 0;
        min-width: 0;
        height: 36px;
        padding: 0 2px;
        margin: 0;
        border: 0 !important;
        border-radius: 0;
        background: transparent !important;
        color: #111111 !important;
        box-shadow: none !important;
        font-size: 9px;
        font-weight: 400;
        line-height: 36px;
        text-align: center;
    }

    .wfg-df479111-mobile-size-option.selected {
        font-weight: 600;
    }

    .wfg-df479111-size-btn {
        width: auto;
        height: 36px;
        font-size: 10px;
    }

    .wfg-df479111-info {
        padding-top: 6px;
        column-gap: 5px;
        row-gap: 6px;
    }

    .wfg-df479111-product-title,
    .wfg-df479111-price-container {
        font-size: 10px;
    }

    .wfg-df479111-swatches {
        min-height: 18px;
        gap: 6px;
    }

    .wfg-df479111-swatch {
        width: 11px;
        height: 11px;
    }
}
