/**
 * Product Detail Page - Reference Design
 * Matches reference screenshots exactly
 */

/* ============================================
   PRODUCT DETAIL PAGE LAYOUT
   ============================================ */
.product-detail-page {
    background: #ffffff;
    padding: 40px 0;
}

/* Two Column Layout */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

@media (max-width: 991px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ============================================
   LEFT COLUMN - PRODUCT IMAGE
   ============================================ */
.product-image-section {
    position: relative;
}

.product-main-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
}

.product-thumbnail-list {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.product-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s ease;
    object-fit: cover;
}

.product-thumbnail:hover,
.product-thumbnail.active {
    border-color: #d4af37;
    transform: scale(1.05);
}

/* ============================================
   RIGHT COLUMN - PRODUCT INFO
   ============================================ */
.product-info-section {
    padding: 20px 0;
}

/* Product Title & Brand */
.product-brand {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.product-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.3;
}

/* Weight/Size Info */
.product-size-info {
    font-size: 15px;
    color: #6c757d;
    margin-bottom: 16px;
}

/* Price Section */
.product-price-section {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
}

.product-price {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
}

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

.product-info-icon {
    width: 20px;
    height: 20px;
    color: #6c757d;
    cursor: pointer;
}

/* Rating Section */
.product-rating-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.product-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #10b981;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}

.product-rating-star {
    font-size: 12px;
}

.product-rating-count {
    font-size: 14px;
    color: #6c757d;
}

/* Delivery Info */
.product-delivery-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 24px;
}

.product-delivery-icon {
    font-size: 16px;
    color: #6c757d;
}

.product-delivery-text {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
}

.product-delivery-price {
    margin-left: auto;
    font-size: 14px;
    color: #6c757d;
    text-decoration: line-through;
}

/* Size Selector */
.product-size-selector {
    margin-bottom: 24px;
}

.size-selector-label {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    display: block;
}

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

.size-option {
    padding: 10px 20px;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    background: #ffffff;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.size-option:hover {
    border-color: #d4af37;
    background: #fff9e6;
}

.size-option.active {
    border-color: #d4af37;
    background: #d4af37;
    color: #ffffff;
}

