/* ==========================================================================
   RAKESH MASALA - WOOCOMMERCE SINGLE PRODUCT PAGE (PDP) CUSTOM STYLES
   ========================================================================== */

/* Change 23: Background Tones & Change 22: Container Width */
body.single-product {
    background-color: #fafaf5 !important;
}
.single-product .woocommerce, 
.single-product main {
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 0 40px !important;
}
/* New Full Width specifically targeting the content wrapper so header is unharmed */
body.single-product #content > .ast-container {
    max-width: 100% !important;
    padding: 0 40px !important;
}
/* Change 1: Breadcrumb */
.rakesh-breadcrumb-bar {
    width: 100%;
    background-color: #f5f0e6;
    padding: 12px 0;
    margin-bottom: 40px;
}
.rakesh-breadcrumb-bar .woocommerce-breadcrumb {
    max-width: 1280px;
    margin: 0 auto !important;
    padding: 0 40px !important;
    font-size: 14px !important;
    color: #666 !important;
    display: block !important;
    background: transparent !important;
    border-radius: 0;
}
.rakesh-breadcrumb-bar .woocommerce-breadcrumb a {
    color: #333 !important;
    text-decoration: none;
}

/* BUG 4: Strict Two Column Layout */
.single-product div.product {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    position: relative;
}
.single-product div.product .woocommerce-product-gallery {
    flex: 0 0 50%;
    max-width: 50%;
}
.single-product div.product .summary.entry-summary {
    flex: 0 0 calc(50% - 40px);
    max-width: calc(50% - 40px);
}
/* Tabs, related products, and upsells must break to a new full-width row */
.single-product div.product .woocommerce-tabs,
.single-product div.product .related.products,
.single-product div.product .upsells.products {
    flex: 0 0 100%;
    max-width: 100%;
}

/* BUG 5: Product Image Container */
.single-product .woocommerce-product-gallery {
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    background: #ffffff;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    /* WooCommerce sets opacity:0 inline and relies on JS to clear it.
       Force visible as a fallback in case JS init doesn't fire. */
    opacity: 1 !important;
}

/* BUG 6: Thumbnail Layout (Single Row) */
.single-product .flex-control-thumbs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 10px;
    margin-top: 20px;
}
.single-product .flex-control-thumbs li {
    flex: 0 0 calc(25% - 7.5px) !important;
    width: calc(25% - 7.5px) !important;
    max-width: calc(25% - 7.5px) !important;
    padding: 0 !important;
}

/* Change 3: Product Title Color */
.single-product .product_title.entry-title {
    color: #c8102e !important;
    font-weight: 700 !important;
    font-size: 32px !important;
    line-height: 1.2 !important;
    margin-bottom: 10px;
}

/* Change 4: Star Rating Display */
.single-product .woocommerce-product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}
.single-product .star-rating {
    color: #f5a623 !important;
    font-size: 14px;
}
.single-product .woocommerce-review-link {
    color: #666 !important;
    font-size: 14px !important;
    text-decoration: none;
}

/* Change 5: Short Product Description */
.single-product .woocommerce-product-details__short-description {
    color: #555 !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
}

