/**
 * Alpha Amino Store - storefront styling
 * Version 1.1.10
 *
 * Stability release:
 * - No JavaScript touches product-card purchase buttons.
 * - WooCommerce/Qi keeps its native add-to-cart markup and behavior.
 * - Shop All is the visual template for product category pages.
 * - Homepage Reno Product Slider styling is deliberately conservative.
 */

/* =========================================================================
   SHOP ALL + PRODUCT CATEGORY ARCHIVES
   ========================================================================= */

.aa-shop-grid-fix .qodef-woo-product-list,
.aa-shop-grid-fix .qodef-woo-product-list .qodef-grid-inner,
.aa-shop-grid-fix .qodef-woo-product-list .qodef-grid-item,
.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-inner,
.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-content,
.aa-shop-grid-fix .woocommerce ul.products,
.aa-shop-grid-fix .woocommerce ul.products li.product {
    box-sizing: border-box;
    min-width: 0;
}

/* Equal card structure without relocating any native links/buttons. */
.aa-shop-grid-fix .qodef-woo-product-list .qodef-grid-inner {
    align-items: stretch;
}

.aa-shop-grid-fix .qodef-woo-product-list .qodef-grid-item {
    display: flex;
}

.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

/*
 * Qi/Qode renders a full-card product link after the card content. Keep that
 * link behind the actual image/content controls so native Add to Cart remains
 * clickable. This is CSS-only; the original WooCommerce button stays exactly
 * where Qi rendered it.
 */
.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-image,
.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-content {
    position: relative;
    z-index: 2;
}

.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-image-inner {
    position: relative;
    z-index: 5;
}

.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-image-inner .button {
    position: relative;
    z-index: 6;
    pointer-events: auto !important;
}

.aa-shop-grid-fix .qodef-woo-product-list .woocommerce-LoopProduct-link.woocommerce-loop-product__link {
    z-index: 1 !important;
}

/* Consistent product image area. */
.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-image {
    height: 300px;
    min-height: 0;
    overflow: hidden;
}

.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-image > img,
.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-image a > img,
.aa-shop-grid-fix .woocommerce ul.products li.product a img {
    display: block;
    width: 100% !important;
    height: 300px !important;
    max-width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
}

/* Center the same customer-facing fields on Shop All and category cards. */
.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-content,
.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-title,
.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-title-link,
.aa-shop-grid-fix .qodef-woo-product-list .product-card-mg,
.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-price,
.aa-shop-grid-fix .qodef-woo-product-list .price,
.aa-shop-grid-fix .woocommerce ul.products li.product,
.aa-shop-grid-fix .woocommerce ul.products li.product .woocommerce-loop-product__title,
.aa-shop-grid-fix .woocommerce ul.products li.product .product-card-mg,
.aa-shop-grid-fix .woocommerce ul.products li.product .price {
    text-align: center !important;
}

.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-title,
.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-title-link,
.aa-shop-grid-fix .qodef-woo-product-list .product-card-mg,
.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-price,
.aa-shop-grid-fix .woocommerce ul.products li.product .woocommerce-loop-product__title,
.aa-shop-grid-fix .woocommerce ul.products li.product .product-card-mg,
.aa-shop-grid-fix .woocommerce ul.products li.product .price {
    width: 100%;
}

.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-title,
.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-title-link,
.aa-shop-grid-fix .woocommerce ul.products li.product .woocommerce-loop-product__title {
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
}

/* Keep every complete money amount together and centered. */
.aa-shop-grid-fix .qodef-woo-product-list .price,
.aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-price,
.aa-shop-grid-fix .woocommerce ul.products li.product .price {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center !important;
    line-height: 1.35 !important;
    word-spacing: normal !important;
    letter-spacing: normal !important;
}

.aa-shop-grid-fix .price .woocommerce-Price-amount,
.aa-shop-grid-fix .qodef-woo-product-price .woocommerce-Price-amount {
    display: inline-block !important;
    float: none !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    vertical-align: baseline !important;
}

.aa-shop-grid-fix .price .woocommerce-Price-amount bdi,
.aa-shop-grid-fix .qodef-woo-product-price .woocommerce-Price-amount bdi,
.aa-shop-grid-fix .price .woocommerce-Price-currencySymbol,
.aa-shop-grid-fix .qodef-woo-product-price .woocommerce-Price-currencySymbol {
    display: inline !important;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    white-space: nowrap !important;
}

