/* Product Detail Page - Just Herbs Style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    margin-top: 0; /* No margin needed on desktop since header is scrollable */
}

/* Add margin only for tablet and mobile where header is fixed */
@media (max-width: 1199.98px) {
    body {
        margin-top: 182px; /* Space for fixed header on tablet/mobile */
    }
}

@media (max-width: 991.98px) and (min-width: 769px) {
    body {
        margin-top: 105px; /* Tablet header height */
    }
}

@media (max-width: 768px) {
    body {
        margin-top: 100px; /* Mobile header height */
    }
}

@media (max-width: 767.98px) {
    body {
        margin-top: 95px; /* Compact mobile header */
    }
}

@media (max-width: 575.98px) {
    body {
        margin-top: 90px; /* Very compact for small screens */
    }
}

.product-detail-container {
    padding: 30px 0;
    min-height: 100vh;
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Product Gallery Section */
.product-gallery {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
    padding-right: 40px;
}

.thumbnail-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 80px;
    flex-shrink: 0;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.thumbnail-item.active {
    border-color: #3a7a52;
}

.thumbnail-item:hover {
    border-color: #3a7a52;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    border-radius: 12px;
}

/* Main Product Image with Zoom */
.main-image-container {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 20px;
    overflow: visible;
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.main-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 20px;
}

/* Zoom Lens */
.zoom-lens {
    position: absolute;
    border: 3px solid #3a7a52;
    background: rgba(58, 122, 82, 0.1);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(58, 122, 82, 0.3);
}

.main-image-container:hover .zoom-lens {
    opacity: 1;
}

/* Zoom Result Window */
.zoom-result {
    position: absolute;
    top: 0;
    right: -650px;
    width: 600px;
    height: 600px;
    border: 3px solid #3a7a52;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 20;
}

.main-image-container:hover .zoom-result {
    opacity: 1;
    visibility: visible;
}

.zoom-result img {
    position: absolute;
    width: 1800px;
    height: 1800px;
    object-fit: cover;
}

/* Zoom Instructions */
.zoom-instructions {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(58, 122, 82, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
}

.main-image-container:hover .zoom-instructions {
    opacity: 1;
}

.badge-8x {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #3a7a52, #4a9d63);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 4px 15px rgba(58, 122, 82, 0.3);
}

.badge-8x span {
    font-size: 10px;
    font-weight: 500;
}

/* Product Details Section */
.product-details {
    padding: 0;
    padding-left: 40px;
    max-width: 500px;
}

.product-title {
    font-size: 32px;
    font-weight: 700;
    color: #2c2c2c;
    margin-bottom: 16px;
    line-height: 1.2;
    font-family: 'Playfair Display', serif;
}

.rating-section {
    margin-bottom: 20px;
}

.stars {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stars i {
    color: #ffc107;
    font-size: 16px;
}

.rating-number {
    font-weight: 600;
    color: #333;
    margin-left: 8px;
}

.review-count {
    color: #666;
    font-size: 14px;
    margin-left: 5px;
}

.price-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mrp-label {
    font-size: 14px;
    color: #666;
}

.original-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
}

.current-price {
    font-size: 28px;
    font-weight: 800;
    color: #2c2c2c;
}

.discount-badge {
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.size-section {
    margin-bottom: 20px;
}

.size-label {
    font-size: 14px;
    color: #666;
    margin-right: 10px;
}

.size-option {
    display: inline-block;
    background: #7b5a3d;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.tagline {
    font-size: 15px;
    color: #555;
    margin-bottom: 25px;
    line-height: 1.6;
    font-weight: 400;
}

.highlights-section {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.highlight-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f8f3ef, #e8ddd4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7b5a3d;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(123, 90, 61, 0.25);
}

.highlight-item span {
    font-size: 13px;
    color: #555;
    font-weight: 500;
    max-width: 80px;
    text-align: center;
}

.preserve-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #7b5a3d;
    margin-bottom: 20px;
    font-weight: 600;
}

.preserve-text i {
    color: #3a7a52;
}

.product-description {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: justify;
}

.viewers-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
}

.viewers-count i {
    color: #3a7a52;
}

.purchase-section {
    display: flex;
    gap: 20px;
    align-items: center;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    color: #333;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qty-btn:hover {
    background: #e9ecef;
}

.qty-btn:active {
    transform: scale(0.95);
}

#quantity {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    background: white;
}

.add-to-cart-btn {
    background: #7b5a3d;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-to-cart-btn:hover {
    background: #6b4a2d;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(123, 90, 61, 0.3);
}

/* Tabs Section */
.tabs-section {
    background: #f8f3ef;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.tab-navigation {
    display: flex;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    justify-content: flex-start;
    padding: 0 20px;
}

