/* ===================================
   PRODUCTS SECTION WITH MODAL
   =================================== */

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Product Card */
.product-card {
    background: var(--light-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(139, 69, 19, 0.2);
}

.product-image {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f0 0%, #e8e8e0 100%);
}

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

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

/* Product Overlay */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top,
        rgba(15, 23, 42, 0.9) 0%,
        rgba(15, 23, 42, 0.5) 50%,
        transparent 100%
    );
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-detail-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(218, 165, 32, 0.3);
}

.product-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(218, 165, 32, 0.4);
}

/* Product Info */
.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    color: var(--text-dark);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.product-info p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* Product Modal */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

.product-modal.active {
    display: flex;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.modal-content {
    position: relative;
    background: var(--light-bg);
    border-radius: 20px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2;
    animation: modalSlideIn 0.4s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
    background: var(--text-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.modal-close:hover {
    background: var(--primary-color);
    color: var(--text-white);
    transform: rotate(90deg);
}

/* Modal Product Content */
.modal-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem;
}

/* Modal Gallery */
.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image {
    width: 100%;
    height: 450px;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f0 0%, #e8e8e0 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnail-gallery {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.thumbnail {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    cursor: pointer;
    object-fit: contain;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: var(--primary-color);
    opacity: 1;
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

/* Modal Details */
.modal-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-details h2 {
    color: var(--text-dark);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.product-tagline {
    color: var(--primary-color);
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1rem;
    font-style: italic;
}

.product-description {
    color: var(--text-light);
    line-height: 1.7;
    padding: 1.5rem;
    background: rgba(139, 69, 19, 0.05);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
}

/* Product Specifications */
.product-specifications {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-specifications > h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.product-specifications > h3 i {
    color: var(--primary-color);
}

.spec-group {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(139, 69, 19, 0.1);
    transition: all 0.3s ease;
}

.spec-group:hover {
    transform: translateX(5px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.1);
}

.spec-group h4 {
    color: var(--text-dark);
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.spec-group p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* Thickness Options */
.thickness-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.thickness-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-white);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(139, 69, 19, 0.2);
}

/* Spec List */
.spec-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.spec-list li {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    line-height: 1.6;
}

.spec-list i {
    color: var(--primary-color);
    font-size: 1rem;
    min-width: 20px;
}

/* Highlight Spec Group */
.spec-group.highlight {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.05) 0%, rgba(218, 165, 32, 0.05) 100%);
    border: 2px solid var(--primary-color);
}

.spec-group.highlight h4 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(139, 69, 19, 0.1);
}

.modal-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

/* Dark Mode */
body.dark-mode .product-card {
    background: var(--card-bg);
}

body.dark-mode .product-info h3 {
    color: var(--text-dark);
}

body.dark-mode .modal-content {
    background: var(--card-bg);
}

body.dark-mode .modal-details h2 {
    color: var(--text-dark);
}

body.dark-mode .spec-group {
    background: var(--section-bg);
    border-color: var(--border-color);
}

body.dark-mode .spec-group h4 {
    color: var(--text-dark);
}

body.dark-mode .modal-close {
    background: var(--section-bg);
    color: var(--text-dark);
}

body.dark-mode .modal-close:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

body.dark-mode .modal-actions {
    border-top-color: var(--border-color);
}

/* Responsive */
@media (max-width: 1024px) {
    .modal-product {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }
    
    .main-image {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }
    
    .product-image {
        height: 280px;
    }
    
    .modal-content {
        border-radius: 15px;
        max-height: 95vh;
    }
    
    .modal-product {
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .modal-details h2 {
        font-size: 1.5rem;
    }
    
    .main-image {
        height: 300px;
    }
    
    .thumbnail {
        width: 80px;
        height: 80px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .product-modal {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .product-image {
        height: 250px;
    }
    
    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
    
    .main-image {
        height: 250px;
    }
}
