/* --- Custom Product Card Design --- */
.custom-product-card {
    backdrop-filter: blur(10px);
    border: 1px solid var(--adst-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.custom-product-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-8px);
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    background: var(--adst-bg-alt);
    text-align: center;
    aspect-ratio: 1 / 1;
    /* مربع مثالي */
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-wrapper img {
    transition: transform 0.6s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* يملأ المساحة */
}

.custom-product-card:hover .product-image-wrapper img,
.woocommerce ul.products li.product:hover .product-image-wrapper img {
    transform: scale(1.1);
}

/* --- Product Slider CSS --- */
.adst-product-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 200px;
    overflow: hidden;
    background: var(--adst-bg-alt);
    display: block;
}

.adst-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.adst-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    pointer-events: none;
}

.adst-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.adst-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}

.custom-product-card:hover .adst-slide img,
.woocommerce ul.products li.product:hover .adst-slide img {
    transform: scale(1.1);
}

/* Navigation Arrows */
.adst-slider-nav {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show arrows on hover */
.custom-product-card:hover .adst-slider-nav,
.woocommerce ul.products li.product:hover .adst-slider-nav,
.adst-product-slider:hover .adst-slider-nav,
.adst-product-slider:focus-within .adst-slider-nav {
    opacity: 1;
    pointer-events: auto;
}

.adst-slider-nav .nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: var(--adst-accent);
    padding: 0;
    min-width: 0;
    min-height: 0;
}

.adst-slider-nav .nav-btn:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.adst-slider-nav .nav-btn i {
    font-size: 18px;
    line-height: 1;
}

.adst-product-slider.adst-slider--static .adst-slider-nav {
    display: none;
}

.adst-product-slider.adst-slider--static .adst-slider-track {
    transform: none !important;
}

.woocommerce ul.products,
.woocommerce ul.products.columns-3,
.woocommerce ul.products.columns-4 {
    margin-bottom: 40px !important;
}

/* شارة الخصم */
.onsale {
    position: absolute;
    top: 15px;
    left: 15px;
    right: auto;
    background: var(--adst-accent);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 20px;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(48, 183, 135, 0.3);
    min-height: auto;
    min-width: auto;
    line-height: normal;
}

.product-details {
    padding: 20px;
    text-align: right;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.product-cat {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 8px;
}

.product-cat a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}

.product-cat a:hover {
    color: var(--adst-primary);
}

.product-title {
    font-size: 16px;
    margin: 0 0 10px;
    line-height: 1.5;
    font-weight: 700;
}

.product-title a {
    color: var(--adst-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.product-title a:hover {
    color: var(--adst-accent);
}


.product-price {
    color: var(--adst-primary);
    font-weight: bold;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-price .adst-price-symbol {
    width: 16px;
    height: 16px;
    display: inline-block;
    object-fit: contain;
    flex-shrink: 0;
}

.product-price .adst-price-symbol--fallback {
    width: auto;
    height: auto;
    font-size: 28px;
    line-height: 1;
    color: #006C3B;
}

.product-price del {
    color: #bbb;
    font-size: 14px;
    font-weight: normal;
    text-decoration: line-through;
}

.product-price ins {
    font-size: 24px;
}

.product-price .woocommerce-Price-amount {
    font-size: 22px;
}

.custom-product-card .woocommerce-Price-amount .woocommerce-Price-currencySymbol {
    display: none;
}

.product-actions {
    margin-top: auto;
}

.custom-product-card .button {
    width: 100%;
    display: block;
    background-color: var(--adst-accent) !important;
    color: #fff !important;
    border: 2px solid var(--adst-accent) !important;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.custom-product-card .button:hover {
    background-color: var(--adst-primary) !important;
    border-color: var(--adst-primary) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.custom-product-card .button.loading {
    opacity: 0.7;
    cursor: wait;
}

.custom-product-card .button.added {
    background-color: var(--adst-accent) !important;
    border-color: var(--adst-accent) !important;
    color: #fff !important;
}

/* ================================== */
/* ==========<Responsiveness>======== */
/* ================================== */

/* Mobile Screen */
@media (max-width: 576px) {
    .adst-slider-nav .nav-btn {
        width: 32px;
        height: 32px;
    }

    .adst-slider-nav .nav-btn i {
        font-size: 14px;
    }

    .woocommerce ul.products,
    .woocommerce ul.products.columns-3,
    .woocommerce ul.products.columns-4 {
        display: grid !important;
        row-gap: 12px !important;
        column-gap: 8px !important;
    }

    .woocommerce ul.products.columns-4 {
        margin-bottom: 30px !important;
    }

    .woocommerce ul.products li.product {
        width: 100% !important;
        margin: 0 !important;
        float: none !important;
    }

    .product-details {
        padding: 10px !important;
    }

    .product-title a,
    .product-title {
        font-size: 14px !important;
    }

    .product-price {
        gap: 2px;
    }

    .product-price .woocommerce-Price-amount,
    .product-price ins {
        font-size: 12px !important;
    }

    .product-price .adst-price-symbol {
        width: 15px;
        height: 15px;
    }

    .product-price .adst-price-symbol--fallback {
        font-size: 20px;
    }

    .adst-price-symbol {
        width: 24px;
        height: 24px;
    }

    .adst-price-symbol svg {
        width: 100%;
        height: 100%;
    }

    .custom-product-card .button {
        padding: 8px 4px !important;
        font-size: 12px !important;
        line-height: 1.2;
    }

    .ast-on-card-button.ast-onsale-card {
        top: 5px !important;
        right: 5px !important;
        font-size: 10px !important;
    }

    .adst-slider-nav {
        padding: 0 5px;
    }
}

/* Small Screens  */
@media (min-width: 577px) and (max-width: 767px) {
    .adst-slider-nav .nav-btn {
        width: 36px;
        height: 36px;
    }

    .adst-slider-nav .nav-btn i {
        font-size: 16px;
    }

    .woocommerce ul.products,
    .woocommerce ul.products.columns-3,
    .woocommerce ul.products.columns-4 {
        display: grid !important;
        row-gap: 12px !important;
        column-gap: 8px !important;
    }

    .woocommerce ul.products.columns-4 {
        margin-bottom: 30px !important;
    }

    .woocommerce ul.products li.product {
        width: 100% !important;
        margin: 0 !important;
        float: none !important;
    }

    .product-price {
        gap: 3px;
    }

    .product-price .woocommerce-Price-amount,
    .product-price ins {
        font-size: 18px;
    }

    .product-price .adst-price-symbol {
        width: 22px;
        height: 22px;
    }

    .product-price .adst-price-symbol--fallback {
        font-size: 22px;
    }

    .adst-price-symbol {
        width: 26px;
        height: 26px;
    }

    .adst-price-symbol svg {
        width: 100%;
        height: 100%;
    }

    .custom-product-card .button {
        padding: 8px 4px !important;
        font-size: 13px !important;
        line-height: 1.2;
    }

    .onsale {
        font-size: 10px !important;
        padding: 2px 8px !important;
        top: 10px !important;
        left: 10px !important;
    }
}

/* Tablet Screen */
@media (min-width: 768px) and (max-width: 920px) {
    .product-price {
        gap: 3px;
    }

    .product-price .woocommerce-Price-amount,
    .product-price ins {
        font-size: 20px;
    }
}

/* Large Screens */
@media (min-width: 920px) and (max-width: 1280px) {}