/* Mobile First Design System */
:root {
    --primary-color: #000;
    --secondary-color: #666;
    --border-color: #eee;
    --bg-light: #f9f9f9;
    --font-heading: 'Archivo', sans-serif;
    --font-body: 'Inter', sans-serif;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 40px;
}

/* Base Layout (Mobile) */
.product-page-container {
    padding: 0 1rem 1rem 1rem;
    max-width: 1400px;
    margin: 5rem auto 2rem auto;
    font-family: var(--font-body);
    width: 100%;
    overflow-x: hidden;
    /* Prevent horizontal overflow from children */
    box-sizing: border-box;
}

/* ... existing code ... */



.breadcrumb-container {
    font-size: 0.7rem;
    color: var(--secondary-color);
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

.breadcrumb-container a {
    text-decoration: underline;
    color: var(--secondary-color);
    font-weight: 500;
}

.breadcrumb-container span {
    color: var(--primary-color);
    font-weight: 700;
}

.product-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    /* Reduced from 4rem for mobile */
}

/* Gallery Section (Mobile) */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: auto;
    max-height: none;
    background-color: var(--bg-light);
    border-radius: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.sold-out-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    font-weight: bold;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

/* Mobile Thumbnails: Horizontal Scroll */
.thumbnails-wrapper {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
    /* Firefox */
}

.thumbnails-wrapper::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.thumbnail {
    width: 65px;
    height: 85px;
    object-fit: cover;
    border-radius: 0;
    /* Sharp edges */
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.2s;
    flex-shrink: 0;
}

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

/* Product Info Section */
.product-details {
    display: flex;
    flex-direction: column;
}

.product-header {
    margin-bottom: 0.5rem;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -1.5px;
}

.product-rating-meta {
    margin-bottom: 0.75rem;
}

.rating-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: #000;
    font-weight: 500;
}

.stars {
    color: #000;
    font-size: 1.1rem;
}

.rating-text {
    color: #000;
    text-decoration: underline;
    font-weight: 500;
}

.product-price {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #000;
}

/* Size Selection */
.product-selection {
    margin-bottom: 1rem;
}

.size-options {
    display: flex;
    gap: 12px;
    margin-bottom: 1rem;
}

.size-option {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    background: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.2s;
}

.size-option:hover {
    border-color: #000;
}

.size-option.selected {
    border-color: #000;
    border-width: 2px;
}

/* Sold Out Size Styling */
.size-option.sold-out {
    opacity: 0.3;
    cursor: not-allowed;
    position: relative;
    pointer-events: none;
    background-color: #f5f5f5;
}

.size-option.sold-out::before,
.size-option.sold-out::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    width: 80%;
    height: 1px;
    background: #666;
    transform: translateY(-50%) rotate(45deg);
}

.size-option.sold-out::after {
    transform: translateY(-50%) rotate(-45deg);
}

.warning-text {
    font-size: 0.8rem;
    color: #e53935;
    margin: 0;
    line-height: 1;
}

/* Actions */
.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.btn-add-cart {
    flex: 1;
    background: black;
    color: white;
    border: none;
    padding: 20px;
    font-weight: 800;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-add-cart:active {
    opacity: 0.8;
}

.btn-fav-box {
    width: 64px;
    height: 64px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-fav-box:hover {
    border-color: #000;
}

/* Accordion */
.accordion-container {
    border-top: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

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

.accordion-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--primary-color);
    cursor: pointer;
    text-transform: uppercase;
}

.trigger-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.trigger-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out, opacity 0.3s ease-in-out;
    color: var(--secondary-color);
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0;
}

.accordion-item.active .accordion-panel {
    max-height: 300px;
    /* Much closer to actual text height to avoid timing gaps */
    padding-bottom: 1.5rem;
    opacity: 1;
}

.accordion-panel p {
    margin: 0;
}

.accordion-item.no-panel.active .accordion-panel {
    display: none;
}

.accordion-item.active .icon {
    transform: rotate(45deg);
    /* + becomes x, very smooth */
}

.icon {
    transition: transform 0.3s ease;
    font-size: 1.4rem;
    line-height: 1;
    display: inline-block;
}

/* Collection Card */
.collection-link-card img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
}

.collection-link-card:hover img {
    transform: translateY(-2px);
}

