/* ===== PÁGINA DE PRODUCTO - DISEÑO MINIMALISTA JYS ===== */
/* Tipografía: Plus Jakarta Sans | Estética: limpia, mucho aire, pocos bordes */

:root {
    --product-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    /* Paleta JYS: amarillo #F5C518, negro, blanco */
    --product-ink: #0a0a0a;
    --product-ink-muted: #374151;
    --product-ink-light: #6b7280;
    --product-surface: #ffffff;
    --product-surface-2: #f8f8f8;
    --product-border: #ebebeb;
    --product-border-light: #f0f0f0;
    --product-accent: #F5C518;
    --product-accent-hover: #e0b315;
    --product-accent-dark: #c9a014;
    --product-success: #059669;
    --product-danger: #b91c1c;
    --product-radius: 14px;
    --product-radius-sm: 10px;
    --product-radius-pill: 999px;
    --product-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    --product-shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.06);
    --product-ease: 0.2s ease;
}

/* Contenedor principal */
.product-page {
    font-family: var(--product-font);
    background: var(--product-surface-2);
    padding: 1.25rem 0 4rem;
}

.product-page-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ----- Breadcrumb minimalista ----- */
.product-breadcrumb {
    font-size: 0.75rem;
    color: var(--product-ink-light);
    margin-bottom: 1.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem;
    letter-spacing: 0.02em;
}

.product-breadcrumb a {
    color: var(--product-ink-light);
    text-decoration: none;
    transition: color var(--product-ease);
}

.product-breadcrumb a:hover {
    color: var(--product-accent);
}

.product-breadcrumb-sep {
    color: var(--product-border);
    user-select: none;
    font-weight: 300;
}

.product-breadcrumb-current {
    color: var(--product-ink-muted);
    font-weight: 500;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .product-breadcrumb-current { max-width: 360px; }
}

/* ----- Layout principal ----- */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 3rem;
    margin-bottom: 3.5rem;
    align-items: start;
}

/* ----- Galería (sin caja pesada) ----- */
.product-gallery {
    position: sticky;
    top: 1.25rem;
}

.gallery-main {
    position: relative;
    background: var(--product-surface);
    border-radius: var(--product-radius);
    overflow: hidden;
    margin-bottom: 0.75rem;
    box-shadow: var(--product-shadow-soft);
}

.main-image {
    width: 100%;
    height: 420px;
    object-fit: contain;
    display: block;
    transition: opacity var(--product-ease);
    background: var(--product-surface);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--product-shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--product-ink-muted);
    transition: color var(--product-ease), background var(--product-ease), box-shadow var(--product-ease);
    z-index: 2;
}

.gallery-nav:hover:not(:disabled) {
    background: var(--product-accent);
    color: var(--product-ink);
    box-shadow: 0 2px 8px rgba(245, 197, 24, 0.35);
}

.gallery-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.gallery-prev { left: 0.5rem; }
.gallery-next { right: 0.5rem; }

.discount-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: var(--product-accent);
    color: var(--product-ink);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.55rem;
    border-radius: var(--product-radius-pill);
    z-index: 1;
    letter-spacing: 0.02em;
}

.gallery-thumbnails {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.thumbnail {
    width: 52px;
    height: 52px;
    border-radius: var(--product-radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: var(--product-surface-2);
    transition: box-shadow var(--product-ease), opacity var(--product-ease);
    opacity: 0.85;
}

.thumbnail:hover {
    opacity: 1;
}

.thumbnail.active {
    box-shadow: 0 0 0 2px var(--product-accent);
    opacity: 1;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ----- Info del producto ----- */
.product-detail .product-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

/* Categoría como chip minimalista */
.product-category {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    background: var(--product-surface-2);
    color: var(--product-ink-muted);
    font-weight: 500;
    border-radius: var(--product-radius-pill);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.product-category i {
    font-size: 0.65rem;
    color: var(--product-accent);
    opacity: 0.9;
}

.product-detail .product-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--product-ink);
    line-height: 1.35;
    margin: 0;
    letter-spacing: -0.02em;
}

.product-short-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--product-ink-muted);
    margin: 0;
}

/* Precio */
.product-detail .product-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1.25rem;
    padding: 0;
    background: transparent;
    border: none;
}

.product-detail .price-original {
    font-size: 0.9375rem;
    color: var(--product-ink-light);
    text-decoration: line-through;
    font-weight: 500;
}

.product-detail .price-current {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--product-ink);
    letter-spacing: -0.02em;
}

.product-detail .price-savings {
    font-size: 0.8125rem;
    color: var(--product-success);
    font-weight: 600;
}

/* Stock (una sola línea sutil) */
.product-stock {
    padding: 0.6rem 0;
    font-size: 0.875rem;
    border-top: 1px solid var(--product-border-light);
}

.stock-available {
    color: var(--product-success);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

.stock-unavailable {
    color: var(--product-ink-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

.stock-unavailable i {
    color: var(--product-danger);
}

/* Cantidad y acciones */
.product-detail .product-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quantity-selector label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--product-ink-muted);
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--product-border);
    border-radius: var(--product-radius-sm);
    overflow: hidden;
    background: var(--product-surface);
}

