/* =========================================================
   MEDITERRÁNEO — Hoja de estilos principal
   ========================================================= */

/* ---------- VARIABLES ---------- */
:root {
    --bg-dark: #0a0a0a;
    --bg-light: #f5f5f0;
    --text-dark: #1a1a1a;
    --text-light: #f5f5f0;
    --accent: #d4c3b3;
    --gray: #888;
    --border: #e0e0e0;
    --font-title: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --promo: #c0392b;
}

/* ---------- RESET / BASE ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 400; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button { cursor: pointer; border: none; font-family: var(--font-body); transition: all 0.3s ease; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- BOTONES ---------- */
.btn-primary {
    background-color: var(--text-light); color: var(--bg-dark);
    padding: 12px 24px; border-radius: 30px; font-weight: 500; font-size: 14px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover { background-color: var(--accent); color: var(--text-dark); }

.btn-scroll-down {
    background: transparent;
    color: var(--text-light);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s ease;
    animation: bounceDown 2.2s ease-in-out infinite;
}
.btn-scroll-down:hover {
    background: rgba(255,255,255,0.12);
    border-color: var(--accent);
    color: var(--accent);
}
@keyframes bounceDown {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(8px); }
    60% { transform: translateY(4px); }
}

.btn-dark {
    background-color: var(--text-dark); color: var(--text-light);
    padding: 12px 24px; border-radius: 8px; font-weight: 500; width: 100%;
}
.btn-dark:hover { background-color: #333; }

/* ---------- HEADER ---------- */
header {
    position: fixed; top: 0; width: 100%; z-index: 100;
    background: rgba(10, 10, 10, 0.95); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.header-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 20px 0;
}
.header-content .logo { justify-self: center; }
.header-content .cart-btn { justify-self: end; }
.logo { font-family: var(--font-title); font-size: 24px; letter-spacing: 2px; cursor: pointer; }
.cart-btn { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.cart-count {
    background: var(--text-light); color: var(--bg-dark);
    border-radius: 50%; width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: bold;
}

/* ---------- PÁGINAS ---------- */
.page { display: none; padding-top: 80px; flex: 1; }
.page.active { display: block; }

/* ---------- HERO ---------- */
.hero {
    height: 80vh; display: flex; align-items: center;
    background: linear-gradient(to right, rgba(10,10,10,0.9) 0%, rgba(10,10,10,0.4) 100%), url('/images/hero.jpeg') center/cover;
    padding: 0 20px;
}
.hero-content { max-width: 600px; }
.hero-subtitle { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 20px; display: block; color: var(--accent); }
.hero h1 { font-size: 56px; line-height: 1.1; margin-bottom: 20px; }
.hero p { font-size: 16px; margin-bottom: 30px; color: #ccc; }

/* ---------- SECCIONES ---------- */
.section-title { text-align: center; margin: 80px 0 40px; }
.section-title h2 { font-size: 36px; margin-bottom: 10px; }
.section-title p { color: var(--gray); font-size: 14px; }

/* ---------- COLECCIONES ---------- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 340px;
    gap: 16px;
    margin-bottom: 28px;
}

.ver-todos-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 80px;
}
.btn-ver-todos {
    background: transparent;
    color: var(--text-light);
    border: 1px solid rgba(255,255,255,0.35);
    padding: 12px 32px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}
.btn-ver-todos:hover {
    background: var(--text-light);
    color: var(--bg-dark);
    border-color: var(--text-light);
}

.category-card {
    position: relative; border-radius: 14px; overflow: hidden; cursor: pointer;
    isolation: isolate; background: #1a1a1a;
    animation: cardReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.category-card:nth-child(1) { animation-delay: 0.05s; }
.category-card:nth-child(2) { animation-delay: 0.15s; }
.category-card:nth-child(3) { animation-delay: 0.25s; }
.category-card:nth-child(4) { animation-delay: 0.35s; }

@keyframes cardReveal {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.category-img {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
    filter: grayscale(0.15) brightness(0.85);
}
.category-card::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.15) 55%, transparent 100%);
    z-index: 1; transition: opacity 0.5s ease;
}
.category-content {
    position: absolute; inset: auto 0 0 0; z-index: 2;
    padding: 24px; display: flex; flex-direction: column; gap: 4px;
}
.category-index {
    font-size: 11px; letter-spacing: 2px; color: var(--accent); text-transform: uppercase;
    transform: translateY(6px); opacity: 0;
    transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.category-card h3 { font-size: 24px; color: #fff; transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.category-card p { font-size: 13px; color: rgba(255,255,255,0.65); transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.category-cta {
    display: inline-flex; align-items: center; gap: 10px; margin-top: 12px;
    font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: #fff;
    opacity: 0; transform: translateY(10px);
    transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.category-cta svg { width: 18px; height: 18px; transition: transform 0.4s ease; }
.category-line {
    position: absolute; bottom: 0; left: 0; height: 2px; width: 0;
    background: var(--accent); z-index: 3;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.category-card:hover .category-img { transform: scale(1.08); filter: grayscale(0) brightness(1); }
.category-card:hover::after { opacity: 0.85; }
.category-card:hover .category-index { transform: translateY(0); opacity: 1; }
.category-card:hover h3 { transform: translateY(-2px); }
.category-card:hover p { color: rgba(255,255,255,0.9); }
.category-card:hover .category-cta { opacity: 1; transform: translateY(0); }
.category-card:hover .category-cta svg { transform: translateX(6px); }
.category-card:hover .category-line { width: 100%; }

/* ---------- CARRUSEL DESTACADOS ---------- */
.featured-carousel-wrap {
    position: relative;
    margin-bottom: 80px;
    overflow: hidden;
    padding: 0 40px;
}
.featured-carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
.featured-carousel-track .product-card {
    flex: 0 0 calc((100% - 40px) / 3);
    min-width: 0;
}
.featured-carousel-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,0.92); color: #111;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; line-height: 1; z-index: 5;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}
.featured-carousel-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.featured-carousel-arrow.prev { left: 0; }
.featured-carousel-arrow.next { right: 0; }
.featured-carousel-nav { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.carousel-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.25); transition: all 0.3s ease;
    border: none; padding: 0;
}
.carousel-dot.active { background: var(--accent); width: 24px; border-radius: 4px; }

/* ---------- PRODUCTOS ---------- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    padding-bottom: 80px;
}
.product-card {
    background: var(--bg-light); color: var(--text-dark);
    border-radius: 8px; overflow: hidden; cursor: pointer;
    transition: transform 0.3s ease;
}
.product-card:hover { transform: translateY(-4px); }
.product-img-wrap { position: relative; height: 350px; background: #e0e0e0; overflow: hidden; }
.product-img-slide {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    opacity: 0; transition: opacity 0.5s ease;
}
.product-img-slide.active { opacity: 1; }
.product-img-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,0.85); color: #111;
    display: none; align-items: center; justify-content: center;
    font-size: 18px; line-height: 1; z-index: 3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.product-img-nav:hover { background: #fff; }
.product-img-nav.prev { left: 10px; }
.product-img-nav.next { right: 10px; }
.product-img-wrap.has-multiple:hover .product-img-nav { display: flex; }
.product-img-dots {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px; z-index: 3;
}
.product-img-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255,255,255,0.5); transition: all 0.3s ease;
}
.product-img-dot.active { background: #fff; width: 18px; border-radius: 4px; }
.product-badge-promo {
    position: absolute; top: 10px; left: 10px; z-index: 4;
    background: var(--promo); color: #fff;
    font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
    padding: 4px 10px; border-radius: 20px;
}
.product-info { padding: 20px; }
.product-category { font-size: 11px; text-transform: uppercase; color: var(--gray); letter-spacing: 1px; margin-bottom: 5px; display: block; }
.product-title { font-size: 18px; margin-bottom: 10px; font-weight: 500; }
.product-prices { margin-bottom: 15px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.product-price-old { font-size: 14px; color: #999; text-decoration: line-through; font-family: var(--font-body); }
.product-price { font-size: 20px; font-family: var(--font-title); }
.product-price.promo { color: var(--promo); }

/* ---------- CATÁLOGO ---------- */
.catalog-header {
    display: flex; flex-direction: column; gap: 20px;
    padding: 40px 0 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 30px;
}
.catalog-top { display: flex; justify-content: space-between; align-items: center; }
.back-btn {
    position: relative; display: inline-flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.04); color: var(--text-light);
    border: 1px solid rgba(255,255,255,0.18);
    padding: 10px 20px 10px 16px; border-radius: 40px;
    font-size: 13px; font-weight: 500; letter-spacing: 0.3px; overflow: hidden;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.back-btn svg { width: 16px; height: 16px; transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.back-btn::before {
    content: ''; position: absolute; inset: 0; background: var(--accent);
    transform: translateX(-100%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}
.back-btn:hover { color: var(--text-dark); border-color: var(--accent); }
.back-btn:hover::before { transform: translateX(0); }
.back-btn:hover svg { transform: translateX(-4px); }
.back-btn-dark { color: var(--text-dark); border-color: rgba(0,0,0,0.2); }
.back-btn-dark::before { background: var(--text-dark); }
.back-btn-dark:hover { color: var(--text-light); border-color: var(--text-dark); }

.catalog-filters { display: flex; gap: 15px; flex-wrap: wrap; }
.filter-btn {
    background: transparent; color: var(--text-light); border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 20px; border-radius: 20px; font-size: 13px;
}
.filter-btn.active, .filter-btn:hover { background: var(--text-light); color: var(--bg-dark); }

.catalog-toolbar { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.search-box { position: relative; width: 100%; }
.search-box input {
    width: 100%; padding: 14px 44px 14px 46px; border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.04);
    color: var(--text-light); font-family: var(--font-body); font-size: 14px;
    transition: all 0.3s ease;
}
.search-box input::placeholder { color: rgba(255,255,255,0.4); }
.search-box input:focus { outline: none; border-color: var(--accent); background: rgba(255,255,255,0.07); }
.search-box .search-icon {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: rgba(255,255,255,0.5); pointer-events: none;
}
.search-box .clear-search {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: transparent; color: rgba(255,255,255,0.5); width: 24px; height: 24px;
    border-radius: 50%; display: none; align-items: center; justify-content: center;
    font-size: 18px; line-height: 1;
}
.search-box .clear-search.visible { display: flex; }
.search-box .clear-search:hover { color: #fff; background: rgba(255,255,255,0.1); }
.catalog-controls { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.catalog-controls-left { display: flex; gap: 10px; flex-wrap: wrap; }
.sort-select {
    background: rgba(255,255,255,0.04); color: var(--text-light);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 9px 16px; border-radius: 20px;
    font-family: var(--font-body); font-size: 13px; cursor: pointer;
}
.sort-select option { background: #1a1a1a; color: #fff; }
.sort-select:focus { outline: none; border-color: var(--accent); }
.results-info { font-size: 13px; color: var(--gray); white-space: nowrap; }
.results-info strong { color: var(--text-light); font-weight: 500; }
.empty-results { grid-column: 1 / -1; text-align: center; padding: 80px 20px; color: var(--gray); }
.empty-results h3 { font-size: 24px; color: var(--text-light); margin-bottom: 10px; }
.empty-results p { font-size: 14px; margin-bottom: 20px; }
.empty-results button {
    background: transparent; color: var(--accent); border: 1px solid var(--accent);
    padding: 10px 24px; border-radius: 30px; font-size: 13px;
}
.empty-results button:hover { background: var(--accent); color: var(--text-dark); }

/* ---------- PAGINACIÓN CATÁLOGO ---------- */
.catalog-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 40px 0 60px;
    padding: 0 8px;
}
.catalog-pagination .page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-body);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.catalog-pagination .page-btn:hover {
    color: var(--text-light);
    background: rgba(255,255,255,0.06);
}
.catalog-pagination .page-btn.active {
    background: #fff;
    color: #1a1a1a;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
    font-weight: 600;
}
.catalog-pagination .page-next {
    min-width: auto;
    padding: 0 14px;
    gap: 4px;
    color: #666;
}
.catalog-pagination .page-next:hover { color: var(--text-light); }
.catalog-pagination .page-ellipsis {
    min-width: 28px;
    text-align: center;
    color: #888;
    font-size: 14px;
    user-select: none;
}

/* ---------- MODAL PRODUCTO DETALLE ---------- */
.product-detail-modal {
    display: none; position: fixed; inset: 0; z-index: 400;
    background: rgba(0,0,0,0.9); backdrop-filter: blur(4px);
    justify-content: center; align-items: center; padding: 20px;
    opacity: 0; transition: opacity 0.3s ease;
}
.product-detail-modal.open { display: flex; opacity: 1; }
.product-detail-box {
    background: var(--bg-light); color: var(--text-dark);
    width: 100%; max-width: 1000px; max-height: 92vh;
    border-radius: 12px; overflow: hidden;
    display: grid; grid-template-columns: 1fr 1fr;
    position: relative;
    transform: scale(0.96); opacity: 0;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.product-detail-modal.open .product-detail-box { transform: scale(1); opacity: 1; }
.product-detail-close {
    position: absolute; top: 12px; right: 12px; z-index: 10;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.9); color: #111;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; line-height: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.product-detail-close:hover { background: #111; color: #fff; }
.product-detail-gallery {
    position: relative;
    background: #f0f0f0;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-detail-slide {
    position: absolute;
    inset: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #f0f0f0;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.product-detail-slide.active { opacity: 1; }
.product-detail-gallery .product-img-nav { display: flex; }
.product-detail-gallery .product-img-dots { bottom: 16px; }
.product-detail-info { padding: 40px; overflow-y: auto; display: flex; flex-direction: column; }
.product-detail-category { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gray); margin-bottom: 8px; }
.product-detail-title { font-size: 30px; margin-bottom: 16px; line-height: 1.2; }
.product-detail-prices { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.product-detail-price-old { font-size: 18px; color: #999; text-decoration: line-through; }
.product-detail-price { font-size: 32px; font-family: var(--font-title); }
.product-detail-price.promo { color: var(--promo); }
.product-detail-promo-badge {
    background: var(--promo); color: #fff; font-size: 11px; font-weight: 600;
    padding: 4px 10px; border-radius: 20px; letter-spacing: 0.5px;
}
.product-detail-desc {
    font-size: 14px; color: #555; line-height: 1.7;
    margin-bottom: 24px; padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.product-detail-sizes-label {
    font-size: 13px; font-weight: 600; margin-bottom: 10px;
    display: flex; justify-content: space-between; align-items: center;
}
.product-detail-sizes-label span { font-weight: 400; color: var(--gray); font-size: 12px; }
.product-detail-sizes { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.detail-size-btn {
    background: transparent; border: 1px solid #ccc;
    min-width: 44px; height: 44px; padding: 0 10px;
    border-radius: 6px; font-size: 14px; color: var(--text-dark);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.detail-size-btn:hover { border-color: var(--text-dark); }
.detail-size-btn.selected { background: var(--text-dark); color: #fff; border-color: var(--text-dark); }
.detail-size-btn.out-of-stock { opacity: 0.35; text-decoration: line-through; cursor: not-allowed; }
.detail-size-btn .size-stock { position: absolute; bottom: 2px; right: 3px; font-size: 8px; opacity: 0.6; }
.product-detail-add { margin-top: auto; padding-top: 10px; }
.product-detail-add .btn-dark { padding: 16px; font-size: 15px; border-radius: 10px; }
.product-detail-add .btn-dark:disabled { background: #ccc; color: #888; cursor: not-allowed; }
.product-detail-stock-info { font-size: 12px; color: var(--gray); margin-top: 10px; text-align: center; }

/* ---------- CARRITO ---------- */
.cart-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); z-index: 200; opacity: 0; pointer-events: none; transition: 0.3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-drawer {
    position: fixed; top: 0; right: -400px; width: 100%; max-width: 400px; height: 100%;
    background: var(--bg-light); color: var(--text-dark); z-index: 201; transition: 0.3s;
    display: flex; flex-direction: column;
}
.cart-drawer.open { right: 0; }
.cart-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.cart-header h2 { font-size: 24px; }
.cart-close { background: transparent; font-size: 24px; color: var(--text-dark); }
.cart-items { flex: 1; overflow-y: auto; padding: 20px; }
.cart-item { display: flex; gap: 15px; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.cart-item-img { width: 80px; height: 100px; background: #ccc; border-radius: 4px; background-size: cover; background-position: center; }
.cart-item-info { flex: 1; }
.cart-item-title { font-weight: 500; margin-bottom: 5px; }
.cart-item-size { font-size: 12px; color: var(--gray); margin-bottom: 5px; }
.cart-item-price { font-weight: 600; }
.cart-item-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.qty-btn { background: #eee; border: none; width: 24px; height: 24px; border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.remove-btn { background: transparent; color: red; font-size: 12px; margin-left: auto; text-decoration: underline; }
.cart-footer { padding: 20px; border-top: 1px solid var(--border); background: #fff; }
.cart-total { display: flex; justify-content: space-between; font-size: 20px; font-family: var(--font-title); margin-bottom: 15px; }

/* ---------- CHECKOUT ---------- */
.checkout-container { max-width: 600px; margin: 40px auto; background: var(--bg-light); color: var(--text-dark); padding: 40px; border-radius: 8px; }
.checkout-steps { display: flex; justify-content: space-between; margin-bottom: 30px; position: relative; }
.checkout-steps::before { content: ''; position: absolute; top: 15px; left: 0; width: 100%; height: 2px; background: var(--border); z-index: 1; }
.step { width: 30px; height: 30px; border-radius: 50%; background: var(--border); color: var(--gray); display: flex; align-items: center; justify-content: center; font-size: 14px; z-index: 2; font-weight: bold; }
.step.active { background: var(--text-dark); color: #fff; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.form-control { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 6px; font-family: var(--font-body); }
.form-control:focus { outline: none; border-color: var(--text-dark); }
.checkout-step-content { display: none; }
.checkout-step-content.active { display: block; }
.shipping-option { display: flex; justify-content: space-between; padding: 15px; border: 1px solid #ccc; border-radius: 6px; margin-bottom: 10px; cursor: pointer; }
.shipping-option.selected { border-color: var(--text-dark); background: #f0f0f0; }
.shipping-option input { margin-right: 10px; }
.order-summary-box { background: #f9f9f9; padding: 20px; border-radius: 6px; margin-top: 20px; margin-bottom: 20px; }
.order-summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.order-summary-row.total { font-weight: bold; font-size: 18px; border-top: 1px solid #ccc; padding-top: 10px; margin-top: 10px; }

/* ---------- ADMIN ---------- */
.admin-login { max-width: 400px; margin: 100px auto; background: #fff; color: #000; padding: 40px; border-radius: 8px; text-align: center; }
.admin-nav { display: flex; gap: 10px; margin-bottom: 30px; border-bottom: 1px solid #333; padding-bottom: 20px; flex-wrap: wrap; }
.admin-nav button { background: #222; color: #fff; border: none; padding: 10px 20px; border-radius: 20px; }
.admin-nav button.active { background: #fff; color: #000; }
.admin-section { display: none; }
.admin-section.active { display: block; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 40px; }
.stat-card { background: #fff; color: #000; padding: 20px; border-radius: 8px; }
.stat-card h3 { font-size: 14px; color: #666; margin-bottom: 10px; text-transform: uppercase; }
.stat-card p { font-size: 32px; font-family: var(--font-title); }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; color: #000; border-radius: 8px; overflow: hidden; }
.admin-table th, .admin-table td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; }
.admin-table th { background: #f9f9f9; font-weight: 600; }
.admin-card { background: #fff; color: #000; padding: 30px; border-radius: 8px; margin-bottom: 20px; }
.admin-card h3 { margin-bottom: 20px; font-size: 22px; border-bottom: 1px solid #eee; padding-bottom: 10px; }

/* ---------- MODALES ---------- */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 300; justify-content: center; align-items: center; }
.modal.open { display: flex; }
.modal-content { background: #fff; color: #000; width: 100%; max-width: 560px; padding: 30px; border-radius: 8px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; margin-bottom: 20px; }
.close-modal { background: none; border: none; font-size: 24px; cursor: pointer; }

/* ---------- SUBIDA DE IMÁGENES ADMIN ---------- */
.img-uploader { display: flex; gap: 12px; margin-bottom: 10px; }
.img-preview-box {
    position: relative; width: 90px; height: 110px;
    border: 2px dashed #ccc; border-radius: 8px; background: #fafafa;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0; cursor: pointer; transition: all 0.2s ease;
}
.img-preview-box:hover { border-color: #333; background: #f0f0f0; }
.img-preview-box.has-img { border-style: solid; border-color: #333; }
.img-preview-box img { width: 100%; height: 100%; object-fit: cover; }
.img-preview-box .img-placeholder {
    font-size: 11px; color: #999; text-align: center; padding: 4px;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.img-preview-box .img-placeholder svg { width: 22px; height: 22px; stroke: #999; fill: none; stroke-width: 2; }
.img-preview-box .remove-img {
    position: absolute; top: 3px; right: 3px;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(0,0,0,0.7); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; line-height: 1;
}
.img-preview-box .remove-img:hover { background: red; }
.img-uploader-info { flex: 1; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.img-uploader-info input[type="text"] {
    padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px;
    font-size: 12px; font-family: var(--font-body);
}
.img-uploader-info .upload-trigger {
    display: inline-flex; align-items: center; gap: 6px;
    background: #111; color: #fff;
    padding: 7px 14px; border-radius: 20px;
    font-size: 12px; cursor: pointer; border: none;
    align-self: flex-start;
}
.img-uploader-info .upload-trigger:hover { background: #333; }
.img-uploader-info .upload-trigger svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- TALLES / STOCK EDITOR ---------- */
.talles-stock-editor { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.talle-stock-row { display: flex; align-items: center; gap: 10px; }
.talle-stock-row input[type="text"] {
    width: 80px; padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px;
    font-size: 13px; font-family: var(--font-body);
}
.talle-stock-row input[type="number"] {
    width: 90px; padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px;
    font-size: 13px; font-family: var(--font-body);
}
.talle-stock-row .remove-talle { background: transparent; color: red; font-size: 18px; line-height: 1; padding: 4px 8px; }

/* ---------- TOAST ---------- */
.toast {
    position: fixed; bottom: 20px; right: 20px; background: #fff; color: #000;
    padding: 15px 25px; border-radius: 8px; font-weight: 500;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); z-index: 1000;
    transform: translateY(100px); opacity: 0; transition: 0.3s;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ---------- FOOTER ---------- */
footer {
    background-color: #0a0a0a;
    padding: 70px 0 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: auto;
}

/* Grilla principal: 4 columnas donde el mapa tiene un poco más de aire */
.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 50px;
}

/* Títulos */
.footer-col h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 24px;
    color: #fff;
    font-weight: 600;
}

/* Logo y descripción */
.footer-logo {
    font-family: var(--font-title, serif);
    font-size: 24px;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: #fff;
}
.footer-brand p {
    font-size: 14px;
    color: #888;
    line-height: 1.6;
    max-width: 250px;
}

/* Listas de contacto y envíos */
.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #888;
    line-height: 1.5;
}
.footer-list svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: none;
    stroke: #666;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-top: 2px;
}
.footer-list a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-list a:hover {
    color: #fff;
}

/* Mapa */
.footer-map {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    width: 100%;
}
.footer-map iframe {
    display: block;
    width: 100%;
    height: 180px; /* Más chico para que no domine */
    border: 0;
    filter: grayscale(0.3) contrast(1.1); /* Un filtro sutil para que combine con lo oscuro */
}

/* Línea divisoria */
.footer-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin-bottom: 25px;
}

/* Parte inferior (Copyright + Admin) */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-legal {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-legal a {
    color: #666;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
}
.footer-legal a:hover {
    color: #fff;
}

.footer-dev strong {
    color: #fff;
    font-weight: 500;
}

/* Botón Admin */
.admin-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: #888;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.admin-btn:hover {
    color: #fff;
    border-color: #fff;
    background: rgba(255,255,255,0.05);
}
.admin-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* ---------- RESPONSIVE FOOTER ---------- */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    .footer-map-col {
        grid-column: span 2; /* El mapa ocupa todo el ancho abajo */
    }
    .footer-map iframe {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-map-col {
        grid-column: span 1;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .footer-legal {
        flex-wrap: wrap;
    }
    .admin-btn {
        width: 100%;
        justify-content: center;
    }
}
/* ---------- BARRA LEGAL ---------- */
.legal-bar { border-top: 1px solid rgba(255,255,255,0.08); background: #0d0d0d; padding: 18px 0; }
.legal-bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 12px; color: #777; }
.legal-links { display: flex; gap: 24px; flex-wrap: wrap; }
.legal-links a { color: #999; text-decoration: none; transition: color 0.3s ease; position: relative; }
.legal-links a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 1px; background: var(--accent); transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.legal-links a:hover { color: var(--accent); }
.legal-links a:hover::after { width: 100%; }
.legal-dev { color: #888; font-size: 12px; letter-spacing: 0.5px; }
.legal-dev strong { color: var(--accent); font-weight: 600; letter-spacing: 1px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .product-detail-box { grid-template-columns: 1fr; max-height: 92vh; }
    .product-detail-gallery { min-height: 280px; height: 280px; }
    .product-detail-info { padding: 22px; }
    .product-detail-title { font-size: 22px; }
    .product-detail-price { font-size: 24px; }
    .featured-carousel-track .product-card { flex: 0 0 calc((100% - 20px) / 2); }
    .featured-carousel-wrap { padding: 0 30px; }
}
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .header-content { padding: 14px 0; }
    .logo { font-size: 18px; letter-spacing: 1.5px; }
    .cart-btn span:not(.cart-count) { display: none; }
    .hero { height: 72vh; min-height: 420px; padding: 0 16px; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 14px; margin-bottom: 24px; }
    .section-title { margin: 48px 0 28px; }
    .section-title h2 { font-size: 28px; }
    .categories-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; gap: 10px; }
    .category-card h3 { font-size: 18px; }
    .category-content { padding: 14px; }
    .category-cta { font-size: 12px; }
    .ver-todos-wrap { margin-bottom: 48px; }
    .btn-ver-todos { padding: 10px 24px; font-size: 12px; }
    .catalog-pagination { gap: 4px; margin: 28px 0 40px; }
    .catalog-pagination .page-btn { min-width: 32px; height: 32px; font-size: 13px; padding: 0 8px; }
    .featured-carousel-track .product-card { flex: 0 0 100%; }
    .featured-carousel-wrap { padding: 0 16px; }
    .featured-carousel-arrow { width: 36px; height: 36px; font-size: 18px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .admin-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .catalog-top { flex-direction: column; align-items: flex-start; gap: 12px; }
    .footer-content { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
    .catalog-controls { flex-direction: column; align-items: stretch; gap: 10px; }
    .results-info { text-align: left; }
    .legal-bar-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
    .legal-links { gap: 14px; flex-wrap: wrap; }
    .cart-drawer { max-width: 100%; }
    .checkout-container { margin: 20px auto; padding: 24px 16px; }
    .admin-login { margin: 60px auto; padding: 28px 20px; }
    .modal-content { padding: 20px; max-height: 85vh; }
    .product-detail-box { max-height: 95vh; border-radius: 0; }
    .btn-scroll-down { width: 44px; height: 44px; }
}
@media (max-width: 480px) {
    .hero { height: 68vh; min-height: 380px; }
    .hero h1 { font-size: 26px; line-height: 1.15; }
    .hero-subtitle { font-size: 11px; }
    .categories-grid { grid-template-columns: 1fr; grid-auto-rows: 240px; gap: 12px; }
    .category-card h3 { font-size: 22px; }
    .section-title h2 { font-size: 24px; }
    .product-detail-gallery { min-height: 240px; height: 240px; }
    .product-detail-info { padding: 18px; }
    .product-detail-title { font-size: 20px; }
    .stats-grid { grid-template-columns: 1fr; }
    .header-content { grid-template-columns: 40px 1fr 40px; }
    .header-content > div:first-child { width: 40px !important; }
}
@media (max-width: 360px) {
    .hero h1 { font-size: 22px; }
    .logo { font-size: 16px; }
    .container { padding: 0 12px; }
}

/* ---------- ENCABEZADO DEL PANEL ADMIN ---------- */
.admin-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-actions {
    display: flex;
    gap: 10px;
}

/* ---------- RESPONSIVE ADMIN HEADER ---------- */
@media (max-width: 768px) {
    .admin-header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .admin-actions {
        flex-direction: column;
        width: 100%;
    }

    .admin-actions .btn-primary {
        width: 100%;
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* =========================================================
   CORRECCIONES GENERALES PARA MOBILE (Consolidado)
   ========================================================= */

/* Clases para reemplazar los estilos inline del HTML */
.admin-config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.modal-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Ajustes generales de Mobile */
@media (max-width: 768px) {
    /* 1. ADMIN HEADER (Título y Botones) */
    .admin-header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .admin-actions {
        flex-direction: column;
        width: 100%;
    }
    .admin-actions .btn-primary {
        width: 100%;
        padding: 12px 20px;
        font-size: 14px;
    }
    .admin-nav {
        gap: 8px;
        justify-content: flex-start;
    }
    .admin-nav button {
        padding: 8px 14px;
        font-size: 13px;
    }

    /* 2. CONFIGURACIÓN DEL ADMIN (Que no queden apretados) */
    .admin-config-grid,
    .modal-form-row {
        grid-template-columns: 1fr; /* Todo a una sola columna */
    }
    .admin-card {
        padding: 20px 15px;
    }

    /* 3. MODALES (Que no ocupen el 100% de la pantalla) */
    .modal-content {
        width: 95% !important;
        padding: 20px !important;
        max-height: 90vh !important;
    }
    .modal-header h2 {
        font-size: 20px;
    }

    /* 4. FORMULARIOS (Inputs más grandes para el dedo) */
    .form-control {
        padding: 14px;
        font-size: 16px; /* Evita el zoom automático en iPhone */
    }
    .btn-dark, .btn-primary {
        padding: 14px 20px;
    }

    /* 5. TABLAS DEL ADMIN (Scroll horizontal sin romperse) */
    .admin-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 6. CARRITO (Drawer al 100%) */
    .cart-drawer {
        width: 100%;
        max-width: 100%;
    }

    /* 7. FOOTER (Ajustes finales) */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .footer-legal {
        flex-wrap: wrap;
        gap: 15px;
    }
    .admin-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
}

/* Ajustes extra para pantallas muy chicas (iPhone SE, etc.) */
@media (max-width: 480px) {
    .admin-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .admin-nav button {
        width: 100%;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}