/* product.css */

/* --- Product Layout --- */
/* Override navbar shadow specifically for this page */
.app-navbar {
    box-shadow: none !important;
    border-bottom: 1px solid var(--border-color);
}

.product-page {
    font-family: 'Plus Jakarta Sans', sans-serif;
    padding-top: 1rem;
    min-height: calc(100vh - 300px);
    background-color: #ffffff;
}

.product-container {
    max-width: 1536px;
    margin: 0 auto;
    padding: 2rem 4%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .product-container {
        grid-template-columns: 1.2fr 1fr;
        align-items: start;
        gap: 4rem;
    }
}

/* --- Image Gallery --- */
.product-gallery-vertical {
    display: flex;
    flex-direction: column-reverse;
    gap: 1rem;
}

@media (min-width: 768px) {
    .product-gallery-vertical {
        flex-direction: row;
        align-items: flex-start;
    }
}

.product-thumbnails {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.product-thumbnails::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .product-thumbnails {
        flex-direction: column;
        gap: 1rem;
        width: 70px;
        flex-shrink: 0;
        overflow-y: auto;
    }
}

.thumbnail-wrapper {
    width: 60px;
    height: 75px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 0;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

@media (min-width: 768px) {
    .thumbnail-wrapper {
        width: 100%;
        height: 90px;
    }
}

.thumbnail-wrapper.active {
    border-color: var(--text-color);
}

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

.product-main-image {
    flex-grow: 1;
    border-radius: 0;
    overflow: hidden;
    background-color: #f7f6f2;
    aspect-ratio: 4/5;
    position: relative;
}

.main-image-track {
    display: flex;
    gap: 16px;
    transition: transform 0.3s ease-out;
    width: 100%;
    height: 100%;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (min-width: 768px) {
    .product-main-image {
        aspect-ratio: auto;
        height: auto;
    }
    
    .main-image-track {
        height: auto;
    }
    
    .product-main-image img {
        height: auto;
        object-fit: initial;
    }
}

/* --- Product Info --- */
.product-info {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.product-breadcrumbs {
    font-size: 0.875rem;
    color: #888888;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-breadcrumbs a {
    color: #555555;
    transition: color 0.2s ease;
    text-decoration: none;
}

.product-breadcrumbs a:hover {
    color: var(--primary-color);
}

.product-title {
    font-family: 'Mona Sans', sans-serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.02em;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
}

.product-reviews-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #eab308;
}

.product-reviews-badge i {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.product-reviews-count {
    color: #888888;
    margin-left: 0.25rem;
    cursor: pointer;
}
.product-reviews-count:hover {
    text-decoration: underline;
}

.product-price-container {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-top: 0.5rem;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-color);
}

.product-original-price {
    font-size: 1.25rem;
    text-decoration: line-through;
    color: #aaaaaa;
}

.product-discount {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e53935;
    background-color: #ffebee;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}

.product-description {
    color: #555555;
    line-height: 1.7;
    font-size: 1rem;
}

.product-options {
    margin-top: 1rem;
}

.option-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    display: block;
}

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

.color-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 3px;
    background-clip: content-box;
}

.color-btn.selected {
    border-color: var(--primary-color);
}

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

.btn-add-to-cart {
    flex: 1;
    padding: 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    border-radius: 9999px;
    text-decoration: none;
}

.btn-wishlist {
    width: 58px;
    height: 58px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: transparent;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-wishlist:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.product-accordion {
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.accordion-item {
    border-bottom: 1px solid var(--border-color);
}

.accordion-header {
    width: 100%;
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content-inner {
    padding-bottom: 1.25rem;
    color: #555555;
    line-height: 1.6;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

/* --- Features List --- */
.feature-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #555555;
    font-size: 0.875rem;
}

.feature-item i {
    color: var(--primary-color);
    width: 20px;
    height: 20px;
}

/* --- Reviews Section --- */
.reviews-section {
    max-width: 1536px;
    margin: 4rem auto;
    padding: 0 4%;
}

.reviews-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 3rem;
}

.reviews-title {
    font-family: 'Mona Sans', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.overall-rating {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.rating-score {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.rating-stars {
    display: flex;
    color: #eab308;
}

.rating-stars i {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.reviews-count-text {
    color: #888888;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.reviews-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.review-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.reviewer-name {
    font-weight: 600;
    color: var(--text-color);
}

.review-date {
    font-size: 0.75rem;
    color: #888888;
}

.review-stars {
    display: flex;
    color: #eab308;
    margin-bottom: 0.75rem;
}

.review-stars i {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.review-body {
    color: #555555;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* --- You May Also Like Section --- */
.related-section {
    max-width: 1536px;
    margin: 3rem auto 2rem;
    padding: 0 4%;
}

.related-title {
    font-family: 'Mona Sans', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    text-align: left;
    margin-bottom: 3rem;
    letter-spacing: -0.01em;
}

@media (max-width: 640px) {
    .product-title {
        font-size: 1.6rem;
    }
    
    .product-price {
        font-size: 1.4rem;
    }
    
    .reviews-title {
        font-size: 1.75rem;
    }
    
    .related-title {
        font-size: 1.4rem;
    }
}

/* --- Image Zoom Feature --- */
.zoom-lens {
    position: absolute;
    border: 1px solid #d4d4d4;
    background: rgba(255, 255, 255, 0.4);
    cursor: crosshair;
    pointer-events: none;
    z-index: 20;
    /* Optional: dim surrounding area using box-shadow */
    /* box-shadow: 0 0 0 1000px rgba(0,0,0,0.2); */
}

.zoom-result {
    position: absolute;
    top: 0;
    left: calc(100% + 1.5rem);
    width: calc(100% - 1.5rem);
    height: 100%;
    background-color: #fff;
    background-repeat: no-repeat;
    z-index: 50;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, visibility 0.2s;
}

.zoom-result.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 1023px) {
    .zoom-lens, .zoom-result {
        display: none !important;
    }
}

/* --- Lightbox Feature --- */
.lightbox-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}
.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: fixed;
    top: 20px;
    right: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}
.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none; color: white;
    width: 50px; height: 50px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.4); }
.lightbox-btn-prev { left: -60px; }
.lightbox-btn-next { right: -60px; }
@media (max-width: 768px) {
    .lightbox-btn-prev { left: -5vw; }
    .lightbox-btn-next { right: -5vw; }
    .lightbox-close { right: 15px; top: 15px; }
}
.lightbox-trigger {
    position: absolute;
    top: 12px; left: 12px;
    width: 42px; height: 42px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 15;
    transition: transform 0.2s, background-color 0.2s;
}
.lightbox-trigger:hover {
    transform: scale(1.05);
    background-color: #fff;
}
.lightbox-trigger i {
    width: 20px; height: 20px; color: var(--text-color);
}

/* --- Custom Thin Scrollbar --- */
.custom-scrollbar::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

/* --- Review Stats Responsive Styles --- */
.review-stat-big {
    font-size: 4rem;
    font-weight: 600;
}
.review-stat-star {
    font-size: 1.75rem;
}
.review-stat-text {
    font-size: 0.95rem;
    font-weight: 500;
}
@media (max-width: 768px) {
    .review-stat-big {
        font-size: 3rem;
    }
    .review-stat-star {
        font-size: 1.5rem;
    }
    .review-stat-text {
        font-size: 0.85rem;
    }
    .reviews-summary-col {
        gap: 1rem !important;
    }
}
