/* Product Detail Layout */
#product-detail {
    padding: 30px 0 60px;
}

.product-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* Product Images */
.product-images {
    position: relative;
}

.main-image {
    background-color: #fff;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
    text-align: center;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.main-image img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.main-image:hover img {
    transform: scale(1.05);
}

.image-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    padding: 5px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    background: white;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnail.active {
    border-color: var(--primary-color);
}

.thumbnail:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Product Information */
.product-info {
    padding-left: 10px;
}

.product-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.badge {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.badge.bestseller {
    background-color: #fef2d8;
    color: #a87c27;
}

.badge.sale {
    background-color: #fee2e2;
    color: #b91c1c;
}

.product-title {
    margin: 0 0 15px;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    color: #222;
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.stars {
    display: flex;
    margin-right: 10px;
    color: #FFB800;
    letter-spacing: 2px;
    font-size: 1.1rem;
}

.star-filled, .star-half {
    color: #FFB800;
}

.star-outline {
    color: #d1d5db;
}

.rating-count {
    color: #666;
    font-size: 0.9rem;
}

.product-price {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.current-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 12px;
}

.original-price {
    font-size: 1.2rem;
    color: #888;
    text-decoration: line-through;
    margin-right: 12px;
}

.discount-percent {
    font-size: 0.9rem;
    font-weight: 600;
    color: #b91c1c;
    background-color: #fee2e2;
    padding: 4px 8px;
    border-radius: 4px;
}

.product-availability {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.product-availability svg {
    margin-right: 8px;
}

.product-availability.in-stock {
    color: #16a34a;
}

.product-availability.low-stock {
    color: #ca8a04;
}

.product-availability.out-of-stock {
    color: #b91c1c;
}

.short-description {
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

/* Product Options */
.product-options {
    margin-bottom: 30px;
}

.option-group {
    margin-bottom: 20px;
}

.option-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

/* Color Selection */
.color-options {
    display: flex;
    gap: 15px;
}

.color-option {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px white, 0 0 0 3px #ddd;
    transition: all 0.2s ease;
}

.color-option.active .color-swatch {
    box-shadow: 0 0 0 2px white, 0 0 0 3px var(--primary-color);
}

.color-name {
    font-size: 0.8rem;
    color: #555;
}

.color-option:hover .color-swatch {
    transform: scale(1.1);
}

/* Warranty Options */
.warranty-options, .installation-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.warranty-option, .installation-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.warranty-option.active, .installation-option.active {
    border-color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.05);
}

.warranty-option:hover, .installation-option:hover {
    border-color: var(--primary-color);
}

.warranty-option input, .installation-option input {
    margin-right: 10px;
}

.option-price {
    margin-left: 6px;
    color: #888;
    font-size: 0.9rem;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    max-width: 120px;
}

.quantity-btn {
    background-color: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background-color: #e5e7eb;
}

.quantity-input {
    width: 50px;
    height: 32px;
    text-align: center;
    border: 1px solid #e5e7eb;
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.add-to-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 1rem;
    flex: 2;
}

.wishlist-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 1rem;
    flex: 1;
}

/* Delivery Info */
.delivery-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f9fafb;
    border-radius: 8px;
}

.delivery-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.delivery-option svg {
    color: var(--primary-color);
    margin-top: 3px;
}

.delivery-option strong {
    display: block;
    margin-bottom: 3px;
    color: #333;
}

.delivery-option p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

/* Share Product */
.share-product {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-product span {
    color: #555;
    font-size: 0.9rem;
}

.share-icons {
    display: flex;
    gap: 10px;
}

.share-icons a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
    border-radius: 50%;
    color: #555;
    transition: all 0.2s ease;
}

.share-icons a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Product Tabs */
#product-tabs {
    padding: 0 0 60px;
}

.tabs-container {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.tabs-nav {
    display: flex;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.tab-btn {
    padding: 15px 25px;
    font-weight: 600;
    color: #555;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-content-inner {
    padding: 30px;
}

.tab-content-inner h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.5rem;
    color: #222;
}

/* Description Tab */
.feature-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.feature {
    display: flex;
    gap: 15px;
}

.feature-icon {
    color: var(--primary-color);
    margin-top: 5px;
}

.feature-text h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #333;
}

.feature-text p {
    margin: 0;
    color: #555;
    line-height: 1.5;
    font-size: 0.95rem;
}

.content-section {
    margin-bottom: 30px;
}

.content-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #333;
}

.content-section p {
    margin: 0 0 15px;
    color: #555;
    line-height: 1.6;
}