/* Action Buttons */
.product-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.btn-add-to-cart {
    flex: 1;
    padding: 16px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-add-to-cart:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-buy-now {
    flex: 1;
    padding: 16px 24px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn-buy-now:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* ============================================
   SHIPPING BADGES
   ============================================ */
.shipping-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.shipping-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: default;
}

.domestic-badge {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.worldwide-badge {
    background: #fce7f3;
    color: #be185d;
    border: 1px solid #f9a8d4;
}

/* ============================================
   CERTIFICATION BADGES (LAB TESTED & ORGANIC)
   ============================================ */
.certification-badges {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.badge-lab-tested {
    background: #3b82f6;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

.badge-lab-tested i {
    font-size: 14px;
}

.badge-organic {
    background: #10b981;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

.badge-organic i {
    font-size: 14px;
}

/* ============================================
   HIGHLIGHTS SECTION (BULLET POINTS)
   ============================================ */
.product-highlights-bullets {
    margin-bottom: 24px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.highlights-bullets-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.highlights-bullets-title-optional {
    font-size: 14px;
    font-weight: 400;
    color: #6c757d;
    margin-left: 8px;
}

.highlights-bullets-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.highlight-bullet-item {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
}

.highlight-bullet-item::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #1a1a1a;
    font-size: 18px;
    font-weight: 700;
}

.highlight-bullet-item:last-child {
    margin-bottom: 0;
}

/* ============================================
   PRODUCT DETAILS EXPANDABLE SECTION
   ============================================ */
.product-details-expandable {
    border-top: 1px solid #e9ecef;
    padding-top: 24px;
    margin-top: 24px;
}

.details-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 16px 0;
    transition: all 0.2s ease;
}

.details-toggle:hover {
    background: #f8f9fa;
    padding-left: 12px;
    padding-right: 12px;
    border-radius: 8px;
}

.details-toggle-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.details-toggle-icon {
    font-size: 14px;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.details-toggle.open .details-toggle-icon {
    transform: rotate(180deg);
}

.details-content {
    padding: 20px 0;
    display: none;
}

.details-toggle.open + .details-content {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f5;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    min-width: 140px;
    flex-shrink: 0;
}

.detail-value {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
    flex: 1;
}

/* ============================================
   RETURN POLICY SECTION
   ============================================ */
.return-policy-section {
    border-top: 1px solid #e9ecef;
    padding-top: 24px;
    margin-top: 24px;
}

.return-policy-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 16px 0;
    transition: all 0.2s ease;
}

.return-policy-toggle:hover {
    background: #f8f9fa;
    padding-left: 12px;
    padding-right: 12px;
    border-radius: 8px;
}

.return-policy-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.return-policy-icon {
    font-size: 14px;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.return-policy-toggle.open .return-policy-icon {
    transform: rotate(180deg);
}

.return-policy-content {
    padding: 20px 0;
    display: none;
}

.return-policy-toggle.open + .return-policy-content {
    display: block;
    animation: slideDown 0.3s ease;
}

/* ============================================
   DELIVERY CHECKER
   ============================================ */
.delivery-checker {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.delivery-checker-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.delivery-input-group {
    display: flex;
    gap: 12px;
}

.delivery-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
}

.delivery-check-btn {
    padding: 12px 24px;
    background: #ffffff;
    border: 2px solid #d4af37;
    color: #d4af37;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delivery-check-btn:hover {
    background: #d4af37;
    color: #ffffff;
}

/* ============================================
   RESPONSIVE MOBILE
   ============================================ */
@media (max-width: 768px) {
    .product-detail-grid {
        gap: 30px;
    }
    
    .product-title {
        font-size: 22px;
    }
    
    .product-price {
        font-size: 26px;
    }
    
    .product-actions {
        flex-direction: row;
    }
    
    .btn-add-to-cart,
    .btn-buy-now {
        flex: 1;
        justify-content: center;
    }
    
    .product-main-image {
        max-width: 100%;
        padding: 15px;
    }
    
    .product-thumbnail-list {
        justify-content: center;
    }
    
    .product-thumbnail {
        width: 70px;
        height: 70px;
    }
    
    .highlights-bullets-title {
        font-size: 14px;
    }
    
    .highlight-bullet-item {
        font-size: 14px;
        padding-left: 20px;
    }
    
    .details-toggle-title {
        font-size: 15px;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 6px;
    }
    
    .detail-label {
        min-width: auto;
        font-size: 13px;
    }
    
    .detail-value {
        font-size: 13px;
    }
    
    .product-rating-section {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .product-delivery-info {
        font-size: 13px;
    }
    
    .size-option {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .product-brand {
        font-size: 12px;
    }
    
    .product-title {
        font-size: 20px;
    }
    
    .product-price {
        font-size: 24px;
    }
    
    .product-rating-badge {
        font-size: 13px;
        padding: 5px 10px;
    }
    
    .product-rating-count {
        font-size: 12px;
    }
    
    .btn-add-to-cart,
    .btn-buy-now {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .highlight-bullet-item {
        font-size: 13px;
    }
}

/* ============================================
   DESKTOP / MOBILE-TABLET SECTION VISIBILITY
   Swap Nutritional+Storage ↔ Shipping+Secure between columns on desktop only
   ============================================ */
.desktop-only-section { display: none; }
.mobile-tablet-only-section { display: block; }

@media (min-width: 992px) {
    .desktop-only-section { display: block; }
    .mobile-tablet-only-section { display: none; }
}

/* ============================================
   HIDE OLD CAROUSEL
   ============================================ */
#productGallery.carousel {
    display: none !important;
}

/* Override existing styles */
.product-info-card {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.product-info-card .badge {
    display: none !important;
}

.product-info-card h2 {
    display: none !important;
}

.product-info-card .fs-4 {
    display: none !important;
}

.product-info-card > p {
    display: none !important;
}

.product-info-card .quantity-control {
    display: none !important;
}

.product-info-card form button[type="submit"] {
    display: none !important;
}

/* ============================================
   PRODUCT IMAGE ZOOM (Amazon/Flipkart Style)
   ============================================ */
.product-image-zoom-container {
    position: relative;
    display: block;
    width: 100%;
}

.product-main-image-wrapper {
    position: relative;
    overflow: visible;
    cursor: crosshair;
    border-radius: 16px;
    border: 1px solid #e9ecef;
    background: #ffffff;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.product-main-image-wrapper .product-main-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    border: none;
    padding: 0;
    box-shadow: none;
    transition: none;
}

.zoom-lens {
    position: absolute;
    border: 2px solid #d4af37;
    width: 150px;
    height: 150px;
    background-color: rgba(212, 175, 55, 0.1);
    pointer-events: none;
    display: none;
    z-index: 10;
    border-radius: 4px;
}

.zoom-result {
    position: absolute;
    top: 0;
    left: calc(100% + 20px);
    width: 450px;
    height: 450px;
    border: 1px solid #e9ecef;
    background-color: #fff;
    background-repeat: no-repeat;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    display: none;
    z-index: 9999;
    overflow: hidden;
    pointer-events: none;
}

.product-main-image-wrapper:hover .zoom-lens,
.product-main-image-wrapper:hover + .zoom-result,
.product-main-image-wrapper.zoom-active .zoom-lens,
.zoom-result.zoom-active {
    display: block;
}

/* Hide desktop zoom lens/result on smaller screens (mobile uses fullscreen overlay instead) */
@media (max-width: 991px) {
    .zoom-result {
        display: none !important;
    }
    .zoom-lens {
        display: none !important;
    }
    .product-main-image-wrapper {
        cursor: pointer;
    }
}

/* Mobile zoom hint badge */
.mobile-zoom-hint-badge {
    display: none;
}
@media (max-width: 991px) {
    .mobile-zoom-hint-badge {
        display: flex;
        position: absolute;
        bottom: 12px;
        right: 12px;
        background: rgba(0,0,0,0.6);
        color: #fff;
        font-size: 11px;
        font-weight: 600;
        padding: 5px 10px;
        border-radius: 16px;
        gap: 4px;
        align-items: center;
        z-index: 5;
        pointer-events: none;
    }
}

/* ============================================
   SHARE PRODUCT SECTION
   ============================================ */
.product-delivery-row {
    display: inline-flex;
    align-items: stretch;
    gap: 8px;
}

.product-delivery-row .product-delivery-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    margin: 0;
}

.product-share-section {
    position: relative;
    display: flex;
}

.share-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
}

.share-trigger:hover {
    border-color: #1A3C34;
    color: #1A3C34;
    background: #f8faf9;
}

.share-trigger svg {
    flex-shrink: 0;
}

.share-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #e8e8e8;
    z-index: 100;
    min-width: 280px;
    overflow: hidden;
    animation: shareMenuSlide 0.2s ease;
}

.share-menu.active {
    display: block;
}

@keyframes shareMenuSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-menu-header {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f0f0f0;
}

.share-options {
    display: flex;
    flex-wrap: wrap;
    padding: 12px;
    gap: 4px;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    transition: background 0.15s ease;
}

.share-option:hover {
    background: #f5f5f5;
}

.share-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Copy link success toast */
.share-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1A3C34;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.share-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Mobile share menu - full width bottom sheet style */
@media (max-width: 767px) {
    .share-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        margin-top: 0;
        min-width: 100%;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
        animation: shareMenuSlideUp 0.3s ease;
    }

    @keyframes shareMenuSlideUp {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .share-menu-header {
        text-align: center;
        padding: 16px;
        position: relative;
    }

    .share-menu-header::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
        margin: 0 auto 10px;
    }

    .share-options {
        padding: 8px 16px 20px;
    }

    .share-option {
        padding: 14px 12px;
    }

    .share-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 99;
    }
}
