/*
===============================================================================
BIG TEXAN D2C - PRODUCT DETAIL PAGE STYLES
===============================================================================
Styles specific to the product detail page (pages/product-detail.html)
Establishes PDP patterns for all product pages.
===============================================================================
*/

/* --- PRODUCT HERO SECTION --- */
.product-hero {
    padding: 2rem 0 var(--section-spacing);
}

.product-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* --- PRODUCT GALLERY --- */
.product-gallery {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}

.gallery-main {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1rem;
    background: var(--bg-surface);
}

.gallery-main img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.gallery-main .product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--texan-yellow);
    color: var(--brand-maroon);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
}

.gallery-main .product-badge.legendary {
    background: var(--brand-maroon);
    color: var(--texan-yellow);
}

.gallery-main .product-badge.beast {
    background: #1a1a1a;
    color: var(--texan-yellow);
}

.gallery-thumbs {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: border-color var(--transition-fast);
}

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

.thumb:hover,
.thumb.active {
    border-color: var(--brand-maroon-soft);
}

/* --- PRODUCT INFO --- */
.product-info {
    padding-top: 1rem;
}

.product-title {
    font-size: var(--text-4xl);
    color: var(--brand-cream);
    margin-bottom: 0.75rem;
    line-height: 1.1;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.product-rating .stars {
    color: var(--texan-yellow);
    font-size: var(--text-lg);
    letter-spacing: -1px;
}

.product-rating .rating-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.product-rating .recommend {
    font-size: var(--text-sm);
    color: var(--color-success);
    font-weight: 600;
}

.product-description {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.product-price-block {
    margin-bottom: 1.5rem;
}

.product-price {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    color: var(--texan-yellow);
}

.product-serves {
    display: block;
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* --- SELLING SUPPORT --- */
.product-selling-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0 0 1rem;
}

.selling-chip {
    min-width: 0;
    padding: 0.85rem;
    background: rgba(255, 210, 0, 0.08);
    border: 1px solid rgba(255, 210, 0, 0.18);
    border-radius: var(--radius-sm);
}

.selling-chip-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: var(--text-xs);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--texan-yellow);
}

.selling-chip-value {
    display: block;
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--brand-cream);
    line-height: 1.35;
}

.box-snapshot {
    margin: 0 0 1.5rem;
    padding: 1.25rem;
    background: rgba(250, 243, 224, 0.06);
    border: 1px solid rgba(250, 243, 224, 0.16);
    border-radius: var(--radius-md);
}

.box-snapshot-header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    text-align: center;
}

.box-snapshot-kicker {
    font-size: var(--text-xs);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--texan-yellow);
}

.box-snapshot h2 {
    margin: 0;
    font-size: var(--text-xl);
    color: var(--brand-cream);
}

.box-contents-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.box-contents-list li {
    position: relative;
    padding-left: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.box-contents-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--texan-yellow);
}

.box-fit-note {
    margin: 0.9rem 0 0;
    color: var(--brand-cream);
    line-height: 1.55;
}

/* --- PURCHASE OPTIONS --- */
.purchase-options {
    margin-bottom: 1.5rem;
}

.subscription-availability-note {
    display: grid;
    gap: 0.35rem;
    margin: 0 0 1.5rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(255, 210, 0, 0.35);
    border-radius: var(--radius-sm);
    background: rgba(255, 210, 0, 0.08);
    color: var(--brand-cream);
}

.subscription-availability-note[hidden] {
    display: none;
}

.subscription-availability-note strong {
    color: var(--texan-yellow);
    font-family: var(--font-heading);
}

.subscription-availability-note span {
    color: var(--text-secondary);
    line-height: 1.45;
}

.subscription-availability-note a {
    color: var(--texan-yellow);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.purchase-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.purchase-option:hover {
    border-color: var(--brand-maroon-soft);
}

.purchase-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-top: 0.125rem;
    accent-color: var(--brand-maroon-soft);
}

.option-content {
    flex: 1;
}

.option-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.option-price {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    color: var(--brand-maroon-soft);
    margin-top: 0.25rem;
}

.frequency-select {
    margin-top: 0.5rem;
    padding: 0.5rem;
    font-size: var(--text-sm);
    border: var(--border-light);
    border-radius: var(--radius-sm);
}

/* --- ADD TO CART ROW --- */
.add-to-cart-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.quantity-selector .qty-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.quantity-selector .qty-btn:hover {
    background: var(--brand-cream);
}

.quantity-selector input {
    width: 50px;
    height: 44px;
    text-align: center;
    border: none;
    border-left: var(--border-light);
    border-right: var(--border-light);
    font-size: var(--text-base);
    font-weight: 600;
    -moz-appearance: textfield;
}

.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-to-cart-btn {
    flex: 1;
}

.add-to-cart-btn:disabled,
.quantity-selector input:disabled,
.quantity-selector .qty-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.product-notify-panel {
    display: grid;
    gap: 0.75rem;
    margin: 0 0 1rem;
    padding: 1rem;
    border: 1px solid rgba(255, 210, 0, 0.32);
    border-radius: var(--radius-sm);
    background: rgba(255, 210, 0, 0.08);
    color: var(--brand-cream);
}

.product-notify-panel[hidden] {
    display: none;
}