/* Standard WooCommerce archive fallback. */
.aa-shop-grid-fix .woocommerce ul.products {
    align-items: stretch;
}

.aa-shop-grid-fix .woocommerce ul.products li.product {
    min-width: 0;
}

/* Tablet */
@media (max-width: 1024px) {
    .aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-image,
    .aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-image > img,
    .aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-image a > img,
    .aa-shop-grid-fix .woocommerce ul.products li.product a img {
        height: 250px !important;
    }
}

/*
 * Mobile: Shop All is the template. Category archives are given the same
 * usable content width so titles such as RETATRUTIDE PEN wrap identically.
 */
@media (max-width: 680px) {
    .aa-product-category-fix #qodef-page-inner,
    .aa-product-category-fix #qodef-page-inner.qodef-content-grid {
        width: calc(100% - 36px) !important;
        max-width: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .aa-shop-grid-fix .qodef-woo-product-list,
    .aa-shop-grid-fix .woocommerce {
        width: 100% !important;
        max-width: 100% !important;
    }

    .aa-shop-grid-fix .qodef-woo-product-list .qodef-grid-inner,
    .aa-shop-grid-fix .woocommerce ul.products {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 18px 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .aa-shop-grid-fix .qodef-woo-product-list .qodef-grid-item,
    .aa-shop-grid-fix .woocommerce ul.products li.product,
    .aa-shop-grid-fix .woocommerce.columns-2 ul.products li.product,
    .aa-shop-grid-fix .woocommerce.columns-3 ul.products li.product,
    .aa-shop-grid-fix .woocommerce.columns-4 ul.products li.product {
        float: none !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-image,
    .aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-image > img,
    .aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-image a > img,
    .aa-shop-grid-fix .woocommerce ul.products li.product a img {
        height: 190px !important;
        object-fit: contain !important;
    }

    .aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-content {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    .aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-title,
    .aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-title-link,
    .aa-shop-grid-fix .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 15px !important;
        line-height: 1.18 !important;
        letter-spacing: -0.02em !important;
    }

    .aa-shop-grid-fix .woocommerce ul.products::before,
    .aa-shop-grid-fix .woocommerce ul.products::after {
        display: none !important;
        content: none !important;
    }
}

@media (max-width: 420px) {
    .aa-shop-grid-fix .qodef-woo-product-list .qodef-grid-inner,
    .aa-shop-grid-fix .woocommerce ul.products {
        gap: 16px 10px !important;
    }

    .aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-image,
    .aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-image > img,
    .aa-shop-grid-fix .qodef-woo-product-list .qodef-woo-product-image a > img,
    .aa-shop-grid-fix .woocommerce ul.products li.product a img {
        height: 175px !important;
    }
}

/* =========================================================================
   HOME PAGE FEATURED PEPTIDES / FEATURED PENS
   =========================================================================
   Do not modify Swiper's wrapper or slide display/height. The v1.1.6 rules
   that changed Swiper geometry are intentionally gone. Only card internals
   are styled here.
   ========================================================================= */

.aa-home-featured-fix #wps-slider-section .wpsf-product,
.aa-home-featured-fix #wps-slider-section .sp-wps-product-image-area,
.aa-home-featured-fix #wps-slider-section .sp-wps-product-details {
    box-sizing: border-box;
    min-width: 0;
}

.aa-home-featured-fix #wps-slider-section .wpsf-product {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.aa-home-featured-fix #wps-slider-section .sp-wps-product-image-area {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 225px;
    overflow: hidden;
}

.aa-home-featured-fix #wps-slider-section .wps-product-image,
.aa-home-featured-fix #wps-slider-section .wps-product-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.aa-home-featured-fix #wps-slider-section .wpsf-product-img,
.aa-home-featured-fix #wps-slider-section .wps-product-image img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto !important;
    object-fit: contain !important;
    object-position: center center !important;
}

.aa-home-featured-fix #wps-slider-section .sp-wps-product-details {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    text-align: center !important;
}

.aa-home-featured-fix #wps-slider-section .wpsf-product-title,
.aa-home-featured-fix #wps-slider-section .wpsf-product-title a,
.aa-home-featured-fix #wps-slider-section .product-card-mg,
.aa-home-featured-fix #wps-slider-section .wpsf-product-price,
.aa-home-featured-fix #wps-slider-section .wpsf-product-price *,
.aa-home-featured-fix #wps-slider-section .price {
    width: 100%;
    text-align: center !important;
}