/* Extra Content */
.extra-content-wrapper {
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.influencer-section h2,
.related-products-section h2 {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.influencer-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    /* Mobile: 2 col */
    gap: 15px;
}

.influencer-item img {
    width: 100%;
    border-radius: 8px;
    aspect-ratio: 4/5;
    object-fit: cover;
}

.spotify-section iframe {
    border-radius: 12px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}


/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    cursor: pointer;
}

.size-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.size-table th,
.size-table td {
    padding: 10px;
    border: 1px solid #eee;
    text-align: center;
}

.size-table th {
    background-color: #f9f9f9;
    font-weight: 600;
}

/* ------------------------------------------------------------- */
/* DESKTOP STYLES (Min-width: 992px) */
/* ------------------------------------------------------------- */


/* Loop Fix */
html,
body {
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

/* Related Products Redesign */
.related-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 3/4;
    /* Dikdortgen format (Portrait) */
}

.related-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.related-image-wrapper {
    width: 100%;
    height: 100%;
}

.related-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Hover Effects */
.related-item:hover .related-info-overlay {
    opacity: 1;
}

.related-item:hover .related-image {
    transform: scale(1.05);
}

.related-name {
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.related-price {
    font-size: 0.9rem;
    margin-top: 5px;
    font-weight: 500;
}

/* Other Collections Section */
.collection-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.collection-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
    /* Wider 16:9 format */
}

.collection-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.collection-image-wrapper {
    width: 100%;
    height: 100%;
}

.collection-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.collection-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 50%);
    color: white;
    opacity: 1;
    /* Always visible */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Bottom align */
    align-items: flex-start;
    /* Left align */
}

.collection-card:hover .collection-image {
    transform: scale(1.05);
}

.collection-name {
    font-size: 1.5rem;
    font-weight: 900;
    font-family: var(--font-heading);
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

@media (min-width: 992px) {
    .product-page-container {
        padding-top: 0;
        max-width: 1600px;
        /* Widened for edge-to-edge feel */
        margin: 5.1rem auto 2rem auto;
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .product-content-wrapper {
        display: grid;
        grid-template-columns: 1fr 450px;
        /* Space elements to the edges */
        gap: 5vw;
        align-items: stretch;
        max-width: 100%;
    }

    /* Gallery Grid for Desktop */
    .product-gallery {
        display: grid;
        grid-template-columns: minmax(0, 600px) 65px;
        /* Fixed max width for image column */
        gap: 15px;
        /* Consistent gap between image and thumbnails */
        align-items: stretch;
        justify-content: start;
        /* Push entire gallery to the left */
        position: sticky;
        top: 20px;
        height: auto;
    }

    /* Move thumbnails to the right column */
    .thumbnails-wrapper {
        flex-direction: column;
        /* Vertical list */
        overflow-y: auto;
        max-height: 80vh;
        overflow-x: hidden;
        /* order: -1 removed to kep it naturally after main image */
        padding-left: 5px;
        /* Scrollbar spacing */
    }

    .thumbnail {
        width: 100%;
        /* Full width of the 100px column */
        height: auto;
        aspect-ratio: 3/4;
    }

    .main-image-wrapper {
        width: 100%;
        max-width: 600px;
        height: 100%;
        max-height: none;
        margin: 0;
        border-radius: 0;
        aspect-ratio: auto;
        overflow: hidden;
    }

    .stock-status-container {
        width: 100%;
        max-width: 400px;
    }

    .main-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
    }

    /* Right Column Sticky */
    .product-details {
        position: sticky;
        top: 40px;
        justify-self: end;
        /* Pushed to the right edge of its column */
        width: 100%;
        max-width: 450px;
    }

    .product-title {
        font-size: 2.5rem;
    }

    .influencer-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        /* 4 items per row on desktop */
    }

    .related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .collection-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Desktop: 2 large cols */
    }

}