/* Change 6: Price with Tax/Shipping Note */
.single-product .price {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin-bottom: 5px !important;
}
.price-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
}
.price-meta .tax-inclusive { font-weight: 500; }
.price-meta a { color: #666; text-decoration: underline; }

/* Change 7: Size/Variant Buttons */
.single-product .variable-item {
    border-radius: 24px !important;
    padding: 8px 24px !important;
    border: 1.5px solid #e0e0e0 !important;
    background: #fff !important;
    color: #333 !important;
    margin-right: 10px;
}
.single-product .variable-item.selected {
    background: #fdd835 !important;
    border-color: #fdd835 !important;
    color: #000 !important;
}
.single-product .reset_variations {
    display: none !important;
}

/* Change 8: Quantity Selector with Stepper */
.single-product .quantity {
    border: 1px solid #ddd;
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    margin-right: 15px !important;
}
.single-product .quantity input.qty {
    border: none !important;
    text-align: center;
    width: 50px !important;
    height: 40px !important;
    padding: 0 !important;
    -moz-appearance: textfield;
}
.single-product .quantity input.qty::-webkit-outer-spin-button,
.single-product .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qty-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 0 12px;
    color: #666;
    height: 100%;
    display: flex;
    align-items: center;
}
.qty-btn:hover { color: #000; }

/* Change 9: Add to Cart Button Restyle */
.single-product .single_add_to_cart_button {
    background: #f5e6c8 !important;
    color: #1a1a1a !important;
    border-radius: 30px !important;
    padding: 12px 36px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border: none !important;
    transition: background 0.2s;
}
.single-product .single_add_to_cart_button:hover {
    background: #e6d3af !important; /* 10% darker */
}

/* Change 10: Buy Now Button */
.buy-now-button {
    background: #0d5c5c !important;
    color: #fff !important;
    border-radius: 30px !important;
    padding: 14px 40px !important;
    width: 100% !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    margin-top: 12px !important;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.buy-now-button:hover {
    background: #094545 !important;
}
.rakesh-cart-buttons-wrapper {
    display: flex;
    flex-direction: column;
    width: fit-content;
}

/* Change 11: Compare & Wishlist Links */
.product-actions-links {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}
.product-actions-links a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.product-actions-links a:hover { color: #c8102e; }

/* Change 12: Trust Badges Row */
.trust-badges {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 16px 0;
    margin-top: 25px;
}
.trust-badges .badge {
    display: flex;
    align-items: center;
    gap: 8px;
}
.trust-badges .badge img, .trust-badges .badge svg {
    width: 24px;
    height: 24px;
}
.trust-badges .badge span {
    font-size: 12px;
    letter-spacing: 0.5px;
    color: #666;
    text-transform: uppercase;
}

/* Change 13 & 14: Vertical Floating Icons */
.product-vertical-icons {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}
.product-vertical-icons a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #f5f5f5;
    color: #666;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.product-vertical-icons a:hover { transform: scale(1.1); background: #fff; color: #1a1a1a; }
.product-vertical-icons a.icon-wa {
    background: #25D366;
    color: #fff;
}
.product-vertical-icons a.icon-wa:hover {
    background: #128C7E;
}

/* Ensure the summary has position relative for floating icons */
.single-product div.product .summary {
    position: relative;
    padding-right: 50px; /* Leave space for icons */
}

/* Change 15: Description Tab Styling */
.single-product .woocommerce-tabs .tabs {
    border-bottom: 1px solid #eee !important;
    padding: 0 !important;
    margin: 40px 0 20px 0 !important;
    display: flex;
    gap: 30px;
}
.single-product .woocommerce-tabs .tabs li {
    background: transparent !important;
    border: none !important;
    padding: 0 0 10px 0 !important;
    margin: 0 !important;
}
.single-product .woocommerce-tabs .tabs li a {
    color: #333 !important;
    font-weight: 600 !important;
    padding: 0 !important;
}
.single-product .woocommerce-tabs .tabs li.active a {
    color: #c5a300 !important;
}
.single-product .woocommerce-tabs .tabs li.active {
    border-bottom: 3px solid #c5a300 !important;
}

/* Change 16 & 17: Related Products */
.single-product .related.products {
    margin-top: 60px;
}
.related-heading-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.related-heading-wrap h2 {
    color: #7a9b3e !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    font-size: 22px !important;
    margin: 0 !important;
}
.view-all-link {
    color: #666;
    font-size: 14px;
    text-decoration: underline;
    font-weight: 600;
}

/* Related products grid */
.single-product .related.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px !important;
}

/* Change 18: Related Product Card Hover Icons */
.related .product .hover-icons {
    position: absolute;
    top: 15px;
    right: 15px;
    opacity: 0;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}
.related .product:hover .hover-icons {
    opacity: 1;
}
.related .product .hover-icons span {
    background: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    font-size: 14px;
}

/* Change 19 & 20: Customer Reviews Section */
.rakesh-customer-reviews-section {
    background: #ffffff;
    padding: 60px 40px;
    border-radius: 16px;
    margin-top: 60px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}
.rakesh-customer-reviews-section h2 {
    text-align: center;
    color: #4a3427; /* Dark brown from image */
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 50px;
}
.reviews-header-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    align-items: center;
}
.avg-rating-box {
    text-align: center;
}
.avg-rating-box h3 { font-size: 48px; margin: 0; color: #1a1a1a; }
.avg-rating-box p { color: #666; font-size: 14px; margin-top: 5px; }

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #666;
}
.rating-bar-bg {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}
.rating-bar-fill {
    height: 100%;
    background: #f5a623; /* Consistent orange-yellow stars */
}

.review-action-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.review-btn {
    padding: 14px 24px;
    border-radius: 8px; /* Slightly less rounded like image */
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    text-transform: none; /* Sentence case like image */
    font-size: 15px;
    transition: all 0.2s;
}
.btn-write-review { 
    background: #0d5c5c; 
    color: #fff; 
    border: 1px solid #0d5c5c; 
}
.btn-ask-question { 
    background: #3d4a26; /* Darker olive green for secondary button */
    color: #fff; 
    border: 1px solid #3d4a26; 
}
.review-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.reviews-tabs-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    margin-bottom: 30px;
    padding-bottom: 10px;
}
.reviews-tabs {
    display: flex;
    gap: 20px;
}
.reviews-tabs button {
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    padding: 10px 0;
    position: relative;
}
.reviews-tabs button.active {
    color: #1a1a1a;
}
.reviews-tabs button.active::after {
    content: "";
    position: absolute;
    bottom: -11px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #0d5c5c; /* Match green theme */
}
.reviews-sort select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

.review-entry {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}
.review-avatar {
    width: 40px;
    height: 40px;
    background: #e0e0e0;
    color: #666;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}
.review-content { flex: 1; }
.review-stars { color: #f5a623; font-size: 14px; margin-bottom: 5px; }
.review-date { color: #999; font-size: 12px; margin-left: 10px; }
.review-author { 
    font-weight: 700; 
    color: #333; 
    margin-bottom: 8px; 
    font-size: 16px;
}
.review-body { 
    color: #555; 
    line-height: 1.6; 
    font-size: 15px; 
}
.review-body br + b, 
.review-body b:first-child {
    display: block;
    margin-bottom: 5px;
    color: #1a1a1a;
}

/* Change 21: Promotional Banners */
.rakesh-promo-banners-wrap {
    width: 100%;
    background: #fff;
    padding: 60px 0;
}
.rakesh-promo-banners-wrap .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.rakesh-promo-banners-wrap a.banner {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    position: relative;
    height: 250px;
    transition: transform 0.3s;
}
.rakesh-promo-banners-wrap a.banner-freshio { background: #eef2f5; }
.rakesh-promo-banners-wrap a.banner-hing { background: #fdf6e8; }
.rakesh-promo-banners-wrap a:hover {
    transform: scale(1.02);
}
.banner-content-mock {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 40px;
    color: #1a1a1a;
}
.banner-content-mock h3 { font-size: 24px; font-weight: 700; margin-bottom: 10px; line-height: 1.2; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .single-product .related.products ul.products { grid-template-columns: repeat(2, 1fr) !important; }
    .reviews-header-grid { grid-template-columns: 1fr; text-align: center; }
    .rakesh-promo-banners-wrap .container { grid-template-columns: 1fr; }
    .single-product .woocommerce, .single-product main { padding: 0 15px !important; }
}