.tab-btn {
    padding: 16px 0;
    margin-right: 40px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    flex: none;
}

.tab-btn:last-child {
    margin-right: 0;
}

.tab-btn.active {
    color: #333;
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #333;
}

.tab-btn:hover {
    color: #333;
}

.tab-content {
    padding: 40px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Ingredients Section - Matching Reference Design */
.ingredients-carousel-container {
    margin-bottom: 30px;
    overflow: hidden;
    position: relative;
}

.ingredients-carousel {
    display: flex;
    gap: 30px;
    padding: 20px 0;
    transition: transform 0.5s ease;
    justify-content: center;
    align-items: flex-start;
}

.ingredients-carousel.auto-scroll {
    animation: scrollIngredients 20s linear infinite;
}

@keyframes scrollIngredients {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.ingredients-carousel.auto-scroll .ingredient-card {
    flex: 0 0 auto;
    min-width: 220px;
}

.ingredients-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.ingredient-card {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    min-width: 200px;
    max-width: 220px;
    flex: 0 0 auto;
}

.ingredient-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.ingredient-image {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #f0f0f0;
    background: #ffffff;
    position: relative;
}

.ingredient-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.ingredient-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c2c2c;
    text-align: center;
    margin-top: 15px;
    font-family: 'Poppins', sans-serif;
    line-height: 1.3;
}

.ingredient-card h4 {
    font-size: 18px;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 12px;
    font-family: 'Poppins', sans-serif;
}

.ingredient-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
    font-weight: 400;
}

.ingredients-description {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    text-align: center;
    margin-top: 30px;
    border: 1px solid #e8e8e8;
}

.ingredients-description strong {
    color: #2c2c2c;
    font-weight: 600;
}

/* Mobile Responsive for Ingredients */
@media (max-width: 768px) {
    .ingredients-carousel {
        gap: 15px;
        padding: 15px 0;
        justify-content: flex-start; /* ensure first card starts fully visible */
    }
    /* Disable auto-loop on mobile; allow manual swipe */
    .ingredients-carousel.auto-scroll {
        animation: none !important;
    }
    .ingredients-carousel-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: x mandatory;
        padding-left: 12px; /* small inset to avoid clipping rounded corners */
    }
    .ingredients-carousel {
        min-width: 100%;
    }
    .ingredient-card {
        scroll-snap-align: start;
    }
    
    .ingredient-card {
        min-width: 150px;
        padding: 15px;
    }
    
    .ingredient-image {
        width: 60px;
        height: 60px;
        margin-bottom: 10px;
    }
    
    .ingredient-name {
        font-size: 14px;
        margin-top: 10px;
    }
    
    .ingredient-card h4 {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .ingredient-card p {
        font-size: 12px;
    }
}

.usage-instructions h4 {
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.usage-instructions ol {
    padding-left: 20px;
}

.usage-instructions li {
    margin-bottom: 10px;
    color: #555;
    line-height: 1.5;
}

.product-details-tab ul {
    list-style: none;
    padding: 0;
}

.product-details-tab li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    color: #555;
}

.product-details-tab li:last-child {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 1199px) {
    .highlights-section {
        gap: 20px;
    }
    
    .highlight-item span {
        font-size: 11px;
    }
}

@media (max-width: 991px) {
    .product-gallery {
        flex-direction: column;
        align-items: center;
        padding-right: 0;
        margin-bottom: 30px;
    }
    
    .thumbnail-container {
        flex-direction: row;
        width: 100%;
        justify-content: center;
        order: 2;
        margin-top: 20px;
        gap: 15px;
    }
    
    .main-image-container {
        order: 1;
        width: 100%;
        max-width: 450px;
        height: 450px;
    }
    
    .product-details {
        padding-left: 0;
        max-width: 100%;
        padding: 0 20px;
    }
    
    .product-title {
        font-size: 28px;
    }
}

