/* ========================
   PREMIUM PRODUCT DETAIL PAGE
   ======================== */

.product-detail-container {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-xl);
}

.product-gallery {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.product-main-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4/5;
    object-fit: cover;
    background-color: var(--color-ivory-dark);
}

.product-info-column {
    position: sticky;
    top: 8rem;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 12px;
}

.product-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: var(--color-charcoal);
}

.product-subtitle {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.product-price {
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--color-charcoal);
    margin-bottom: 1.5rem;
    font-feature-settings: "pnum" on, "lnum" on;
}

/* Add to Cart Section */
.add-to-cart-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.quantity-wrapper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: white;
}

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

.qty-btn:hover {
    background: rgba(0,0,0,0.03);
}

.qty-input {
    width: 50px;
    height: 44px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    font-family: var(--font-sans);
    font-size: 1rem;
    -moz-appearance: textfield;
    appearance: textfield;
}

.add-btn {
    flex: 1;
    background-color: var(--color-charcoal);
    color: white;
    border: none;
    padding: 0 2rem;
    height: 44px; /* Matches input height */
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.2, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.add-btn:hover {
    background-color: var(--color-gold);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Tabs Redesign */
.product-tabs-container {
    margin-top: 4rem;
}

.tabs {
    border-bottom: 1px solid rgba(0,0,0,0.06);
    gap: 2rem;
}

.tab-btn {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    padding-bottom: 1rem;
    color: var(--color-charcoal-light);
    opacity: 0.6;
}

.tab-btn.active {
    opacity: 1;
    color: var(--color-charcoal);
}

.tab-btn.active::after {
    height: 1px;
    bottom: 0;
    background-color: var(--color-charcoal);
}

/* --- Added from product.ejs refactoring --- */

.product-image-container {
    aspect-ratio: 4/5;
    overflow: hidden;
    background: var(--color-ivory-dark);
}

.product-image-display {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-thumbnails {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.thumb-item {
    width: 80px;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid transparent;
    transition: border-color 0.2s;
}

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

/* Stock Alert */
.stock-alert-box {
    background: var(--color-ivory-dark);
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-lg);
}

/* Sticky CTA */
.sticky-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem 0;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 999;
    border-top: 1px solid var(--color-border);
}

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

.sticky-cta-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sticky-cta-product {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sticky-cta-thumb {
    width: 40px;
    height: 50px;
    object-fit: cover;
}

/* Reviews & QA */
.reviews-section {
    max-width: 800px;
    margin: 0 auto;
}

.review-item {
    border-bottom: 1px solid var(--color-border);
    padding: 1.5rem 0;
}

.star-rating i {
    cursor: pointer;
    transition: color 0.2s;
}

.qa-list {
    margin-top: 1rem;
}

.qa-item {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1.5rem;
}

.qa-answer {
    color: var(--color-text-muted);
    margin-left: 1rem;
    border-left: 2px solid var(--color-gold);
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.btn-ghost {
    background: transparent;
    color: var(--color-charcoal);
    border: 1px solid transparent;
}
.btn-ghost:hover {
    background: var(--color-ivory-dark);
}
