/**
 * KAÏA Fashion - Product Detail Page Styles
 */

.product-page {
    min-height: 100vh;
    padding: 6rem 0 2rem 0;
    background: #f8fafc;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #64748b;
}

.breadcrumb a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #6D3FEA;
}

.breadcrumb .current {
    color: #94a3b8;
}

/* Product Detail Grid */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

/* Galería */
.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image {
    width: 100%;
    aspect-ratio: 3/4;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.main-image img:hover {
    transform: scale(1.02);
}

.main-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #cbd5e1;
    background: #f1f5f9;
}

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

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    flex-shrink: 0;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #0f172a;
}

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

/* Información */
.product-info {
    padding: 1rem 0;
}

.product-subtitle {
    display: inline-block;
    font-size: 0.85rem;
    color: #6D3FEA;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.product-price-block {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
}

.old-price {
    font-size: 1.5rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.discount-badge {
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.product-short-desc {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Selector de Tallas */
.size-selector {
    margin-bottom: 2rem;
}

.size-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #0f172a;
}

.size-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.size-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
}

.size-btn:hover:not(:disabled) {
    border-color: #0f172a;
}

.size-btn.active {
    background: #0f172a;
    color: white;
    border-color: #0f172a;
}

.size-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.size-btn .out-of-stock {
    display: block;
    font-size: 0.7rem;
    color: #ef4444;
    margin-top: 0.25rem;
}

.size-hint {
    font-size: 0.85rem;
    color: #64748b;
}

/* Stock */
.stock-info {
    margin-bottom: 2rem;
}

.in-stock {
    color: #10b981;
    font-weight: 600;
}

.out-of-stock {
    color: #ef4444;
    font-weight: 600;
}

/* Botones */
.product-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.product-actions .btn {
    flex: 1;
}

/* Descripción */
.product-description {
    border-top: 1px solid #e2e8f0;
    padding-top: 2rem;
}

.product-description h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #0f172a;
}

.description-content {
    color: #475569;
    line-height: 1.8;
}

/* Productos Relacionados */
.related-products {
    margin-top: 4rem;
}

.related-products .section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #0f172a;
}

.related-products .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-products .product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.related-products .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.related-products .product-image {
    position: relative;
    padding-top: 125%;
    overflow: hidden;
}

.related-products .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-products .product-info {
    padding: 1rem;
}

.related-products .product-info h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.related-products .product-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

/* Size Guide Trigger */
.size-guide-trigger {
    color: var(--color-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.size-guide-trigger:hover {
    opacity: 0.8;
}

/* Size Guide Modal */
.size-guide-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.size-guide-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.size-guide-content {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
    overflow: hidden;
    z-index: 1;
}

.size-guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.size-guide-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #0f172a;
}

.size-guide-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
}

.size-guide-body {
    padding: 1.5rem;
}

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

.size-guide-table th {
    background: #f8fafc;
    color: #475569;
    padding: 0.75rem;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
}

.size-guide-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
}

/* Sticky Bar Mobile */
.product-sticky-bar {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .product-page {
        padding: 5rem 0 5rem 0; /* Padding inferior para dar espacio a la barra fija */
    }
    
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-gallery {
        position: static;
    }
    
    .product-title {
        font-size: 1.75rem;
    }
    
    .current-price {
        font-size: 1.5rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .related-products .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    /* Barra Sticky Inferior en Mobile */
    .product-sticky-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 0.75rem 1.25rem;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        z-index: 990;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    .sticky-bar-info {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .sticky-bar-title {
        font-size: 0.85rem;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: #0f172a;
    }

    .sticky-bar-price {
        font-size: 1.1rem;
        font-weight: 700;
        color: #0f172a;
    }

    .sticky-add-to-cart {
        padding: 0.6rem 1.25rem !important;
        font-size: 0.9rem !important;
        white-space: nowrap;
        border-radius: 8px !important;
    }

    /* Subir el botón de WhatsApp flotante para que no tape la barra sticky */
    .whatsapp-float {
        bottom: 5.5rem !important;
    }
}