/* Product Page Specific Styles */

/* Overall Page Layout */
.product-page-wrapper {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Loading and Error States */
#loading-state, #error-state {
    text-align: center;
    padding: 4rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 45px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #333; /* Ensure text is black */
}

#error-state h1 {
    color: #dc3545; /* Keep error specific color */
    margin-bottom: 1rem;
}

#error-state p {
    color: #333; /* Ensure text is black */
}

/* Main Product Layout */
.product-page-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Main content takes up remaining space */
.product-main-content {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 45px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Sidebar fixed width */
.product-sidebar {
    flex: 0 0 320px;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 45px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    height: fit-content;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #333; /* Ensure breadcrumb text is black */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.breadcrumbs a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

.breadcrumbs .current-page {
    font-weight: bold;
    color: #333; /* Ensure current page text is black */
}


/* Product Main Content */
.product-main-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 45px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    min-width: 0; /* Important for flex/grid items to prevent overflow */
}

/* Product Top Section (Images & Details) */
.product-top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .product-top-section {
        grid-template-columns: 1fr;
    }
}

.product-images-section {
    text-align: center;
}

.product-image-viewer {
    position: relative;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    margin-bottom: 1rem;
}

.main-product-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

.zoom-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    color: #333; /* Ensure icon is black */
}

.zoom-icon:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.product-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumbnail.active, .thumbnail:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.product-images-label {
    font-size: 0.85rem;
    color: #666; /* Ensure label is dark */
    margin-top: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Product Details Section */
.product-details-section {
    text-align: left;
}

.product-name {
    font-size: 2.2rem;
    font-weight: 700;
    color: #333; /* Ensure product name is black */
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.product-price {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea; /* Primary color for price */
    margin-bottom: 1.5rem;
}

.free-tag {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.product-price small {
    font-size: 1rem;
    color: #666; /* Ensure small text is dark */
}

/* Taxonomies Section */
.taxonomies-section {
    margin-bottom: 2rem;
}

.taxonomy-grid {
    display: block; /* Force stacking of taxonomy items */
}

.taxonomy-item {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-size: 0.9rem;
    color: #333; /* Ensure text is black */
    margin-bottom: 0.5rem; /* Space between stacked items */
}

.taxonomy-label {
    font-weight: bold;
    color: #555; /* Slightly lighter black for label */
    margin-right: 0.5rem; /* Space between label and value */
}

.taxonomy-value a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.taxonomy-value a:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* Action Buttons */
.action-buttons .btn {
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
}

/* Product Description Section */
.product-description-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 45px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    margin-top: 2rem;
}

.product-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.5);
    margin-bottom: 1.5rem;
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: #666; /* Ensure tab text is dark */
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: #667eea;
}

.tab-button.active {
    color: #333; /* Active tab text black */
    border-bottom-color: #667eea; /* Active tab underline primary color */
}

#version-info p, #p-description {
    color: #333; /* Ensure description text is black */
    line-height: 1.7;
    margin-bottom: 1rem;
}

#version-info strong {
    color: #333; /* Ensure strong text is black */
}

#reviews-tab h2 {
    color: #333; /* Ensure review heading is black */
    margin-bottom: 1rem;
}

#reviews-tab p {
    color: #666; /* Ensure review paragraph is dark */
}

/* Product Sidebar */
.product-sidebar {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 45px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    height: fit-content; /* Ensure it only takes up necessary vertical space */
    min-width: 0; /* Prevents overflow within grid layout */
}

.brand-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.5);
}

.brand-logo-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem auto;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.brand-logo {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333; /* Ensure brand name is black */
}

.sidebar-ad {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px dashed rgba(255,255,255,0.5);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.sidebar-ad:last-child {
    margin-bottom: 0;
}

.ad-label {
    font-size: 0.8rem;
    color: #666; /* Ensure ad label is dark */
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-placeholder p {
    color: #333; /* Ensure ad text is black */
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 90%;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-page-layout {
        flex-direction: column;
    }

    .product-sidebar {
        flex: 1 1 auto;
        width: 100%;
    }

    .product-top-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-name {
        font-size: 1.8rem;
    }

    .product-price {
        font-size: 1.5rem;
    }

    .taxonomy-grid .taxonomy-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}


@media (max-width: 480px) {
    .product-page-wrapper {
        padding: 1rem 0.5rem;
    }

    .taxonomy-label {
        min-width: auto;
    }

    .product-main-content, .product-sidebar, .product-description-wrapper {
        padding: 1.5rem; /* Smaller padding on very small screens */
    }

    .product-name {
        font-size: 1.6rem;
    }
}