/* Product Detail Page Styles */
main {
    max-width: 1080px;
    margin: 0 auto 3rem auto;
}
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 2rem auto;
}

.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image {
    width: 100%;
    height: 461px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.thumbnail-images img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.thumbnail-images img:hover,
.thumbnail-images img.active {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.product-info {
    padding: 0;
    background: var(--glass-bg);
    border-radius: 12px;
}

.product-info h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
}

.product-info .product-rating {
    display: flex;
    align-items: center;
    margin: 0;
    padding-left: 0;
}

.product-rating i {
    color: #FFD700;
}

.product-rating span {
    color: var(--dark);
    opacity: 0.8;
}

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

.product-description {
    margin: 0;
    padding: 1rem 0 0 0;
    background: var(--glass-bg);
    border-radius: 8px;
}

.product-description h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.product-description ul {
    list-style: none;
    padding-left: 1.5rem;
}

.product-description li {
    margin-bottom: 0.5rem;
    position: relative;
}

.product-description li::before {
    content: '•';
    color: var(--primary);
    position: absolute;
    left: -1.5rem;
}

.product-options {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--glass-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.option-group {
    margin-bottom: 1.5rem;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.color-options {
    display: flex;
    gap: 1rem;
}

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

.color-option:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 150px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--glass-bg);
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

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

.quantity-selector input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 1rem;
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin: 2rem 0 1rem 0;
}

.add-to-cart-btn {
    flex: 2;
    background: var(--primary);
    color: white;
}

.buy-now-btn {
    flex: 2;
    background: var(--dark);
    color: white;
    text-align: center;
}

.buy-now-btn i {
    font-size: 0.8rem;
    top: -2px;
    position: relative;
    padding-left: 5px;
}

.share-btn {
    width: 50px;
    height: 50px;
    border: none;
    background: var(--glass-bg);
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.share-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.product-meta {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--glass-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-top: 1px solid var(--glass-border);
}

.product-meta p {
    margin-bottom: 0.5rem;
    color: var(--dark);
    opacity: 0.8;
}

/* Product Reviews Section */
.product-reviews {
    padding: 3rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.product-reviews h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--dark);
}

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

.average-rating h3 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.rating-bar {
    display: grid;
    grid-template-columns: 80px 1fr 50px;
    align-items: center;
    gap: 1rem;
}

.bar {
    height: 8px;
    background: var(--glass-border);
    border-radius: 4px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-gallery {
        position: static;
    }

    .main-image {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .product-detail {
        padding: 1rem;
        margin: 2rem auto 1rem auto;
        box-shadow: none;
        border-radius: 0;
    }

    .product-info h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .thumbnail-images {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-image {
        height: 300px;
    }

    .product-info h1 {
        font-size: 1.8rem;
    }
}

.product-tabs-section {
    max-width: 1400px;
    margin: 0 auto 3rem;
}

.product-tabs {
    margin-top: 2rem;
    background: var(--glass-bg);
    border-radius: 30px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.5rem;
}

.tab-btn {
    padding: 1rem 2rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark);
    opacity: 0.7;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    margin: 0 0.5rem;
    position: relative;
}

.tab-btn:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}

.tab-btn.active {
    opacity: 1;
    color: var(--primary);
    background: #fff;
    border-bottom: 2px solid var(--primary);
    box-shadow: none;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

.tab-content {
    padding: 1rem 2.5rem 3rem 2.5rem;
    background: var(--glass-bg);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

.tab-pane h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    font-weight: 600;
}

.tab-pane ul, .tab-pane ol {
    margin-left: 1.5rem;
}

.product-description p {
    line-height: 1.8;
    color: #333;
    font-size: 1.1rem;
}

.tab-pane {
    padding: 0 2rem;
    line-height: 1.8;
    color: #333;
    font-size: 1.1rem;
}

.tab-pane p {
    margin-bottom: 1.5rem;
}

.tab-pane h1, 
.tab-pane h2, 
.tab-pane h3, 
.tab-pane h4 {
    margin: 1.5rem 0 1rem;
    color: #222;
}

.tab-pane ul, 
.tab-pane ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.tab-pane li {
    margin-bottom: 0.5rem;
}

.tab-pane img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 8px;
}

.tab-pane blockquote {
    border-left: 4px solid #e0e0e0;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #666;
}

.tab-pane table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.tab-pane table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    overflow: hidden;
}

.specs-table tr {
    border-bottom: 1px solid var(--glass-border);
    transition: background-color 0.3s ease;
}

.specs-table tr:hover {
    background: rgba(var(--primary-rgb), 0.05);
}

.specs-table tr:last-child {
    border-bottom: none;
}

.specs-table td {
    padding: 1rem 1.5rem 1rem 0;
}

.specs-table td:first-child {
    font-weight: 500;
    color: var(--dark);
    opacity: 0.8;
    width: 40%;
}

.review {
    padding: 0;
    margin-bottom: 1.5rem;
    aspect-ratio: 16 / 9;
    width: 100%;
}

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

@media (max-width: 768px) {
    main {
        margin: 0;
    }

    .product-tabs-section {
        padding: 0 1rem;
    }

    .tab-buttons {
        flex-wrap: wrap;
        padding: 0.5rem;
    }

    .tab-btn {
        flex: 1;
        padding: 0.8rem;
        font-size: 1rem;
        text-align: center;
        margin: 0.25rem;
    }

    .tab-content {
        padding: 1rem 1.5rem 2rem 1.5rem;
    }

    .tab-pane {
        padding: 0;
    }
    
    .specs-table td {
        padding: 0.8rem 1rem;
    }

    .product-tabs-section {
        max-width: 1400px;
        margin: 0;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .product-tabs {
        border-radius: 0;
        box-shadow: none;
    }
}