.quantity-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: var(--product-ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--product-ease);
}

.quantity-btn:hover:not(:disabled) {
    background: var(--product-surface-2);
}

.quantity-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#quantity {
    width: 48px;
    height: 38px;
    border: none;
    border-left: 1px solid var(--product-border);
    border-right: 1px solid var(--product-border);
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--product-ink);
    background: var(--product-surface);
}

#quantity:focus {
    outline: none;
}

/* Botones: primario sólido, secundario outline */
.product-detail .btn {
    padding: 0.8rem 1.35rem;
    border-radius: var(--product-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--product-font);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: background var(--product-ease), color var(--product-ease), border-color var(--product-ease), transform 0.15s ease;
}

.product-detail .btn:active {
    transform: scale(0.98);
}

.product-detail .btn-primary {
    background: var(--product-accent);
    color: var(--product-ink);
    border: none;
}

.product-detail .btn-primary:hover {
    background: var(--product-accent-hover);
    color: var(--product-ink);
}

.product-detail .btn-secondary {
    background: transparent;
    color: var(--product-ink);
    border: 1.5px solid var(--product-ink);
}

.product-detail .btn-secondary:hover {
    background: var(--product-ink);
    color: var(--product-surface);
}

.product-detail .btn-disabled {
    background: var(--product-surface-2);
    color: var(--product-ink-light);
    cursor: not-allowed;
    border: 1px solid var(--product-border);
}

.product-detail .btn-disabled i {
    color: var(--product-ink-light);
}

/* Características - discretas */
.product-features {
    padding: 0;
    background: transparent;
    border: none;
}

.product-features h3 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--product-ink-light);
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.product-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--product-ink-muted);
}

.product-features li i {
    color: var(--product-success);
    font-size: 0.65rem;
    flex-shrink: 0;
}

/* Info adicional - una fila en desktop, iconos sutiles */
.product-additional {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1.25rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--product-border-light);
}

@media (min-width: 560px) {
    .product-additional {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem 1.5rem;
    }
}

.additional-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--product-ink-light);
}

.additional-item i {
    color: var(--product-ink-light);
    font-size: 0.8rem;
    width: 1rem;
    text-align: center;
    opacity: 0.9;
}

/* ----- Tabs minimalistas (sin caja) ----- */
.product-description-section {
    background: transparent;
    border-radius: 0;
    border: none;
    overflow: visible;
    margin-bottom: 3.5rem;
}

.description-tabs {
    display: flex;
    border-bottom: 1px solid var(--product-border);
    padding: 0;
    gap: 0;
}

.tab-btn {
    padding: 0.9rem 1.1rem 0.85rem;
    background: none;
    border: none;
    font-family: var(--product-font);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--product-ink-light);
    cursor: pointer;
    transition: color var(--product-ease), border-color var(--product-ease);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: var(--product-ink);
}

.tab-btn.active {
    color: var(--product-ink);
    border-bottom-color: var(--product-accent);
}

.tab-content {
    padding: 0;
}

.tab-pane {
    display: none;
    padding: 1.75rem 0 0.5rem;
}

.tab-pane.active {
    display: block;
}

.description-content {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--product-ink-muted);
}

.specifications-content,
.reviews-content {
    font-size: 0.9375rem;
    color: var(--product-ink-muted);
    line-height: 1.6;
}

.description-empty {
    color: var(--product-ink-light);
    font-style: italic;
    margin: 0;
}

/* ----- Productos relacionados ----- */
.related-products {
    margin-top: 0.5rem;
}

.related-products-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--product-ink-muted);
    margin-bottom: 1.25rem;
    letter-spacing: 0.01em;
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-gallery {
        position: static;
    }

    .main-image {
        height: 340px;
    }
}

@media (max-width: 768px) {
    .product-page {
        padding: 1rem 0 3rem;
    }

    .product-detail .product-title {
        font-size: 1.35rem;
    }

    .product-detail .price-current {
        font-size: 1.5rem;
    }

    .description-tabs {
        overflow-x: auto;
        padding: 0;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        flex-shrink: 0;
        padding: 0.75rem 0.9rem;
        font-size: 0.8125rem;
    }

    .tab-pane {
        padding: 1.25rem 0;
    }
}

@media (max-width: 480px) {
    .product-breadcrumb {
        font-size: 0.7rem;
    }

    .product-breadcrumb-current {
        max-width: 140px;
    }

    .quantity-selector {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-image {
        height: 280px;
    }

    .thumbnail {
        width: 46px;
        height: 46px;
    }

    .product-additional {
        flex-direction: column;
    }
}

/* Compatibilidad breadcrumbs en otras páginas */
.breadcrumbs {
    background: var(--product-surface-2);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--product-border-light);
}

.breadcrumb {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 0.35rem;
    color: var(--product-ink-light);
}

.breadcrumb-item a {
    color: var(--product-accent);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--product-ink-muted);
}