/* ------------------------------------------------------------- */
/* Gallery Navigation & Animation */
/* ------------------------------------------------------------- */

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    /* translucent white */
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.nav-btn svg {
    width: 20px;
    height: 20px;
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

@keyframes galleryFade {
    0% {
        opacity: 0.7;
        transform: scale(0.99);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-anim {
    animation: galleryFade 0.25s ease-out forwards;
}

/* ------------------------------------------------------------- */
/* Reviews Section (Interactive 3D Cards) */
/* ------------------------------------------------------------- */

/* Reviewer Link Styles */
.reviewer-name-link,
.reviewer-header-link {
    text-decoration: none;
    color: inherit;
}

.reviewer-name-link:hover .reviewer-name,
.reviewer-header-link:hover .reviewer-name-center {
    text-decoration: underline;
}

.reviews-section {
    margin-top: 4rem;
    scroll-margin-top: 30vh;
    /* Centers section when scrolled via anchor */
}

.reviews-section h2 {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.reviews-list {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.reviews-list::-webkit-scrollbar {
    height: 6px;
}

.reviews-list::-webkit-scrollbar-track {
    background: transparent;
}

.reviews-list::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 10px;
}

/* 3D Card Base */
.review-card-wrapper {
    flex: 0 0 280px;
    height: 380px;
    perspective: 1000px;
    cursor: pointer;
}

.review-card {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    border-radius: 12px;
}

.review-card-wrapper.flipped .review-card {
    transform: rotateY(180deg);
}

.review-card-front,
.review-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Front Face Styles */
.review-card-front {
    background: #fdfdfd;
}

.review-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-overlay-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 80%);
    color: white;
}

.reviewer-name {
    font-weight: 700;
    font-size: 1rem;
}

.reviewer-meta {
    font-size: 0.8rem;
    opacity: 0.9;
}

.switch-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.3));
    z-index: 5;
}

/* Back Face & Text-Only Styles */
.review-card-back,
.text-review-only {
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    text-align: center;
}

.review-card-back {
    transform: rotateY(180deg);
}

.reviewer-header {
    margin-bottom: 20px;
}

.reviewer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 10px;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.reviewer-name-center {
    font-weight: 800;
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.review-rating {
    margin-bottom: 15px;
    color: #000;
    font-size: 0.9rem;
}

.star {
    opacity: 0.3;
}

.star.filled {
    opacity: 1;
    color: #000;
}

.review-comment,
.review-comment-preview {
    font-size: 0.9rem;
    color: var(--secondary-color);
    line-height: 1.5;
    margin-bottom: 30px;
    flex-grow: 1;
    overflow-y: auto;
}

.culture-footer {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.no-reviews {
    padding: 2rem;
    color: var(--secondary-color);
    background: var(--bg-light);
    border-radius: 8px;
    width: 100%;
    text-align: center;
}

@media (min-width: 992px) {
    .reviews-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        overflow-x: visible;
        padding-bottom: 0;
    }
}

/* ------------------------------------------------------------- */
/* Stock Status Bar */
/* ------------------------------------------------------------- */

.stock-status-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    /* No vertical spacing */
    padding: 0;
}

.stock-status-text {
    font-size: 0.65rem;
    font-weight: 400;
    margin: 0;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    color: var(--secondary-color);
}

.stock-bar-bg {
    flex-grow: 1;
    height: 3px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.stock-status-bar {
    height: 100%;
    width: 0;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s;
    border-radius: 10px;
}

/* Colors and Widths */
.stock-high {
    background-color: #28a745;
}

.stock-medium {
    background-color: #ffc107;
}

.stock-low {
    background-color: #dc3545;
}

.stock-critical {
    background-color: #dc3545;
    animation: criticalBlink 1s infinite alternate;
}

@keyframes criticalBlink {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.4;
    }
}

@keyframes criticalBlink {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.4;
    }
}

/* Sniffer Card Interactive */
.sniffer-card-interactive {
    margin-top: 1rem;
    cursor: pointer;
    width: 100%;
}

.sniffer-image-wrapper {
    position: relative;
    width: 100%;
    border-radius: 12px;
    /* Soft edges as requested most recently */
    overflow: hidden;
}

.sniffer-image-wrapper img {
    width: 100%;
    display: block;
    transition: filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sniffer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.sniffer-text {
    color: #fff;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
}

.sniffer-card-interactive.active .sniffer-image-wrapper img {
    filter: brightness(0.3) grayscale(0.2);
}

.sniffer-card-interactive.active .sniffer-overlay {
    background: rgba(0, 0, 0, 0.2);
    opacity: 1;
}

@media (min-width: 992px) {
    .stock-status-container {
        width: 100%;
        max-width: 400px;
    }
}