/* Rohini Threads - Product Detail Page Styles */

/* ============================================
   Product Detail Layout
   ============================================ */
.product-detail-page {
    padding-top: 130px;
    min-height: 100vh;
    transition: padding-top 0.3s ease;
}

body.scrolled .product-detail-page {
    padding-top: 90px;
}

.product-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 20px;
}

/* ============================================
   Product Gallery
   ============================================ */
.product-gallery {
    position: sticky;
    top: 100px;
    transition: top 0.3s ease;
}

body.scrolled .product-gallery {
    top: 70px;
}

.gallery-main {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    background: white;
    box-shadow: var(--shadow);
}

.gallery-main img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

.gallery-zoom-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 1.1rem;
    transition: all 0.2s;
}

.gallery-zoom-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Gallery Thumbnails */
.gallery-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.gallery-thumb:hover {
    border-color: #ddd;
}

.gallery-thumb.active {
    border-color: var(--primary-color);
}

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

/* ============================================
   Product Info
   ============================================ */
.product-info-detail {
    padding: 10px 0;
}

.product-title {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    font-weight: 600;
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.product-rating .stars {
    color: #ffc107;
    font-size: 1.1rem;
}

.rating-count {
    color: #666;
    font-size: 0.9rem;
}

/* Price */
.product-price-detail {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

.discount-badge {
    background: var(--accent-color);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Description */
.product-description-detail {
    color: #555;
    line-height: 1.7;
    margin-bottom: 25px;
    font-size: 1rem;
}

/* ============================================
   Variant Selection
   ============================================ */
.variant-group {
    margin-bottom: 25px;
}

.variant-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark-color);
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.variant-btn {
    padding: 10px 20px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.variant-btn:hover {
    border-color: var(--primary-color);
}

.variant-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* Color Buttons */
.color-options .variant-btn {
    min-width: 80px;
}

/* ============================================
   Quantity Selector
   ============================================ */
.quantity-group {
    margin-bottom: 30px;
}

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

.qty-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--dark-color);
    transition: background 0.2s;
}

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

.qty-input {
    width: 60px;
    height: 44px;
    border: none;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.qty-input:focus {
    outline: none;
}

/* Remove arrows from number input */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input[type=number] {
    -moz-appearance: textfield;
}

.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Stock Warning */
.stock-warning {
    display: inline-block;
    margin-left: 15px;
    color: #f57c00;
    font-weight: 500;
    font-size: 0.9rem;
}

/* ============================================
   Product Actions
   ============================================ */
.product-actions-detail {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.add-to-cart-btn-detail {
    flex: 1;
}

.add-to-cart-btn-detail:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.wishlist-btn-detail {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wishlist-btn-detail .heart-icon {
    font-size: 1.3rem;
}

.wishlist-btn-detail.active {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* ============================================
   Product Meta
   ============================================ */
.product-meta {
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 25px;
}

.meta-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

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

.meta-item strong {
    color: var(--dark-color);
}

.meta-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.meta-item a:hover {
    text-decoration: underline;
}

/* ============================================
   Product Specs / Details
   ============================================ */
.product-specs {
    padding: 20px 0;
    border-top: 1px solid #eee;
    margin-bottom: 5px;
}

.specs-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 12px;
}

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

.specs-item {
    position: relative;
    padding: 6px 0 6px 20px;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

.specs-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 13px;
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
}

/* ============================================
   Product Features
   ============================================ */
.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #555;
}

.feature-icon {
    width: 24px;
    height: 24px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* ============================================
   Product Not Found
   ============================================ */
.product-not-found {
    text-align: center;
    padding: 80px 20px;
}

.product-not-found h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.product-not-found p {
    color: #666;
    margin-bottom: 25px;
}

/* ============================================
   Reviews Section
   ============================================ */
.reviews-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

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

.avg-rating {
    text-align: center;
}

.avg-rating-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--dark-color);
}

.review-count {
    color: #666;
    font-size: 0.9rem;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.review-item {
    padding: 20px;
    background: var(--light-color);
    border-radius: 10px;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.reviewer-name {
    font-weight: 600;
    color: var(--dark-color);
}

.verified-badge {
    font-size: 0.75rem;
    background: #25D366;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
}

.review-date {
    color: #999;
    font-size: 0.85rem;
    margin-left: auto;
}

.review-rating {
    margin-bottom: 10px;
}

.review-comment {
    color: #555;
    line-height: 1.6;
}

.no-reviews {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* ============================================
   Related Products
   ============================================ */
.related-products-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.related-products-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 992px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-gallery {
        position: static;
    }

    .gallery-main img {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .product-title {
        font-size: 1.6rem;
    }

    .current-price {
        font-size: 1.6rem;
    }

    .product-actions-detail {
        flex-direction: column;
    }

    .wishlist-btn-detail {
        width: 100%;
        justify-content: center;
    }

    .gallery-main img {
        height: 350px;
    }

    .gallery-thumb {
        width: 60px;
        height: 60px;
    }

    .review-date {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .variant-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .product-features {
        flex-direction: column;
        gap: 10px;
    }
}