.product-notify-panel strong {
    color: var(--texan-yellow);
    font-family: var(--font-heading);
    font-size: var(--text-lg);
}

.product-notify-panel span {
    color: var(--text-secondary);
    line-height: 1.45;
}

.product-notify-form {
    display: flex;
    gap: 0.75rem;
}

.product-notify-form input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    font: inherit;
}

.product-notify-status {
    margin: 0;
    min-height: 1.2em;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.product-notify-status--success {
    color: var(--texan-yellow);
}

.product-notify-status--error {
    color: #ffb3b3;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: var(--text-lg);
}

/* --- GIFT OPTION --- */
.gift-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    font-size: var(--text-sm);
}

.gift-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-maroon-soft);
}

.gift-message-box {
    display: none;
    margin-bottom: 1rem;
    position: relative;
}

.gift-message-box textarea {
    width: 100%;
    height: 80px;
    padding: 0.75rem;
    border: var(--border-light);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    resize: none;
}

.gift-message-box .char-count {
    position: absolute;
    bottom: 0.5rem;
    right: 0.75rem;
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* --- SHIPPING INFO --- */
.shipping-info {
    padding: 1rem 0;
    border-top: var(--border-light);
    border-bottom: var(--border-light);
    margin-bottom: 1rem;
}

.shipping-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.shipping-item:last-child {
    margin-bottom: 0;
}

.shipping-item svg {
    color: var(--brand-maroon-soft);
    flex-shrink: 0;
}

/* --- SHARE ROW --- */
.share-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-surface);
    border: 0;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.share-btn:hover {
    background: var(--brand-maroon-soft);
    color: white;
}

/* --- PRODUCT DETAILS ACCORDION --- */
.product-details {
    padding: var(--section-spacing) 0;
    background: var(--bg-surface);
}

.product-details .accordion {
    max-width: 800px;
    margin: 0 auto;
}

.product-details .accordion-header:hover,
.product-details .accordion-header:focus-visible {
    background: var(--brand-cream);
    color: var(--brand-maroon);
}

.product-details .accordion-header:hover .accordion-icon,
.product-details .accordion-header:focus-visible .accordion-icon {
    color: var(--brand-maroon);
}

.product-details .accordion-body ul,
.product-details .accordion-body ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.product-details .accordion-body li {
    margin-bottom: 0.5rem;
}

.product-details .accordion-body ul ul {
    margin: 0.5rem 0;
}

/* --- CROSS-SELL SECTION --- */
.cross-sell {
    background: var(--bg-core);
}

.cross-sell .section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.cross-sell-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.cross-sell .product-card-image {
    aspect-ratio: 4/3;
}

/* --- REVIEWS SECTION --- */
.reviews-section {
    background: var(--bg-surface);
}

.reviews-section .section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.reviews-summary {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background: var(--bg-core);
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.reviews-score {
    text-align: center;
}

.score-number {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-5xl);
    color: var(--brand-maroon);
}

.reviews-score .stars {
    color: var(--texan-yellow);
    font-size: var(--text-xl);
}

.review-count {
    display: block;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.reviews-breakdown {
    max-width: 300px;
}

.breakdown-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: var(--text-sm);
}

.breakdown-row span:first-child {
    width: 30px;
    color: var(--text-secondary);
}

.breakdown-row span:last-child {
    width: 35px;
    text-align: right;
    color: var(--text-muted);
}

.breakdown-bar {
    flex: 1;
    height: 8px;
    background: var(--brand-tan);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.breakdown-fill {
    height: 100%;
    background: var(--texan-yellow);
    border-radius: var(--radius-full);
}

.reviews-list {
    max-width: 800px;
    margin: 0 auto;
}

.review-card {
    padding: 1.5rem 0;
    border-bottom: var(--border-light);
}

.review-card:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.review-header .stars {
    color: var(--texan-yellow);
}

.review-title {
    font-weight: 700;
    color: var(--text-primary);
}

.review-meta {
    display: flex;
    gap: 1rem;
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

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

.verified {
    color: var(--color-success);
}

.review-text {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- MOBILE STICKY CART --- */
.mobile-sticky-cart {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    padding: 1rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: var(--z-sticky);
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transform: translateY(100%);
    transition: transform var(--transition-base);
}

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

.sticky-price {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    color: var(--brand-maroon-soft);
}

.mobile-sticky-cart .btn {
    flex: 1;
    max-width: 200px;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .cross-sell-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .reviews-summary {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .reviews-breakdown {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .product-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-gallery {
        position: static;
    }

    .product-title {
        font-size: var(--text-3xl);
    }

    .product-price {
        font-size: var(--text-3xl);
    }

    .product-selling-strip {
        grid-template-columns: 1fr;
    }

    .box-snapshot-header {
        display: flex;
    }

    .box-snapshot h2 {
        margin-top: 0;
    }

    .box-contents-list {
        grid-template-columns: 1fr;
    }

    .add-to-cart-row {
        flex-direction: column;
    }

    .product-notify-form {
        flex-direction: column;
    }

    .quantity-selector {
        justify-content: center;
    }

    .cross-sell-grid {
        grid-template-columns: 1fr;
    }

    .mobile-sticky-cart {
        display: flex;
    }

    .review-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-thumbs {
        gap: 0.5rem;
    }

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