/* ====== PRODUCT CARD COMPONENT ====== */
    .product-col {
        height: 100%;
    }
    .product-card {
        position: relative;
        background: #FFFFFF;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        display: flex;
        flex-direction: column;
        border: 1px solid rgba(0,0,0,0.03);
        height: 100%;
    }
    .product-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    }

    /* Image Area */
    .product-link-image { display: block; width: 100%; text-decoration: none; }
    .product-image-wrapper {
        position: relative;
        background: #F5F0E6;
        aspect-ratio: 1 / 1;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    .product-card-gallery { touch-action: pan-y; overscroll-behavior-x: contain; }
    .product-image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s ease;
    }
    .product-card:hover .product-image-wrapper img { transform: scale(1.05); }
    .product-placeholder { font-size: 3rem; color: #d0c8b9; }
    .product-card-gallery__track, .product-card-gallery__slide { position: absolute; inset: 0; }
    .product-card-gallery__slide { visibility: hidden; opacity: 0; transition: opacity .22s ease; }
    .product-card-gallery__slide.is-active { visibility: visible; opacity: 1; }
    .product-card-gallery__arrow {
        position: absolute; z-index: 4; top: 50%; width: 34px; height: 34px;
        display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
        background: rgba(255,255,255,.9); color: #3b3022; box-shadow: 0 2px 10px rgba(0,0,0,.16);
        transform: translateY(-50%); opacity: 0; transition: opacity .2s ease;
    }
    .product-card-gallery:hover .product-card-gallery__arrow,
    .product-card-gallery__arrow:focus-visible { opacity: 1; }
    .product-card-gallery__arrow--previous { right: 10px; }
    .product-card-gallery__arrow--next { left: 10px; }
    .product-card-gallery__dots {
        position: absolute; z-index: 4; right: 50%; bottom: 10px; display: flex; gap: 5px;
        padding: 5px 7px; border-radius: 999px; background: rgba(255,255,255,.76);
        transform: translateX(50%);
    }
    .product-card-gallery__dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: #b7ad9e; }
    .product-card-gallery__dot.is-active { background: #705326; transform: scale(1.25); }
    @media (max-width: 767.98px), (hover: none) {
        .product-card-gallery__arrow { display: none; }
        .product-card-gallery__dots { bottom: 8px; padding: 4px 6px; }
        .product-card-gallery__dot { width: 6px; height: 6px; }
    }

    .badge-new {
        position: absolute; top: 12px; right: 12px;
        background: #D32F2F; color: #fff;
        font-size: 0.75rem; font-weight: 600;
        padding: 4px 12px; border-radius: 20px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        z-index: 2;
    }

    /* Content Area */
    .product-info {
        padding: 1.2rem;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
    }
    .product-text-wrapper { margin-bottom: 1rem; }

    .product-link-text { text-decoration: none; color: inherit; display: block; }
    .product-title {
        font-size: 1rem;
        font-weight: 700;
        color: #1A1A1A;
        margin: 0 0 6px;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 3em;
    }
    .product-subtitle {
        font-size: 0.8rem;
        color: #888;
        margin: 0;
        font-weight: 400;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    .separator { color: #ccc; margin: 0 2px; }

    /* Price & Button */
    .product-price-section { margin-top: auto; }

    .product-price {
        font-size: 1.1rem;
        font-weight: 800;
        color: #111;
        margin-bottom: 12px;
        min-height: 3.35rem;
    }
    .price-currency { font-weight: 500; font-size: 0.85rem; color: #555; }

    .btn-add-to-cart {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        background: #8B6C3A;
        color: #fff;
        border: none;
        padding: 0.7rem 0;
        border-radius: 10px;
        font-weight: 600;
        font-size: 0.9rem;
        text-decoration: none;
        transition: all 0.2s;
        gap: 8px;
    }
    .btn-add-to-cart:hover {
        background: #6B4F1D;
        color: #fff;
        transform: translateY(-1px);
    }

    /* ================ [Badges] ================ */
    .badge-featured {
        position: absolute; top: 0.5rem; right: 0.5rem;
        display: grid; width: 28px; height: 28px; place-items: center;
        padding: 0; border: 1px solid rgba(255,255,255,.72); border-radius: 50%;
        background: #8B6C3A; color: #fff;
        font-size: 0.72rem;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        z-index: 2;
    }
    .badge-discount {
        position: absolute;
        top: 2.7rem;
        right: 0.5rem;
        z-index: 2;
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        max-width: calc(100% - 1rem);
        padding: 0.38rem 0.7rem;
        border: 1px solid rgba(255, 255, 255, 0.72);
        border-radius: 999px;
        background: #c62828;
        color: #fff;
        font-size: 0.72rem;
        font-weight: 800;
        line-height: 1.4;
        text-decoration: none;
        white-space: nowrap;
        box-shadow: 0 4px 12px rgba(153, 27, 27, 0.28);
    }
    .badge-discount i { font-size: 0.78rem; }
    .badge-discount--top { top: .5rem; }
    .badge-discount--with-featured { top: .5rem; right: 2.75rem; }

    /* ================ [Price Logic] ================ */
    /* Hide all prices by default */
    .in-stock-prices .price-item {
        display: none;
        font-size: 1rem;
    }

    /* Only display the first (cheapest) in-stock variant */
    .in-stock-prices .price-item:first-child {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.18rem;
        direction: rtl;
    }
    .price-original-line,
    .price-current-line {
        display: flex;
        align-items: baseline;
        gap: 0.3rem;
        white-space: nowrap;
    }
    .price-original-line { color: #c62828; line-height: 1.3; }
    .price-original {
        color: #c62828;
        font-size: 0.86rem;
        font-weight: 700;
        text-decoration-color: #c62828;
        text-decoration-thickness: 2px;
    }
    .price-original-currency { color: #c62828; font-size: 0.72rem; font-weight: 600; }
    .price-current-line .price-value { color: #111; font-size: 1.05rem; font-weight: 850; }

    /* If the first item is NOT the last item (meaning there are multiple in-stock variants), add "شروع از" */
    .in-stock-prices .price-item:first-child:not(:last-child) .price-current-line::before {
        content: "شروع از ";
        font-size: 0.9rem;
        color: #000000;
        margin-left: 4px; /* Margin left for RTL */
        font-weight: bold;
    }
    @media (max-width: 576px) {
        /* Hide all prices by default */
        .in-stock-prices .price-item {
            display: none;
            font-size: 0.7rem;
        }

        /* Only display the first (cheapest) in-stock variant */
        .in-stock-prices .price-item:first-child {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 0.15rem;
        }

        /* If the first item is NOT the last item (meaning there are multiple in-stock variants), add "شروع از" */
        .in-stock-prices .price-item:first-child:not(:last-child) .price-current-line::before {
            content: "شروع از ";
            font-size: 0.72rem;
            color: #000000;
            margin-left: 4px; /* Margin left for RTL */
            font-weight: bold;
        }
        .price-original { font-size: 0.78rem; }
        .price-current-line .price-value { font-size: 0.9rem; }
        .price-currency { font-size: 0.72rem; }
    }



    /* ================ [Out of Stock Styles] ================ */
    /* Fades the image and creates a container for the centered label */
    .out-of-stock-overlay {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(255, 255, 255, 0.65); /* Creates the "کم رنگ" (faded) effect over the image */
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2;
        border-radius: inherit;
    }

    /* The centered pill badge */
    .out-of-stock-label {
        background: rgba(0, 0, 0, 0.7); /* Dark semi-transparent background */
        color: #fff;
        font-size: 0.95rem;
        font-weight: 700;
        padding: 8px 24px;
        border-radius: 30px;
        backdrop-filter: blur(4px); /* Adds a modern frosted glass effect to the badge */
        box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    }

    /* Fades the title, price, and button section below the image */
    .out-of-stock-card .product-info {
        opacity: 0.55;
        transition: opacity 0.3s ease;
    }

    /* Slightly restore opacity if the user hovers over the faded text */
    .out-of-stock-card:hover .product-info {
        opacity: 0.75;
    }
