/*
Theme Name: Rastafari Child
Theme URI:  https://www.wpserveur.net
Author:     Rastafari Wellness
Author URI: https://www.wpserveur.net
Template:   astra
Version:    1.0
License:    GNU General Public License v2 or later
*/

.custom-product-filter-section {
    width: 100%;
    overflow: hidden;
}


/* =========================
   CATEGORY FILTER
========================= */

.custom-product-category-filter {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
    overflow-x: auto;
    scrollbar-width: none;
}

.custom-product-category-filter::-webkit-scrollbar {
    display: none;
}

.custom-product-category-btn {
    flex: 0 0 auto;
    padding: 13px 27px;
    border: 1px solid #16383b;
    border-radius: 30px;
    background: transparent;
    color: #17282a;
    font-size: 18px;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.25s ease;
}

.custom-product-category-btn:hover,
.custom-product-category-btn.active {
    background: #1a7a4c;
    color: #fff;
}


/* =========================
   CAROUSEL
========================= */

.custom-product-swiper {
    width: 100%;
    overflow: visible;
}

.custom-product-swiper .swiper-slide {
    height: auto;
}


/* =========================
   PRODUCT CARD
========================= */

.custom-product-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid #c9d09a;
    border-radius: 20px;
    background: #fff;
}


/* =========================
   IMAGE
========================= */

.custom-product-image {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #e9dfca;
    overflow: hidden;
}

.custom-product-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}


/* =========================
   RATING
========================= */

.custom-product-rating {
    position: absolute;
    left: 10px;
    bottom: 10px;

    display: flex;
    align-items: center;
    gap: 5px;

    padding: 5px 10px;

    border-radius: 20px;

    background: #fff;

    font-size: 14px;
}

.custom-product-rating span {
    font-size: 16px;
}


/* =========================
   CONTENT
========================= */

.custom-product-content {
    padding: 20px;
}


/* =========================
   TAGS
========================= */

.custom-product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
}

.custom-product-tag {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid #b8c58b;
    border-radius: 20px;
    background: #FFF9EE;
    color: #19302f;
    font-size: 13px;
}


/* =========================
   TITLE
========================= */

.custom-product-title {
    margin: 0 0 12px;
    font-size: 20px;
    line-height: 1.15;
    font-weight: 500;
}

.custom-product-title a {
    color: #000;
    text-decoration: none;
}


/* =========================
   PRICE
========================= */

.custom-product-price {
    margin-bottom: 14px;
    color: #000;
    font-size: 20px;
    font-weight: 700;
}

.custom-product-price del {
    margin-right: 5px;
    color: #888;
    font-size: 16px;
}


/* =========================
   ADD TO CART
========================= */

.custom-product-add-cart {
    width: 100%;
    padding: 14px 20px;
    border: 0;
    border-radius: 30px;
    background: #275c53;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.custom-product-add-cart:hover {
    opacity: 0.85;
}


/* =========================
   NAVIGATION
========================= */

.custom-product-prev,
.custom-product-next {
    position: absolute;
    top: 50%;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    cursor: pointer;
}

.custom-product-prev {
    left: 10px;
}

.custom-product-next {
    right: 10px;
}


/* =========================
   LOADING
========================= */

.custom-product-carousel-wrapper {
    transition: opacity 0.2s ease;
}

.custom-product-carousel-wrapper.is-loading {
    opacity: 0.45;
    pointer-events: none;
}

/* =========================================
   Equal Height Product Cards
========================================= */

/* Make every Swiper slide stretch */
.custom-product-filter-section .swiper-slide {
    height: auto;
    display: flex;
}

/* Product card */
.custom-product-filter-section .custom-product-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Product image */
.custom-product-filter-section .custom-product-image {
    flex-shrink: 0;
}

/* Product content */
.custom-product-filter-section .custom-product-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Product tags */
.custom-product-filter-section .custom-product-tags {
    flex-shrink: 0;
}

/* Product title */
.custom-product-filter-section .custom-product-title {
    flex-shrink: 0;
}

/* Price */
.custom-product-filter-section .custom-product-price {
    flex-shrink: 0;
}

/* Add to cart button */
.custom-product-filter-section .custom-product-add-cart {
    margin-top: auto;
    width: 100%;
}

/* =========================================
   SHOP PRODUCT GRID
========================================= */

body.archive ul.products,
body.woocommerce-shop ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* =========================================
   PRODUCT ITEM
========================================= */

body.archive ul.products li.product,
body.woocommerce-shop ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    box-sizing: border-box !important;
    border: 1px solid #d8d89d !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    background: #fff !important;
}


/* =========================================
   PRODUCT IMAGE
========================================= */

body.archive ul.products li.product img,
body.woocommerce-shop ul.products li.product img {
    width: 100% !important;
    object-fit: cover !important;
    margin: 0 !important;
    display: block !important;
}


/* =========================================
   PRODUCT CONTENT AREA
========================================= */

body.archive ul.products li.product > *:not(img),
body.woocommerce-shop ul.products li.product > *:not(img) {
    box-sizing: border-box;
}


/* =========================================
   TITLE
========================================= */

body.archive ul.products li.product .woocommerce-loop-product__title,
body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title {
    font-size: 20px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    color: #111 !important;
    margin: 15px 20px 10px !important;
    padding: 0 !important;
}


/* =========================================
   PRICE
========================================= */

body.archive ul.products li.product .price,
body.woocommerce-shop ul.products li.product .price {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #111 !important;
    margin: 0 20px 20px !important;
}


/* =========================================
   ADD TO CART
========================================= */

