/* ============================================
   PRODUCT DETAILS PAGE - THE GOOD SLEEP
   ============================================ */

:root {
    --primary-color: #0f4c75;
    --secondary-color: #3282b8;
    --accent-color: #1b262c;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --text-dark: #1a1a2e;
    --text-gray: #6b7280;
    --border-color: #e5e7eb;
    --bg-light: #f8f9fa;
}

/* Product Details Section */
.product-details-section {
    padding: 60px 0 80px;
    background: var(--bg-light);
}

.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    max-width: 1400px;
    margin: 0 auto;
}

/* Product Gallery */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.main-image {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 16px;
    overflow: hidden;
    background: #f5f5f5;
    border: 2px solid var(--border-color);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.main-image:hover img {
    transform: scale(1.08);
}

.thumbnail-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.thumbnail-images img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.thumbnail-images img:hover {
    opacity: 1;
    transform: translateY(-4px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.thumbnail-images img.active {
    border-color: var(--primary-color);
    opacity: 1;
    box-shadow: 0 5px 15px rgba(15, 76, 117, 0.3);
}

/* Product Info */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.breadcrumb a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    color: var(--text-dark);
    font-weight: 600;
}

.product-info h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
    margin: 0;
}

.product-description {
    font-size: 1.1rem;
    color: var(--text-gray);
    line-height: 1.8;
    margin: 0;
}

/* Product Price */
.product-price {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 25px 0;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

.current-price {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.original-price {
    font-size: 1.4rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.discount {
    background: var(--success-color);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Product Features */
.product-features {
    background: linear-gradient(135deg, #f0f7ff, #e6f3ff);
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid var(--secondary-color);
}

.product-features h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 18px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-features h3 i {
    color: var(--warning-color);
}

.product-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 1rem;
    color: #374151;
    line-height: 1.6;
}

.product-features li i {
    color: var(--success-color);
    font-size: 1.1rem;
    margin-top: 3px;
    flex-shrink: 0;
}

/* Product Options */
.product-options {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.size-selection h3,
.color-selection h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 15px 0;
}

/* Size Options */
.size-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.size-option {
    position: relative;
    cursor: pointer;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    background: white;
}

.size-option:hover {
    border-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(50, 130, 184, 0.15);
}

.size-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #e6f3ff, #f0f7ff);
    box-shadow: 0 6px 20px rgba(15, 76, 117, 0.2);
}

.size-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.size-name {
    display: block;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
    font-size: 1.05rem;
}

.size-dimensions {
    display: block;
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 5px;
}

.size-price {
    display: block;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* Color Options */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.color-option {
    position: relative;
    cursor: pointer;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
}

.color-option:hover {
    border-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(50, 130, 184, 0.15);
}

.color-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #e6f3ff, #f0f7ff);
    box-shadow: 0 6px 20px rgba(15, 76, 117, 0.2);
}

.color-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid #e5e7eb;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

/* Product Actions */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 30px 0;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 20px;
}

.quantity-selector label {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.quantity-controls button {
    background: var(--bg-light);
    border: none;
    padding: 12px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-controls button:hover {
    background: var(--primary-color);
    color: white;
}

.quantity-controls input {
    border: none;
    width: 70px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 12px 0;
    outline: none;
    color: var(--text-dark);
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-add-cart,
.btn-buy-now {
    padding: 18px 30px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    font-family: 'Poppins', sans-serif;
}

.btn-add-cart {
    background: white;
    color: var(--primary-color);
    border: 3px solid var(--primary-color);
}

.btn-add-cart:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(15, 76, 117, 0.3);
}

.btn-buy-now {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: 3px solid transparent;
    box-shadow: 0 6px 20px rgba(15, 76, 117, 0.3);
}

.btn-buy-now:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(15, 76, 117, 0.4);
}

/* Related Products Inline */
.related-products-inline {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa, #f0f7ff);
    border-radius: 15px;
    border: 2px solid var(--border-color);
}

.related-products-inline h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--text-dark);
    margin: 0 0 25px 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.related-products-inline h3 i {
    color: var(--secondary-color);
}

/* Related Products Grid - Always 2 Products */
.related-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.loading-placeholder {
    grid-column: 1/-1;
    text-align: center;
    padding: 40px;
    color: var(--text-gray);
    font-size: 1.1rem;
}

.loading-placeholder i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.related-product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

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

.related-product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f5f5f5;
}

.related-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-product-card:hover .related-product-image img {
    transform: scale(1.1);
}

.best-seller-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--warning-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-product-info {
    padding: 20px;
}

.related-product-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.related-product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.related-product-price .price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
}

.related-product-price .original {
    font-size: 1rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.btn-view-related {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-view-related:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 76, 117, 0.3);
}

/* Specifications Section */
.specifications-section {
    padding: 80px 0;
    background: white;
}

.specs-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

.specs-header {
    text-align: center;
    margin-bottom: 60px;
}

.specs-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--text-dark);
    margin: 0 0 15px 0;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.specs-header h2 i {
    color: var(--secondary-color);
}

.specs-header p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin: 0;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.spec-card {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 20px;
}

.spec-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--secondary-color);
}

.spec-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.spec-icon i {
    font-size: 1.6rem;
    color: white;
}

.spec-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.spec-label {
    font-size: 0.9rem;
    color: var(--text-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spec-value {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 700;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.4);
    font-weight: 700;
    font-size: 1rem;
    animation: slideIn 0.4s ease;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification i {
    font-size: 1.3rem;
}

.notification.fade-out {
    animation: slideOut 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(500px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(500px);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 1199px) {
    .product-details {
        gap: 40px;
        padding: 40px;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .product-details {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 35px;
    }
    
    .product-gallery {
        position: static;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .specs-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 767px) {
    .product-details-section {
        padding: 40px 0 60px;
    }
    
    .product-details {
        padding: 25px;
        border-radius: 15px;
    }
    
    .product-info h1 {
        font-size: 2rem;
    }
    
    .current-price {
        font-size: 2rem;
    }
    
    .thumbnail-images {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .size-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .related-products-grid {
        grid-template-columns: 1fr;
    }
    
    .related-products-inline {
        padding: 20px;
    }
    
    .specs-header h2 {
        font-size: 2.2rem;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .notification {
        bottom: 20px;
        right: 20px;
        left: 20px;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .product-info h1 {
        font-size: 1.7rem;
    }
    
    .product-features,
    .related-products-inline {
        padding: 20px 15px;
    }
    
    .action-buttons {
        gap: 12px;
    }
    
    .btn-add-cart,
    .btn-buy-now {
        padding: 16px 20px;
        font-size: 1rem;
    }
    
    .specs-header h2 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .spec-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
}
