/* ===== PRODUCT DETAIL PAGE ===== */
.product-detail {
    padding: 48px 0 80px;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

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

.main-image-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: var(--jet-black);
    aspect-ratio: 1/1;
}

.main-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.discount-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--soft-gold);
    color: var(--jet-black);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
}

.gallery-thumbs {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.thumb {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    background: var(--warm-beige);
    cursor: pointer;
    padding: 0;
    transition: border-color 0.2s;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumb.active {
    border-color: var(--soft-gold);
}

/* Product Info */
.product-info {
    padding-top: 8px;
}

.product-brand {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--soft-gold);
    margin-bottom: 8px;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--white);
    /* was var(--charcoal-grey) — too dark on dark bg */
    margin-bottom: 16px;
}

.product-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    font-style: italic;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.current-price {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--charcoal);
}

.original-price {
    font-size: 1.25rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-description {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* Selectors */
.selector-group {
    margin-bottom: 24px;
}

.selector-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 12px;
}

.selector-group label span {
    font-weight: 400;
    color: var(--gold);
}

.size-guide-link {
    font-size: 0.75rem;
    color: var(--gold);
    text-decoration: underline;
}

.color-options {
    display: flex;
    gap: 10px;
}

.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: transparent;
    cursor: pointer;
    padding: 2px;
    transition: transform 0.2s;
}

.color-btn span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: var(--gold);
}

.color-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.size-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.size-btn {
    min-width: 48px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--charcoal);
    cursor: pointer;
    transition: all 0.2s;
}

.size-btn:hover:not(.disabled) {
    border-color: var(--gold);
}

.size-btn.active {
    background: var(--charcoal);
    color: var(--midnight);
    border-color: var(--charcoal);
}

.size-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

.stock-hint {
    font-size: 0.75rem;
    color: var(--gold);
    margin-top: 8px;
}

/* Cart */
.cart-form {
    margin-top: 32px;
}

.cart-form-row {
    display: flex;
    gap: 12px;
    margin-top: 0;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    width: 44px;
    height: 48px;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--charcoal);
    cursor: pointer;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: var(--border);
}

.quantity-selector input {
    width: 50px;
    height: 48px;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    background: transparent;
    color: var(--charcoal);
}

.btn-add-cart {
    flex: 1;
    height: 48px;
    background: var(--soft-gold);
    color: var(--jet-black);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.btn-add-cart:hover:not(:disabled) {
    background: var(--white);
    color: var(--jet-black);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35);
    transform: translateY(-1px);
}

.btn-add-cart:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

.btn-add-cart:disabled {
    background: var(--obsidian);
    color: var(--text-muted);
    cursor: not-allowed;
}

.btn-soldout {
    width: 100%;
    height: 48px;
    background: var(--obsidian);
    color: var(--text-muted);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: not-allowed;
    margin-top: 32px;
}

.trust-badges {
    display: flex;
    gap: 24px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.badge svg {
    color: var(--gold);
    flex-shrink: 0;
}

/* Tabs */
.product-tabs {
    margin-top: 40px;
}

.tabs-header {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.tab-btn {
    padding: 12px 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--charcoal);
}

.tab-btn.active {
    color: var(--charcoal);
    border-bottom-color: var(--gold);
}

.tab-panel {
    display: none;
}

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

.details-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--charcoal);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.detail-value {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Reviews */
.reviews-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.rating-avg {
    font-size: 2rem;
    font-weight: 600;
    color: var(--charcoal);
}

.rating-stars {
    color: var(--gold);
    font-size: 1.25rem;
}

.review-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-card {
    padding: 20px;
    background: var(--obsidian);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.reviewer-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--charcoal);
}

.review-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.review-card .review-stars {
    color: var(--gold);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.review-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.no-reviews {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    font-style: italic;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--midnight);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    position: relative;
    border: 1px solid var(--border);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--charcoal);
    cursor: pointer;
}

.modal-content h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--charcoal);
}

.modal-note {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.size-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.size-table th,
.size-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid var(--border);
}

.size-table th {
    background: var(--obsidian);
    font-weight: 600;
    color: var(--charcoal);
}