.aa-home-featured-fix #wps-slider-section .wpsf-product-title,
.aa-home-featured-fix #wps-slider-section .wpsf-product-title a {
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
}

.aa-home-featured-fix #wps-slider-section .wpsf-cart-button {
    width: 100%;
    margin-top: auto !important;
    text-align: center !important;
}

/*
 * Conservative equal-height desktop card target. This sets only a minimum
 * card height and does NOT change Swiper's own slide/wrapper dimensions.
 */
@media (min-width: 1025px) {
    .aa-home-featured-fix #wps-slider-section .wpsf-product {
        min-height: 500px;
    }

    .aa-home-featured-fix #wps-slider-section .wpsf-product-title {
        min-height: 46px;
    }

    .aa-home-featured-fix #wps-slider-section .product-card-mg {
        min-height: 24px;
    }

    .aa-home-featured-fix #wps-slider-section .wpsf-product-price,
    .aa-home-featured-fix #wps-slider-section .price {
        min-height: 42px;
    }
}

@media (max-width: 1024px) {
    .aa-home-featured-fix #wps-slider-section .sp-wps-product-image-area {
        height: 205px;
    }
}

@media (max-width: 576px) {
    .aa-home-featured-fix #wps-slider-section .sp-wps-product-image-area {
        height: 165px;
    }

    .aa-home-featured-fix #wps-slider-section .sp-wps-product-details {
        padding-left: 6px;
        padding-right: 6px;
    }

    .aa-home-featured-fix #wps-slider-section .wpsf-product-title,
    .aa-home-featured-fix #wps-slider-section .wpsf-product-title a {
        font-size: 15px !important;
        line-height: 1.18 !important;
        letter-spacing: -0.02em !important;
    }
}


/* =========================================================================
   v1.1.8 - Featured product card height normalization
   =========================================================================
   Variable products such as Retatrutide use a multi-line price range, which
   made that card taller than simple products. Reserve the same vertical price
   area for every Featured Product so all cards end at the same height while
   leaving Swiper's wrapper/slide geometry untouched.
   ========================================================================= */

.aa-home-featured-fix #wps-slider-section .wpsf-product-price {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 68px !important;
    box-sizing: border-box;
    text-align: center !important;
}

.aa-home-featured-fix #wps-slider-section .wpsf-product-price .price {
    width: 100%;
    margin: 0 !important;
    text-align: center !important;
    line-height: 1.45 !important;
}

.aa-home-featured-fix #wps-slider-section .wpsf-cart-button {
    min-height: 46px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-top: auto !important;
}

@media (max-width: 576px) {
    .aa-home-featured-fix #wps-slider-section .wpsf-product-price {
        min-height: 62px !important;
    }

    .aa-home-featured-fix #wps-slider-section .wpsf-cart-button {
        min-height: 44px;
    }
}


/* =========================================================================
   v1.1.9 - Compact Featured Product cards
   =========================================================================
   Reduce unnecessary vertical whitespace while keeping every Featured Product
   card equal in height and preserving enough room for Retatrutide's two-line
   variable price range.
   ========================================================================= */

.aa-home-featured-fix #wps-slider-section .sp-wps-product-details {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.aa-home-featured-fix #wps-slider-section .wpsf-product-title {
    margin-bottom: 6px !important;
}

.aa-home-featured-fix #wps-slider-section .product-card-mg {
    margin-bottom: 6px !important;
}

.aa-home-featured-fix #wps-slider-section .wpsf-product-price {
    margin-bottom: 8px !important;
}

.aa-home-featured-fix #wps-slider-section .wpsf-cart-button {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

@media (max-width: 576px) {
    .aa-home-featured-fix #wps-slider-section .sp-wps-product-details {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    .aa-home-featured-fix #wps-slider-section .wpsf-product-title {
        min-height: 40px !important;
        margin-bottom: 4px !important;
    }

    .aa-home-featured-fix #wps-slider-section .product-card-mg {
        min-height: 22px !important;
        margin-bottom: 4px !important;
    }

    .aa-home-featured-fix #wps-slider-section .wpsf-product-price {
        margin-bottom: 6px !important;
    }
}


/* =========================================================================
   v1.1.10 - Remove redundant Featured Pens section on mobile
   ========================================================================= */
@media (max-width: 767px) {
    .aa-home-featured-fix .aa-mobile-hide-featured-pens {
        display: none !important;
    }
}