body.archive ul.products li.product .button,
body.woocommerce-shop ul.products li.product .button {
    width: calc(100% - 40px) !important;
    min-height: 54px !important;
    margin: auto 20px 20px !important;
    padding: 12px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    border-radius: 30px !important;
    background: #28675c !important;
    color: #fff !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    text-align: center !important;
    text-decoration: none !important;
}


body.archive ul.products li.product .button:hover,
body.woocommerce-shop ul.products li.product .button:hover {
    background: #1f554c !important;
    color: #fff !important;
}

body.woocommerce-shop ul.products li.product {
    display: flex !important;
    flex-direction: column !important;
}

body.woocommerce-shop ul.products li.product .button {
    margin-top: auto !important;
}

body.archive ul.products li.product .rastafari-rx-badge {
	position: absolute;
    top: 21px;
    right: 14px;
    background: #fff;
    padding: 1px 10px;
    border-radius: 30px;
}
body.archive ul.products li.product .ast-woo-product-category {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid #b8c58b;
    border-radius: 20px;
    background: #FFF9EE;
    color: #19302f;
    font-size: 13px;
    order: 1;
    width: fit-content;
    margin: 15px 20px 0;
	opacity: 1;
}
body.archive ul.products li.product .astra-shop-summary-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
}
body.archive ul.products li.product .astra-shop-summary-wrap .ast-loop-product__link {
	order: 2;
}
body.archive ul.products li.product .astra-shop-summary-wrap .price {
	order: 3;
}
body.archive ul.products li.product .astra-shop-summary-wrap .product_type_simple {
	order: 4;
}
body.archive .woocommerce-pagination {
	text-align: center;
    margin-top: 40px;
}
.site-footer .menu {
	text-align: left;
    list-style: inside;
    color: #fff;
}
.site-footer .menu li a {
	color: #d1d1d1;
}
.custom-product-image {
    position: relative;
}
.custom-product-rx-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 32px;
    padding: 0 12px;
    background: #ffffff;
    color: #222222;
    border: 1px solid #d5d5a4;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    z-index: 10;
    box-sizing: border-box;
}

/* =========================================
   Custom Product Add to Cart Button
   ========================================= */

.custom-product-add-cart {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 56px;
    padding: 14px 24px;
    background: #3f716b !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    box-sizing: border-box;
    overflow: hidden;
}

/* Keep text visible */
.custom-product-add-cart::before {
    color: #ffffff;
}

/* WooCommerce loading state */
.custom-product-add-cart.loading {
    opacity: 1 !important;
    pointer-events: none;
    color: transparent !important;
}

/* Loading spinner */
.custom-product-add-cart.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: customCartSpinner 0.7s linear infinite;
}

/* After product is added */
.custom-product-add-cart.added {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Prevent WooCommerce default icon from breaking layout */
.custom-product-add-cart.added::after {
    display: none;
}

@keyframes customCartSpinner {
    to {
        transform: rotate(360deg);
    }
}

/* Hover */
.custom-product-add-cart:hover {
    background: #315f59 !important;
    color: #ffffff !important;
}
/* Hide WooCommerce View basket link */
.custom-product-filter-section .added_to_cart.wc-forward {
    display: none !important;
}

/* Keep button stable during AJAX */
.custom-product-filter-section .custom-product-add-cart {
    position: relative;
}

/* Added state */
.custom-product-filter-section .custom-product-add-cart.added {
    color: #fff !important;
    opacity: 1 !important;
}

/* =========================================
   Product Detail - Rx Badge
   ========================================= */

.single-product .woocommerce-product-gallery {
    position: relative !important;
}

/* Rx badge */
.single-product .rastafari-rx-badge {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 32px;
    padding: 0 12px;
    background: #ffffff;
    color: #222222;
    border: 1px solid #d5d5a4;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    z-index: 999 !important;
    box-sizing: border-box;
}

/* Make sure gallery images don't cover the badge */
.single-product .woocommerce-product-gallery__wrapper {
    position: relative;
}
.post-type-archive-doctor .content-area  .ast-archive-description {
	padding: 0;
}

@media (max-width: 1024px) {

    body.woocommerce-shop ul.products,
    body.post-type-archive-product ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

}

/* =========================
   MOBILE
========================= */

@media (max-width: 767px) {

    .custom-product-category-filter {
        gap: 10px;
        margin-bottom: 18px;
    }

    .custom-product-category-btn {
        padding: 11px 20px;
        font-size: 15px;
    }

    .custom-product-content {
        padding: 15px;
    }

    .custom-product-title {
        font-size: 22px;
    }

    .custom-product-price {
        font-size: 24px;
    }

    .custom-product-prev,
    .custom-product-next {
        display: none;
    }

	body.woocommerce-shop ul.products,
    body.post-type-archive-product ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    body.woocommerce-shop ul.products li.product
    .woocommerce-loop-product__title,
    body.post-type-archive-product ul.products li.product
    .woocommerce-loop-product__title {
        font-size: 17px !important;
        margin: 12px 14px 8px !important;
    }

    body.woocommerce-shop ul.products li.product .price,
    body.post-type-archive-product ul.products li.product .price {
        font-size: 18px !important;
        margin-left: 14px !important;
        margin-right: 14px !important;
    }

    body.woocommerce-shop ul.products li.product .button,
    body.post-type-archive-product ul.products li.product .button {
        width: calc(100% - 28px) !important;
        margin-left: 14px !important;
        margin-right: 14px !important;
        font-size: 14px !important;
    }
	
	body.post-type-archive-product ul.products li.product .ast-woo-product-category {
		margin-left: 14px;
	}
	.custom-product-add-cart {
        min-height: 52px;
        padding: 13px 20px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    body.woocommerce-shop ul.products,
    body.post-type-archive-product ul.products {
        grid-template-columns: 1fr !important;
    }
}