/* ========================================
   KAMESETAS SINGLE PRODUCT PAGE STYLES
   ======================================== */

/**
 * Design Reference: /Nuevo estilo/ficha producto.html
 * CSS extracted from lines 101-290 of reference HTML
 */

/* ========================================
   CRITICAL FIXES - ENSURE VISIBILITY
   ======================================== */

/* Ensure full width container */
.site-content,
.pdp-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Ensure header is visible */
#masthead,
header,
.site-header {
    position: relative !important;
    z-index: 1000 !important;
}

/* ========================================
   CURSOR CONTROL (DEFAULT, NOT CROSSHAIR)
   ======================================== */

/* Single product uses NORMAL cursor, not crosshair */
body:not(.cursor-crosshair) {
    cursor: auto;
}

/* Interactive elements get pointer */
a,
button,
.size-box,
.thumb,
.add-to-cart {
    cursor: pointer !important;
}

/* ========================================
   PRODUCT DETAIL PAGE LAYOUT
   ======================================== */

/* Product Detail Page Container - GRID 2 COLUMNAS */
.pdp-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 150px);
    background: #FAFAFA; /* Fallback if var(--c-white) not defined */
    color: #0F0F0F; /* Fallback if var(--c-black) not defined */
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* ========================================
   GALLERY SECTION (LEFT COLUMN)
   ======================================== */

.pdp-gallery {
    background: #EBEBEB;
    border-right: var(--border-thick);
    padding: var(--spacing-medium);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-base);
}

/* Main Image Container */
.main-img-container {
    width: 100%;
    aspect-ratio: 1/1;
    background: #FFFFFF; /* Solid white for image visibility */
    border: 3px solid #0F0F0F; /* Fallback borders */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.main-img-container img {
    width: 90%;
    height: auto;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: var(--transition);
    display: block;
    visibility: visible;
    opacity: 1;
}

/* PDP Badge (similar to home page but positioned) */
.product-badge-pdp {
    position: absolute;
    top: 20px;
    right: -40px;
    background: var(--c-neon);
    padding: 5px 50px;
    transform: rotate(45deg);
    font-family: var(--font-display);
    font-size: var(--body-large);
    border: 2px solid var(--c-black);
    text-transform: uppercase;
    font-weight: 700;
    z-index: 10;
}

/* Gallery Thumbnails Grid */
.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem; /* Fallback spacing */
}

.thumb {
    aspect-ratio: 1/1;
    border: 1px solid #0F0F0F; /* Fallback border */
    background: #FFFFFF; /* Solid white */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    cursor: pointer;
    visibility: visible;
    opacity: 1;
}

.thumb:hover {
    border: 3px solid #D63472; /* Fallback pink */
    transform: scale(0.95);
}

.thumb img {
    width: 80%;
    height: auto;
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    display: block;
    visibility: visible;
    opacity: 1;
}

/* Extra photos counter (like HTML reference) */
.thumb-extra {
    background: var(--c-neon);
    font-family: var(--font-display);
    font-size: var(--body-small);
    text-align: center;
    color: var(--c-black);
    font-weight: 700;
}

/* ========================================
   PRODUCT INFO SECTION (RIGHT COLUMN)
   ======================================== */

.pdp-info {
    padding: 4rem 4vw; /* Fallback spacing */
    display: flex;
    flex-direction: column;
}

/* SKU / Stock Status */
.pdp-sku {
    font-family: monospace;
    font-size: 0.65rem; /* Fallback meta size */
    margin-bottom: 1rem;
    color: rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
}

/* Product Title - MASSIVE DISPLAY */
.pdp-title {
    font-family: 'Anton', sans-serif; /* Fallback display font */
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: 0.9;
    margin-bottom: 2rem;
    text-transform: uppercase;
    word-break: break-word;
    color: #0F0F0F;
}

/* Product Price - PINK ACCENT */
.pdp-price {
    font-family: 'Anton', sans-serif; /* Fallback display font */
    font-size: 3rem;
    color: #D63472; /* Fallback pink */
    margin-bottom: 2rem;
}

.pdp-price .amount {
    color: #D63472;
}

/* Product Description */
.pdp-desc {
    font-size: 1.1rem; /* Fallback large body */
    line-height: 1.5;
    font-weight: 700;
    margin-bottom: 3rem;
    max-width: 500px;
    color: #0F0F0F;
}

.pdp-desc p {
    margin-bottom: var(--spacing-base);
}

.pdp-desc p:last-child {
    margin-bottom: 0;
}

/* Label (for size selector) */
.pdp-label {
    text-transform: uppercase;
    font-weight: 700;
    font-size: var(--body-base);
    margin-bottom: var(--spacing-base);
    display: block;
}

/* ========================================
   SIZE SELECTOR (VARIATIONS)
   ======================================== */

