:root {
    --cream: #FDFBF7;
    --cream-dark: #F5F0E8;
    --gold: #C9A962;
    --gold-light: #E8D5A3;
    --gold-dark: #A68B3F;
    --charcoal: #1A1A1A;
    --text-secondary: #6B6B6B;
    --white: #FFFFFF;
    --shadow-sm: 0 2px 8px rgba(26,26,26,0.06);
    --shadow-md: 0 8px 32px rgba(26,26,26,0.12);
    --shadow-lg: 0 24px 64px rgba(26,26,26,0.18);
    --radius: 16px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--cream);
    color: var(--charcoal);
    padding: 40px 20px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--charcoal);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 40px;
}

/* ===== GRID: 3 columnas, imagen se achica al crecer ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .product-grid { grid-template-columns: 1fr; }
}

/* ===== PRODUCT CARD ===== */
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(201,169,98,0.1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(201,169,98,0.3);
}

/* Imagen con aspect-ratio fijo: se achica proporcionalmente al crecer el grid */
.card-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--cream-dark);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    display: block;
}

.product-card:hover .card-image {
    transform: scale(1.05);
}

/* Badges */
.card-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 3;
}

.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
}

.badge-women { background: rgba(201,169,98,0.92); color: white; }
.badge-men   { background: rgba(45,45,45,0.88); color: white; }
.badge-unisex{ background: rgba(107,107,107,0.88); color: white; }
.badge-sale  { background: #C0392B; color: white; }

/* Hover overlay: colores, tallas, precio */
.card-hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26,26,26,0.92) 0%, rgba(26,26,26,0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 20px 20px;
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}

.product-card:hover .card-hover-overlay {
    opacity: 1;
}

.hover-colors {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.hover-color-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.6);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.hover-sizes {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.hover-size-pill {
    padding: 3px 10px;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 4px;
    font-size: 11px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.hover-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--gold-light);
}

.hover-price .original {
    text-decoration: line-through;
    color: rgba(255,255,255,0.45);
    font-size: 14px;
    margin-right: 8px;
    font-weight: 400;
}

/* Card body */
.card-body {
    padding: 20px;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 4px;
}

.card-tag {
    font-size: 11px;
    color: var(--gold-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 14px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--charcoal);
}

.card-price .original-price {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 13px;
    margin-right: 6px;
    font-weight: 400;
}

.card-price .sale-price { color: #C0392B; }

.card-btn {
    padding: 8px 18px;
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold-dark);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-btn:hover {
    background: var(--gold);
    color: white;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.page-btn {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(201,169,98,0.25);
    background: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    text-decoration: none;
}

.page-btn:hover, .page-btn.active {
    background: var(--gold);
    color: white;
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(201,169,98,0.3);
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26,26,26,0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    animation: fadeIn 0.35s ease;
}

.modal-overlay.active { display: flex; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-box {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 960px;
    max-height: 90vh;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* X para cerrar (esquina) */
.modal-close-x {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(201,169,98,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
    color: var(--charcoal);
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.modal-close-x:hover {
    background: var(--gold);
    color: white;
    transform: rotate(90deg);
    border-color: var(--gold);
}

/* Botón volver */
.modal-back-btn {
    position: absolute;
    top: 18px;
    left: 18px;
    padding: 8px 18px;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(201,169,98,0.25);
    border-radius: 50px;
    cursor: pointer;
    z-index: 10;
    font-size: 13px;
    font-weight: 600;
    color: var(--charcoal);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.modal-back-btn:hover {
    background: var(--gold);
    color: white;
    border-color: var(--gold);
}

/* Izquierda: imagen */
.modal-left {
    position: relative;
    background: var(--cream-dark);
    overflow: hidden;
    min-height: 500px;
}

.modal-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Derecha: detalles */
.modal-right {
    padding: 44px 40px;
    overflow-y: auto;
    max-height: 90vh;
}

.modal-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.modal-badge {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-badge-women { background: rgba(201,169,98,0.15); color: var(--gold-dark); }
.modal-badge-men   { background: rgba(45,45,45,0.1); color: var(--charcoal); }
.modal-badge-unisex{ background: rgba(107,107,107,0.1); color: var(--text-secondary); }
.modal-badge-sale  { background: rgba(192,57,43,0.1); color: #C0392B; }

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 10px;
    line-height: 1.15;
}

/* Tags: Floral, Tejido, Moderno */
.modal-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.modal-tag {
    padding: 4px 12px;
    background: var(--cream-dark);
    border-radius: 6px;
    font-size: 12px;
    color: var(--gold-dark);
    font-weight: 500;
}

.modal-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 28px;
}

.modal-section { margin-bottom: 24px; }

.modal-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
}

/* Tallas */
.size-options { display: flex; gap: 10px; flex-wrap: wrap; }

.size-option {
    width: 48px;
    height: 48px;
    border: 2px solid rgba(201,169,98,0.2);
    background: var(--white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--charcoal);
    font-family: 'Inter', sans-serif;
}

.size-option:hover, .size-option.active {
    border-color: var(--gold);
    background: rgba(201,169,98,0.08);
    color: var(--gold-dark);
}

/* Colores */
.color-options { display: flex; gap: 12px; }

.color-option {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.color-option:hover, .color-option.active {
    border-color: var(--gold);
    transform: scale(1.15);
}

.color-option.active::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 700;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Fatpack */
.fatpack-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--cream-dark);
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.fatpack-option:hover, .fatpack-option.active {
    border-color: var(--gold);
    background: rgba(201,169,98,0.06);
}

.fatpack-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gold);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--gold);
    transition: var(--transition);
}

.fatpack-option.active .fatpack-check {
    background: var(--gold);
    color: white;
}

.fatpack-info { flex: 1; }

.fatpack-title { font-size: 14px; font-weight: 600; color: var(--charcoal); }

.fatpack-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* Precio */
.modal-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 28px 0 8px;
}

.modal-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--charcoal);
}

.modal-price .original {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 20px;
    font-weight: 400;
}

.modal-price .sale { color: #C0392B; }

/* Botones */
.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-add-cart {
    flex: 1;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(201,169,98,0.4);
}

.btn-wishlist {
    padding: 16px 20px;
    background: var(--cream-dark);
    border: 1px solid rgba(201,169,98,0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 20px;
    color: var(--charcoal);
}

.btn-wishlist:hover {
    background: var(--gold);
    color: white;
    border-color: var(--gold);
}

/* Responsive modal */
@media (max-width: 800px) {
    .modal-box { grid-template-columns: 1fr; max-width: 500px; }
    .modal-left { min-height: 320px; }
    .modal-right { padding: 32px 24px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .product-grid { grid-template-columns: 1fr; }
}