.woocommerce-page .site-main,
.woocommerce-page body {
    background-color: var(--clr-cream);
}


.mhc-product-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    max-width: 1280px;
    padding: 0 var(--space-md);
    align-items: start;
    padding: 20px 25px;
    margin: auto;
}

/* Gallery layout */
.mhc-gallery {
    display: flex;
    gap: var(--space-sm);
    position: sticky;
    top: 100px; /* below sticky header */
        align-self: start; /* ADD THIS */

}

/* Vertical thumbnails */
.mhc-thumbs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 80px;
    flex-shrink: 0;
}

.mhc-thumb {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
}

.mhc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mhc-thumb.active,
.mhc-thumb:hover {
    border-color: var(--clr-forest);
}

/* Main image */
.mhc-main-img {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--clr-gray);
    aspect-ratio: 1 / 1;
    position: relative;
}

.mhc-slide {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mhc-slide.active {
    display: block;
}

/* Mobile */
@media (max-width: 768px) {
    .mhc-product-wrap {
        grid-template-columns: 1fr;
    }

   .mhc-gallery {
        position: relative;
        top: 0;             
        flex-direction: column-reverse;
    }

    .mhc-thumbs {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
    }

    .mhc-thumb {
        flex-shrink: 0;
    }
}

.mhc-product-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding-top: var(--space-sm);
}

.mhc-category {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--clr-brown);
}

.mhc-product-title {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 5.5vw, 3rem);
    font-weight: 400;
    line-height: 1;
    color: var(--clr-dark);
    margin: 0;
}

.mhc-price {
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--clr-forest);
}

.mhc-price .woocommerce-Price-amount {
    color: var(--clr-forest);
}

.mhc-short-desc {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--clr-dark);
    opacity: 0.75;
    border-top: 1px solid rgba(0,0,0,0.08);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding: var(--space-md) 0;
}

/* Trust Badges */
.mhc-trust-badges {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.mhc-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--clr-dark);
}

.mhc-badge .material-symbols-outlined {
    font-size: 18px;
    color: var(--clr-forest);
}

/* WooCommerce quantity + button overrides */
.mhc-product-info .quantity input {
    width: 60px;
    height: 48px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 6px;
    text-align: center;
    font-family: var(--font-body);
    font-size: 1rem;
}

.mhc-product-info .single_add_to_cart_button {
    background: var(--clr-brown);
    color: var(--clr-white);
    border: none;
    border-radius: 6px;
    padding: 16px 32px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
    margin-top: var(--space-xs);
}

.mhc-product-info .single_add_to_cart_button:hover {
    background: var(--clr-forest);
}

.mhc-product-info .single_add_to_cart_button:active {
    transform: scale(0.98);
}

.mhc-product-info form.cart {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}


/* Kill Storefront's default product layout */
.storefront-full-width-content .entry-summary,
.woocommerce div.product div.summary {
    float: none;
    width: 100%;
    clear: both;
}

.woocommerce div.product {
    display: block;
}

/* Fix tabs rendering as bullet list */
.woocommerce-tabs ul.tabs {
    display: none; /* hide the default bullet tab nav */
}

.woocommerce-tabs .panel {
    display: block !important;
    visibility: visible !important;
}

/* Below fold clean layout */
.mhc-below-fold .woocommerce-tabs {
    padding: 0;
    background: none;
}

.mhc-below-fold .woocommerce-Tabs-panel {
    padding: 0;
}

/* Updated Description Section Container */
.mhc-below-fold {
    padding-top: 0px;
}

.mhc-tab-content h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--clr-forest);
    margin-bottom: var(--space-md);
}


/* Container */
.mhc-accordion {
    max-width: 860px;
    border-bottom: 1px solid rgba(0,0,0,0.08); /* Keeps the line clean */
}

/* The Button / Trigger */
.mhc-accordion-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    padding: var(--space-md) 0;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--clr-dark);
    cursor: pointer;
    transition: color 0.3s ease;
    
    /* FIX FOR PURPLE BORDER & MOBILE BLUE TAP */
    outline: none !important;
    -webkit-tap-highlight-color: transparent; 
}

/* Premium Hover State */
.mhc-accordion-trigger:hover,
.mhc-accordion-trigger:focus-visible {
    color: var(--clr-forest);
}

/* Smooth Icon Rotation */
.mhc-accordion-trigger .material-symbols-outlined {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.75rem;
    color: var(--clr-forest);
}

.mhc-accordion-trigger:not(.active) .material-symbols-outlined {
    transform: rotate(180deg);
}

/* =========================================================
   THE ANIMATION MAGIC (CSS Grid Trick)
   ========================================================= */
.mhc-accordion-body {
    display: grid;
    grid-template-rows: 0fr; /* Collapsed state */
    opacity: 0;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Expanded state */
.mhc-accordion-body.open {
    grid-template-rows: 1fr; 
    opacity: 1;
}

/* Inner container hides the text overflow while animating */
.mhc-accordion-content-inner {
    overflow: hidden;
}

/* Spacing and Typography inside the description */
.mhc-accordion-content-inner p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--clr-dark);
    opacity: 0.85;
    margin: 0 0 var(--space-md) 0;
}