.size-selector {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    align-items: center;
}

.size-box {
    min-width: 60px;
    height: 60px;
    padding: 0 1rem;
    border: 3px solid #0F0F0F;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Anton', sans-serif;
    font-size: 1.2rem;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    text-transform: uppercase;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
    word-break: keep-all;
}

.size-box:hover {
    background: var(--c-pink);
    color: var(--c-white);
    transform: scale(1.05);
}

.size-box.active {
    background: var(--c-neon);
    color: var(--c-black);
    border-color: var(--c-black);
    transform: scale(1.1);
}

.size-box.disabled {
    opacity: 0.3;
    text-decoration: line-through;
    pointer-events: none;
    cursor: not-allowed;
}

/* ========================================
   ADD TO CART BUTTON
   ======================================== */

.add-to-cart {
    background: #0F0F0F; /* Fallback black */
    color: #CDFF00; /* Fallback neon */
    border: none;
    font-family: 'Anton', sans-serif; /* Fallback font */
    font-size: 2.5rem;
    padding: 1.5rem;
    width: 100%;
    text-transform: uppercase;
    position: relative;
    transition: var(--transition);
    margin-top: auto;
    cursor: pointer;
    font-weight: 700;
    display: block;
    visibility: visible;
    opacity: 1;
}

.add-to-cart:hover:not(:disabled) {
    background: #D63472; /* Fallback pink */
    color: #FAFAFA; /* Fallback white */
    transform: translate(-4px, -4px);
    box-shadow: 8px 8px 0px #0F0F0F; /* Fallback black shadow */
}

.add-to-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #666666;
}

.add-to-cart.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #666666;
}

/* AJAX Loading State */
.add-to-cart.loading {
    opacity: 0.7;
    pointer-events: none;
}

.add-to-cart.loading::after {
    content: '...';
    animation: ellipsis 1.5s infinite;
}

@keyframes ellipsis {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

/* Success State */
.add-to-cart.added {
    background: var(--c-neon);
    color: var(--c-black);
}

.add-to-cart.added::before {
    content: '✓ ';
}

/* ========================================
   EXTRA TRASH (PRODUCT META)
   ======================================== */

.extra-trash {
    margin-top: var(--spacing-large);
    border-top: var(--border-thin);
    padding-top: var(--spacing-medium);
}

.trash-row {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-small) 0;
    font-size: var(--body-small);
    font-weight: 700;
    text-transform: uppercase;
}

.trash-row span:last-child {
    color: var(--c-pink);
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Tablet & Mobile (≤1024px) - 1 COLUMN STACK */
@media (max-width: 1024px) {
    .pdp-container {
        grid-template-columns: 1fr;
    }

    .pdp-gallery {
        border-right: none;
        border-bottom: var(--border-thick);
    }

    .pdp-info {
        padding: var(--spacing-medium) var(--spacing-base);
    }

    .pdp-title {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }

    .pdp-price {
        font-size: 2.5rem;
    }

    .pdp-desc {
        font-size: var(--body-base);
        max-width: 100%;
    }

    .add-to-cart {
        font-size: 2rem;
        padding: var(--spacing-base);
    }

    .size-box {
        min-width: 55px;
        height: 55px;
        padding: 0 0.75rem;
        font-size: 1rem;
    }

    .main-img-container {
        padding: var(--spacing-small);
    }

    .main-img-container img {
        width: 95%;
    }
}

/* Mobile (≤767px) - Adjustments */
@media (max-width: 767px) {
    .pdp-gallery {
        padding: var(--spacing-base);
    }

    .gallery-thumbs {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--spacing-small);
    }

    .thumb-extra {
        font-size: 0.6rem;
    }

    .pdp-info {
        padding: var(--spacing-base);
    }

    .pdp-title {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .pdp-price {
        font-size: 2rem;
    }

    .add-to-cart {
        font-size: 1.5rem;
        padding: var(--spacing-small);
    }

    .size-selector {
        gap: var(--spacing-tiny);
    }

    .size-box {
        min-width: 50px;
        height: 50px;
        padding: 0 0.5rem;
        font-size: 0.9rem;
    }

    .extra-trash {
        margin-top: var(--spacing-base);
    }

    .trash-row {
        font-size: 0.65rem;
        padding: var(--spacing-tiny) 0;
    }

    .product-badge-pdp {
        top: 10px;
        right: -30px;
        font-size: var(--body-base);
        padding: 3px 40px;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Focus visible for keyboard navigation */
.size-box:focus-visible,
.thumb:focus-visible,
.add-to-cart:focus-visible {
    outline: 3px solid var(--c-neon);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .size-box,
    .thumb,
    .add-to-cart,
    .main-img-container img {
        transition: none;
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .pdp-sku {
        color: var(--c-black);
    }

    .size-box.disabled {
        opacity: 0.5;
    }
}