.size-table td {
    color: var(--text-muted);
}

/* Sticky Cart */
.sticky-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: auto;
    width: auto;
    min-width: 320px;
    max-width: 400px;
    background: var(--midnight);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.sticky-cart.visible {
    transform: translateY(0);
}

.sticky-cart-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.sticky-product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.sticky-product-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--charcoal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.sticky-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gold);
}

.btn-sticky-cart {
    height: 44px;
    padding: 0 24px;
    background: var(--soft-gold);
    color: var(--jet-black);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-sticky-cart:hover:not(:disabled) {
    background: var(--white);
    color: var(--jet-black);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35);
    transform: translateY(-1px);
}

.btn-sticky-cart:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

.btn-sticky-cart:disabled {
    background: var(--obsidian);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* ===== CUSTOMIZATION SECTION ===== */
.customization-section {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--obsidian);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.customization-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.customization-icon {
    color: var(--gold);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.customization-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--charcoal);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.customization-prompt {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.6;
    padding: 10px 12px;
    background: rgba(212, 175, 55, 0.07);
    border-left: 3px solid var(--gold);
    border-radius: 0 6px 6px 0;
}

.customization-textarea {
    width: 100%;
    min-height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s;
    outline: none;
}

.customization-textarea::placeholder {
    color: var(--text-muted);
}

.customization-textarea:focus {
    border-color: var(--gold);
}

.upload-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.upload-btn:hover {
    border-color: var(--gold);
    color: var(--charcoal);
}

.upload-btn svg {
    flex-shrink: 0;
}

.upload-filename-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.upload-filename-text.has-file {
    color: var(--gold);
}

/* Responsive */
@media (max-width: 900px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .product-gallery {
        position: static;
    }

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

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

    .main-image-wrapper {
        aspect-ratio: 1;
    }

    .product-tabs {
        margin-top: 32px;
    }

    .tabs-header {
        gap: 16px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .tab-btn {
        white-space: nowrap;
        padding: 10px 0;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .product-detail {
        padding: 24px 0 48px;
    }

    .cart-form {
        margin-top: 20px;
    }

    .cart-form-row {
        flex-direction: column;
        gap: 12px;
    }

    .quantity-selector {
        width: 100%;
        justify-content: center;
        height: 52px;
    }

    .qty-btn {
        width: 56px;
        height: 52px;
    }

    .qty-input {
        height: 52px;
        font-size: 1rem;
        font-weight: 600;
    }

    .btn-add-cart {
        width: 100%;
        height: 52px;
        min-height: 52px;
        font-size: 0.9375rem;
        font-weight: 600;
    }

    .trust-badges {
        flex-direction: column;
        gap: 12px;
    }

    .thumb {
        width: 56px;
        height: 56px;
    }

    .sticky-cart {
        left: 12px;
        right: 12px;
        bottom: 12px;
        min-width: auto;
        max-width: none;
        padding: 12px 16px;
    }

    .sticky-cart-content {
        gap: 12px;
    }

    .sticky-product-name {
        max-width: 140px;
        font-size: 0.8125rem;
    }

    .sticky-price {
        font-size: 1rem;
    }

    .btn-sticky-cart {
        height: 40px;
        padding: 0 16px;
        font-size: 0.8125rem;
    }

    .size-btn {
        min-width: 44px;
        height: 40px;
        padding: 0 12px;
        font-size: 0.8125rem;
    }

    .color-btn {
        width: 36px;
        height: 36px;
    }

    .modal-content {
        padding: 24px 20px;
        margin: 16px;
    }

    .size-table th,
    .size-table td {
        padding: 8px;
        font-size: 0.8125rem;
    }

    .review-card {
        padding: 16px;
    }

    .rating-avg {
        font-size: 1.5rem;
    }

    .product-description {
        font-size: 0.875rem;
        margin-bottom: 24px;
    }

    .selector-group {
        margin-bottom: 20px;
    }

    .customization-section {
        padding: 16px;
    }

    .upload-row {
        flex-direction: column;
        align-items: flex-start;
    }
}