/* Specifications Tab */
.specifications-table {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.spec-group h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.spec-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-row:nth-child(odd) {
    background-color: #fafafa;
}

.spec-name {
    font-weight: 500;
    color: #444;
}

.spec-value {
    color: #555;
}

/* Reviews Tab */
.reviews-header {
    margin-bottom: 30px;
}

.review-summary {
    display: flex;
    gap: 40px;
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f9fafb;
    border-radius: 8px;
}

.review-average {
    text-align: center;
    padding-right: 40px;
    border-right: 1px solid #e5e7eb;
}

.average-rating {
    font-size: 2.5rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 5px;
}

.rating-stars {
    margin-bottom: 5px;
}

.rating-count {
    font-size: 0.85rem;
    color: #666;
}

.rating-breakdown {
    flex: 1;
}

.rating-bar {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.rating-label {
    width: 70px;
    font-size: 0.85rem;
    color: #555;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    margin: 0 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #FFB800;
    border-radius: 4px;
}

.rating-percent {
    width: 40px;
    font-size: 0.85rem;
    color: #555;
    text-align: right;
}

.review-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-filters {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-filters label {
    color: #555;
    font-size: 0.9rem;
}

.review-sort {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
    background-color: white;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.review-item {
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: white;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.reviewer-info {
    display: flex;
    gap: 12px;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.reviewer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reviewer-name {
    margin: 0 0 5px;
    font-size: 1rem;
    font-weight: 600;
}

.verified-buyer {
    font-size: 0.8rem;
    color: #16a34a;
}

.review-date {
    font-size: 0.85rem;
    color: #777;
    margin-left: 10px;
}

.review-content {
    margin-bottom: 15px;
}

.review-title {
    margin: 0 0 10px;
    font-size: 1.1rem;
    color: #333;
}

.review-content p {
    margin: 0 0 10px;
    color: #444;
    line-height: 1.6;
}

.review-footer {
    display: flex;
    justify-content: flex-end;
}

.review-helpful {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #555;
}

.helpful-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background-color: #f3f4f6;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.helpful-btn:hover {
    background-color: #e5e7eb;
}

.load-more {
    text-align: center;
    margin-top: 20px;
}

/* FAQ Tab */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    padding: 15px 20px;
    background-color: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #333;
    font-weight: 600;
}

.faq-toggle {
    color: #777;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 15px 20px;
    max-height: 500px;
}

.faq-answer p {
    margin: 0 0 15px;
    color: #555;
    line-height: 1.6;
}

.faq-answer ul {
    margin: 0 0 15px;
    padding-left: 20px;
    color: #555;
    line-height: 1.6;
}

.faq-answer ul li {
    margin-bottom: 5px;
}

.ask-question {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.ask-question h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #333;
}

/* Related Products */
#related-products {
    padding: 60px 0;
    background-color: #f9fafb;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    margin: 0 0 10px;
    font-size: 1.8rem;
    color: #222;
}

.section-header p {
    margin: 0;
    color: #666;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

/* Recently Viewed */
#recently-viewed {
    padding: 60px 0;
}

.recently-viewed-slider {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    overflow-x: auto;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* Product Card */
.product-card {
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    scroll-snap-align: start;
}

.product-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 1;
}

.product-badge.sale {
    background-color: #fee2e2;
    color: #b91c1c;
}

.product-badge.new {
    background-color: #dcfce7;
    color: #15803d;
}

.product-image {
    height: 200px;
    padding: 20px;
    text-align: center;
    background-color: white;
    border-bottom: 1px solid #f0f0f0;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-details {
    padding: 15px;
}

.product-details h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.stars {
    color: #FFB800;
    margin-right: 5px;
}

.count {
    color: #777;
    font-size: 0.8rem;
}

.product-price {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
}

.current-price {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-right: 8px;
}

.original-price {
    color: #888;
    text-decoration: line-through;
    font-size: 0.9rem;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.view-btn, .add-cart-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .product-wrapper {
        grid-template-columns: 1fr;
    }
    
    .product-images {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .product-info {
        padding-left: 0;
    }
    
    .feature-highlights {
        grid-template-columns: 1fr 1fr;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .recently-viewed-slider {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .review-summary {
        flex-direction: column;
        gap: 20px;
    }
    
    .review-average {
        padding-right: 0;
        padding-bottom: 20px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .review-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .tabs-nav {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex-grow: 1;
        text-align: center;
    }
    
    .feature-highlights {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .breadcrumbs {
        font-size: 0.8rem;
    }
    
    .product-title {
        font-size: 1.8rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .related-products-grid {
        grid-template-columns: 1fr;
    }
    
    .recently-viewed-slider {
        grid-template-columns: 1fr;
    }
    
    .review-header {
        flex-direction: column;
    }
    
    .spec-row {
        grid-template-columns: 1fr;
    }
    
    .spec-name {
        padding-bottom: 5px;
    }
}