/*
* CSS Styles for Product Details Page
* ================================
*/

/* Page Banner */
.page-banner {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/banner-products.jpg') no-repeat center center/cover;
    padding: 80px 0;
    text-align: center;
    color: var(--white-color);
}

.page-banner h1 {
    margin-bottom: 15px;
    color: var(--white-color);
}

.breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: var(--light-gray);
}

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

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

/* Product Details Container */
.product-details-section {
    padding: 80px 0;
}

.product-details-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* Product Gallery */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-image {
    position: relative;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.zoom-icon {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-color);
    font-size: 1rem;
    transition: var(--transition);
}

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

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

.thumbnail {
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
    border: 2px solid transparent;
}

.thumbnail:hover, .thumbnail.active {
    opacity: 1;
    border-color: var(--primary-color);
}

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

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

.product-info h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

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

.stars {
    color: var(--secondary-color);
}

.product-rating span {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.product-description {
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--gray-color);
}

.product-features, .product-materials {
    margin-bottom: 20px;
}

.product-features h3, .product-materials h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
    position: relative;
    padding-right: 15px;
}

.product-features h3::before, .product-materials h3::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 20px;
    background-color: var(--primary-color);
}

.product-features ul, .product-materials ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.product-features ul li, .product-materials ul li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-features ul li i {
    color: var(--success-color);
}

.product-materials ul li i {
    color: var(--primary-color);
    font-size: 0.7rem;
}

/* Product Options */
.product-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.option h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

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

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.color-option.active, .color-option:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

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

.size-option {
    padding: 8px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.size-option.active, .size-option:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
}

.product-cta {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.product-cta .btn {
    flex: 1;
}

/* Product Tabs */
.product-tabs {
    margin-bottom: 60px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background-color: var(--white-color);
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--light-gray);
}

.tab-btn {
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.tab-btn.active, .tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active::after, .tab-btn:hover::after {
    width: 100%;
}

.tabs-content {
    padding: 30px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* Specifications Table */
.specs-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.spec-row {
    display: flex;
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 10px;
}

.spec-name {
    width: 30%;
    font-weight: 500;
    color: var(--dark-color);
}

.spec-value {
    width: 70%;
    color: var(--gray-color);
}

/* Installation Steps */
.install-steps {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
}

.install-step {
    display: flex;
    gap: 20px;
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.step-content p {
    color: var(--gray-color);
}

/* Warranty Cards */
.warranty-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.warranty-card {
    padding: 30px;
    border-radius: 8px;
    background-color: var(--light-color);
    transition: var(--transition);
}

.warranty-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.warranty-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--white-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.warranty-card h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.warranty-card ul {
    padding-right: 20px;
    margin-top: 15px;
}

.warranty-card ul li {
    margin-bottom: 10px;
    color: var(--gray-color);
    position: relative;
}

.warranty-card ul li::before {
    content: '';
    position: absolute;
    right: -20px;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

/* Reviews Section */
.reviews-summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--light-gray);
}

.rating-summary {
    display: flex;
    gap: 40px;
}

.average-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 10px;
}

.rating-count {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-top: 5px;
}

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 300px;
}

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

.rating-label {
    width: 60px;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.bar-container {
    flex: 1;
    height: 10px;
    background-color: var(--light-gray);
    border-radius: 5px;
    overflow: hidden;
}

.bar {
    height: 100%;
    background-color: var(--primary-color);
}

.rating-percent {
    width: 40px;
    font-size: 0.9rem;
    color: var(--gray-color);
    text-align: left;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

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

.reviewer-info {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.reviewer-info h4 {
    margin-bottom: 5px;
    color: var(--primary-color);
}

.review-date {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.review-content p {
    color: var(--gray-color);
    line-height: 1.6;
}

/* Review Form */
.review-form {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--light-gray);
}

.review-form h3 {
    margin-bottom: 20px;
}

.rating-select {
    display: flex;
    gap: 5px;
    font-size: 1.5rem;
    color: var(--gray-color);
    margin-bottom: 10px;
}

.rating-select i {
    cursor: pointer;
    transition: var(--transition);
}

.rating-select i:hover, .rating-select i.active {
    color: var(--secondary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    font-family: 'Tajawal', sans-serif;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 121, 107, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Related Products */
.related-products {
    margin-top: 60px;
}

.related-products h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    position: relative;
}

.related-products h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--white-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-image {
    height: 200px;
    overflow: hidden;
}

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

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

.product-details {
    padding: 20px;
    text-align: center;
}

.product-details h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.product-details p {
    margin-bottom: 20px;
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/cta-bg.jpg') no-repeat center center/cover;
    padding: 80px 0;
    margin-top: 80px;
}

.cta-content {
    text-align: center;
    color: var(--white-color);
}

.cta-content h2 {
    margin-bottom: 15px;
    color: var(--white-color);
}

.cta-content p {
    margin-bottom: 30px;
    color: var(--light-gray);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-whatsapp {
    background-color: #25d366;
    color: var(--white-color);
}

.btn-whatsapp:hover {
    background-color: #128c7e;
    color: var(--white-color);
}

/* Image Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--white-color);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.lightbox-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    animation: zoom 0.6s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

/* Responsive Styles */
@media screen and (max-width: 992px) {
    .product-details-container {
        grid-template-columns: 1fr;
    }
    
    .rating-summary {
        flex-direction: column;
        gap: 20px;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
}

@media screen and (max-width: 768px) {
    .page-banner {
        padding: 60px 0;
    }
    
    .main-image {
        height: 300px;
    }
    
    .product-features ul, .product-materials ul {
        grid-template-columns: 1fr;
    }
    
    .product-options .option {
        margin-bottom: 15px;
    }
    
    .tabs-header {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        padding: 10px;
        text-align: center;
    }
    
    .tabs-content {
        padding: 20px 15px;
    }
    
    .spec-row {
        flex-direction: column;
    }
    
    .spec-name, .spec-value {
        width: 100%;
    }
    
    .spec-name {
        margin-bottom: 5px;
    }
    
    .warranty-info {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 576px) {
    .product-details-section {
        padding: 40px 0;
    }
    
    .page-banner {
        padding: 40px 0;
    }
    
    .main-image {
        height: 250px;
    }
    
    .thumbnail-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tabs-header {
        flex-direction: column;
    }
    
    .product-cta {
        flex-direction: column;
    }
    
    .related-products-grid {
        grid-template-columns: 1fr;
    }
}


.product-gallery .main-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.thumbnail-container {
    display: flex;
    margin-top: 10px;
}

.thumbnail-container div {
    margin-right: 10px;
    border: 2px solid transparent;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
}

.thumbnail-container .active {
    border-color: #007bff;
}

.thumbnail-container img {
    width: 80px;
    height: auto;
    transition: 0.3s;
}



/* استجابة للجوال */
@media (max-width: 768px) {
    .thumbnail-container img {
        width: 60px;
    }
    .navigation-buttons {
        flex-direction: column;
        gap: 10px;
    }
}