/* Makes bold text (like "Ingredients:") match your brand */
.mhc-accordion-content-inner strong,
.mhc-accordion-content-inner b {
    color: var(--clr-forest);
    font-weight: 600;
    font-size: 1.05rem;
    display: block;
    margin-bottom: var(--space-xs);
    margin-top: var(--space-sm);
}

.mhc-tabs-container {
    max-width: 1280px;
    padding: var(--space-xl) 25px; /* Matches grid wrap padding horizontally */
    margin: 0 auto;
    clear: both; /* Ensures no floats interfere */
}


.mhc-cart-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    position: relative;  
    z-index: 50;        
}
.mhc-qty-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--clr-dark);
    opacity: 0.5;
    margin: 0;
}

/* 1. The Container: Elegant Premium Pill Shape */
.mhc-quantity {
    display: flex;
    align-items: center;
    background: transparent;
    border: 1px solid rgba(139, 94, 60, 0.4); /* Subtle Earthy Brown border */
    border-radius: 50px; /* Perfect pill shape */
    width: fit-content;
    position: relative;
    z-index: 51;
    transition: border-color 0.3s ease;
}

.mhc-quantity:hover {
    border-color: var(--clr-forest); /* Border darkens to Forest Green on hover */
}

/* 2. The Buttons: Animated & Clean */
.mhc-qty-btn {
    background: transparent;
    border: none;
    color: var(--clr-forest); /* Forest Green icons */
    font-size: 1.25rem;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mhc-qty-btn:hover {
    background: var(--clr-sage); /* Fills with soft Sage Green on hover */
}

.mhc-qty-btn:active {
    transform: scale(0.85); /* Satisfying "squish" animation on click */
}

/* 3. The Input: Forcing Storefront to back off */
.mhc-product-info .quantity input.mhc-qty-input,
.mhc-qty-input {
    background: transparent !important; /* Kills the ugly white box */
    border: none !important;            /* Kills the inner border */
    box-shadow: none !important;        /* Kills Storefront shadows */
    color: var(--clr-dark) !important;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 500;
    width: 40px;
    height: 44px !important;
    text-align: center;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield;
}

/* Hide the outline when clicked */
.mhc-qty-input:focus {
    outline: none !important;
}

/* Remove default spinner arrows in WebKit/Chrome */
.mhc-qty-input::-webkit-outer-spin-button,
.mhc-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Drop out the white background from product images */
.mhc-main-img img.mhc-slide,
.mhc-thumb img {
    mix-blend-mode: multiply;
}

/* Optional: Make the gallery background transparent so it blends perfectly into the Cream page */
.mhc-main-img {
    background: transparent; /* Changes from grey to seamless cream */
}

.mhc-thumb {
    background: transparent;
}

/* =========================================================
   REVIEWS COMPONENT (STARS & ACCORDION)
   ========================================================= */

/* 1. At a Glance Stars (Under Title) */
.mhc-product-rating {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: 8px;
    margin-bottom: var(--space-sm);
}

.mhc-review-link {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--clr-dark);
    opacity: 0.6;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: opacity 0.3s ease;
}

.mhc-review-link:hover {
    opacity: 1;
    color: var(--clr-forest);
}

/* Color the WooCommerce Stars Earthy Brown */
.mhc-product-rating .star-rating span::before,
.mhc-reviews-inner .star-rating span::before {
    color: var(--clr-brown) !important;
}

.mhc-product-rating .star-rating::before,
.mhc-reviews-inner .star-rating::before {
    color: rgba(139, 94, 60, 0.2) !important; /* Faded brown for empty stars */
}

/* 2. WooCommerce Review Form Cleanup */
.mhc-reviews-inner {
    padding-top: var(--space-sm);
}

/* Hide duplicate Woo title */
.mhc-reviews-inner h2.woocommerce-Reviews-title {
    display: none;
}

/* Style the Review List */
.mhc-reviews-inner ol.commentlist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mhc-reviews-inner ol.commentlist li {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.mhc-reviews-inner .comment-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--clr-dark);
}

/* Form Styling */
.mhc-reviews-inner #review_form_wrapper {
    margin-top: var(--space-lg);
    background: var(--clr-white);
    padding: var(--space-md);
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.05);
}

.mhc-reviews-inner .comment-reply-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--clr-forest);
    margin-bottom: var(--space-md);
    display: block;
}

/* Clean up input fields */
.mhc-reviews-inner input[type="text"],
.mhc-reviews-inner input[type="email"],
.mhc-reviews-inner textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 4px;
    background: var(--clr-cream);
    font-family: var(--font-body);
    outline: none;
    margin-bottom: var(--space-sm);
}

.mhc-reviews-inner input:focus,
.mhc-reviews-inner textarea:focus {
    border-color: var(--clr-forest);
}

/* Submit Button */
.mhc-reviews-inner input[type="submit"] {
    background: var(--clr-forest);
    color: var(--clr-white);
    border: none;
    padding: 12px 24px;
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.mhc-reviews-inner input[type="submit"]:hover {
    background: var(--clr-brown);
}