@media (max-width: 767px) {
    .product-detail-container {
        padding: 20px 0;
    }
    
    .container-fluid {
        padding: 0 15px;
    }
    
    .product-title {
        font-size: 20px;
    }
    
    .highlights-section {
        justify-content: center;
        gap: 15px;
    }
    
    .highlight-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .highlight-item span {
        font-size: 10px;
        max-width: 60px;
    }
    
    .purchase-section {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .quantity-selector {
        justify-content: center;
    }
    
    .add-to-cart-btn {
        width: 100%;
        padding: 15px;
    }
    
    .tab-navigation {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0 15px;
    }
    
    .tab-btn {
        text-align: left;
        margin-right: 25px;
        padding: 12px 0;
        font-size: 13px;
    }
    
    .tab-btn:last-child {
        border-bottom: none;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .ingredients-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .badge-8x {
        width: 60px;
        height: 60px;
        font-size: 14px;
        top: 10px;
        right: 10px;
    }
    
    .badge-8x span {
        font-size: 8px;
    }
}

@media (max-width: 575px) {
    .price-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .current-price {
        font-size: 20px;
    }
    
    .main-image-container {
        min-height: 300px;
        padding: 20px;
    }
    
    .main-product-image {
        max-height: 250px;
    }
}

/* Loading Animation */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Smooth Transitions */
.main-product-image,
.thumbnail-item,
.ingredient-card,
.add-to-cart-btn,
.qty-btn,
.tab-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus States for Accessibility */
.qty-btn:focus,
.add-to-cart-btn:focus,
.tab-btn:focus {
    outline: 2px solid #3a7a52;
    outline-offset: 2px;
}

/* Print Styles */
/* Reviews Section Styles */
.reviews-section {
    padding: 20px 0;
}

.reviews-header h4 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

.reviews-summary {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.overall-rating {
    flex: 1;
}

.rating-display {
    text-align: left;
}

.stars-large {
    font-size: 20px;
    color: #ff9500;
    margin-bottom: 8px;
}

.rating-number-large {
    font-size: 18px;
    font-weight: 600;
    margin-left: 10px;
}

.review-count-text {
    display: block;
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.rating-breakdown {
    flex: 2;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.stars-small {
    font-size: 12px;
    color: #ff9500;
    width: 80px;
}

.bar-container {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #8B4513;
    border-radius: 4px;
}

.percentage {
    font-size: 12px;
    color: #666;
    width: 30px;
    text-align: right;
}

.write-review-section {
    flex: 1;
    text-align: right;
}

.write-review-btn {
    background: #8B4513;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.write-review-btn:hover {
    background: #7a3a0f;
}

.reviews-filter {
    margin-bottom: 20px;
}

.review-sort {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    background: white;
}

.reviews-list {
    margin-bottom: 30px;
}

.review-item {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #8B4513;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.reviewer-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reviewer-name {
    font-weight: 500;
    font-size: 14px;
}

.verified-badge {
    background: #8B4513;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 500;
}

.review-meta {
    text-align: right;
}

.review-stars {
    color: #ff9500;
    font-size: 14px;
    margin-bottom: 4px;
}

.review-date {
    color: #666;
    font-size: 12px;
}

.review-content h6 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.review-text {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.reviews-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.page-btn {
    border: 1px solid #ddd;
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.page-btn.active {
    background: #8B4513;
    color: white;
    border-color: #8B4513;
}

.page-btn:hover:not(.active) {
    background: #f5f5f5;
}

/* Review Modal Styles */
.modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.modal-header {
    border-bottom: 1px solid #eee;
    padding: 20px 24px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.modal-body {
    padding: 24px;
}

.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.star-rating-input input[type="radio"] {
    display: none;
}

.star-label {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
}

.star-rating-input input[type="radio"]:checked ~ .star-label,
.star-rating-input input[type="radio"]:checked ~ .star-label ~ .star-label {
    color: #ff9500;
}

.star-label:hover,
.star-label:hover ~ .star-label {
    color: #ff9500;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: #fafafa;
}

.upload-icon {
    font-size: 24px;
    color: #999;
    margin-bottom: 12px;
}

.recommendation-scale {
    margin-top: 12px;
}

.scale-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.scale-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.scale-item input[type="radio"] {
    display: none;
}

.scale-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.scale-label:hover {
    background: #f5f5f5;
}

.scale-bar {
    height: 20px;
    background: #8B4513;
    border-radius: 2px;
    margin-bottom: 4px;
    min-width: 20px;
}

.scale-number {
    font-size: 12px;
    font-weight: 500;
}

.scale-text {
    font-size: 10px;
    color: #666;
    text-align: center;
    max-width: 60px;
}

.scale-item input[type="radio"]:checked + .scale-label {
    background: #e8f4f8;
}

.scale-item input[type="radio"]:checked + .scale-label .scale-bar {
    background: #007bff;
}

.privacy-notice {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 6px;
}

.modal-footer {
    border-top: 1px solid #eee;
    padding: 16px 24px;
}

.btn-primary {
    background: #8B4513;
    border-color: #8B4513;
}

.btn-primary:hover {
    background: #7a3a0f;
    border-color: #7a3a0f;
}

/* Responsive Styles for Reviews */
@media (max-width: 768px) {
    .reviews-summary {
        flex-direction: column;
        gap: 20px;
    }
    
    .write-review-section {
        text-align: center;
    }
    
    .review-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .review-meta {
        text-align: left;
    }
    
    .scale-options {
        justify-content: center;
    }
    
    .modal-body {
        padding: 16px;
    }
}

@media print {
    .thumbnail-container,
    .purchase-section,
    .tabs-section {
        display: none;
    }
    
    .main-image-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
