/* ══════════════════════════════════════════
   ShopEngine – base.css
   Reset, variables, tipografía, grid, layout
   ══════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: var(--font-size-base, 15px); line-height: var(--line-height, 1.6);
    font-weight: var(--font-weight-body, 400);
    color: var(--color-text);
    background: var(--color-body-bg, #fff);
    min-height: 100vh;
    display: flex; flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-secondary, 'Playfair Display', serif); line-height: 1.3; font-weight: var(--font-weight-heading, 700); }

/* ── Containers ── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}
.container-full {
    width: 100%;
    padding: 0 2.5rem;
}

/* ── Sections ── */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--color-bg-alt); }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-size: 1.75rem; margin-bottom: 0.4rem; }
.section-header p { color: var(--color-text-light); font-size: 1rem; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem; font-weight: 600;
    border: none; border-radius: var(--radius-btn, 6px);
    transition: all 0.25s ease;
    text-decoration: none;
    line-height: 1.4;
}
.btn-primary { background: var(--color-button); color: var(--color-button-text); }
.btn-primary:hover { background: var(--color-button-hover); }
.btn-accent { background: var(--color-accent); color: #fff; }
.btn-accent:hover { opacity: 0.9; }
.btn-outline { background: transparent; border: 2px solid var(--color-border); color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.82rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ── Badges ── */
.badge {
    position: absolute; top: 0.75rem;
    padding: 0.2rem 0.65rem;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
    border-radius: 3px; z-index: 2; color: #fff;
}
.badge-sale { left: 0.75rem; background: var(--color-error, #e53e3e); }
.badge-new { right: 0.75rem; background: var(--color-accent); }

/* ── Product Grid ── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(var(--shop-columns, 4), 1fr);
    gap: 1.5rem;
}

/* ── Product Card ── */
.product-card {
    background: var(--color-bg, #fff);
    border: 1px solid var(--color-border);
    border-radius: var(--radius, 8px);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }
.product-card-img {
    display: block; position: relative;
    aspect-ratio: 1 / 1; overflow: hidden; background: var(--color-bg-alt);
}
.product-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-body { padding: 1rem 1.15rem 1.25rem; }
.product-card-category {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--color-accent); margin-bottom: 0.25rem; font-weight: 600;
}
.product-card-title { font-family: var(--font-primary); font-size: 0.95rem; font-weight: 600; line-height: 1.35; margin-bottom: 0.5rem; }
.product-card-title a:hover { color: var(--color-accent); }
.product-card-price { font-size: 1.05rem; font-weight: 700; color: var(--color-primary); }
.old-price { text-decoration: line-through; color: var(--color-text-light); font-size: 0.85rem; font-weight: 400; margin-left: 0.35rem; }

/* ── Quick Add overlay ── */
.product-card-actions {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 0.6rem; background: linear-gradient(transparent, rgba(0,0,0,0.04));
    transform: translateY(100%); opacity: 0;
    transition: all 0.3s ease;
    display: flex; gap: 0.5rem;
}
.product-card:hover .product-card-actions { transform: translateY(0); opacity: 1; }
.btn-quick-add {
    flex: 1; background: var(--color-button); color: var(--color-button-text);
    padding: 0.5rem 0.75rem; font-size: 0.8rem; font-weight: 600;
    border: none; border-radius: var(--radius-btn);
    display: flex; align-items: center; justify-content: center; gap: 0.35rem;
    cursor: pointer; transition: all 0.25s ease; font-family: var(--font-primary);
    text-decoration: none;
}
.btn-quick-add:hover { background: var(--color-button-hover); }

/* ── Categories Grid ── */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
}
.category-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.75rem 1rem;
    text-align: center;
    transition: all 0.25s ease;
}
.category-card:hover { border-color: var(--color-accent); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.category-card h3 { font-family: var(--font-primary); font-size: 0.95rem; font-weight: 600; }
.category-card p { font-size: 0.8rem; color: var(--color-text-light); margin-top: 0.3rem; }

/* ── Toast Notification ── */
.toast {
    position: fixed; bottom: 1.5rem; right: 1.5rem;
    background: var(--color-primary); color: #fff;
    padding: 0.85rem 1.5rem; border-radius: var(--radius);
    font-size: 0.9rem; font-weight: 500;
    z-index: 10000; box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    animation: toastIn 0.3s ease;
}
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Forms ── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.6rem 0.85rem;
    border: 1px solid var(--color-border); border-radius: var(--radius);
    font-size: 0.9rem; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--color-accent);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .container-full { padding: 0 1rem; }
    .section { padding: 2.5rem 0; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .product-card-actions { transform: translateY(0); opacity: 1; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .product-card-body { padding: 0.75rem; }
    .product-card-title { font-size: 0.85rem; }
    .product-card-price { font-size: 0.92rem; }
}

/* ── Hero Slider ── */

/* ═══ HERO SLIDER - Dissolve ═══ */
.hero-slider { position: relative; overflow: hidden; background: #111; height: 55vh; min-height: 360px; max-height: 520px; }
.slide {
    position: absolute; inset: 0;
    opacity: 0; visibility: hidden;
    transition: opacity 1s ease, visibility 1s ease;
    z-index: 0;
}
.slide.active { opacity: 1; visibility: visible; z-index: 1; }
.slide .slide-desktop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.slide .slide-mobile { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.slide img { transform: scale(1); transition: transform 7s ease-out; }
.slide.active img { transform: scale(1.03); }
.slide-overlay { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.slide-gradient {
    position: absolute; bottom: 0; left: 0; right: 0; height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 100%);
    z-index: 2; pointer-events: none;
}
.slide .container { position: relative; z-index: 3; height: 100%; display: flex; align-items: flex-end; }
.slide-content {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: .5rem; max-width: 480px; padding-bottom: 2.5rem;
    opacity: 0; transform: translateY(15px);
    transition: opacity .7s ease .3s, transform .7s ease .3s;
}
.slide.active .slide-content { opacity: 1; transform: translateY(0); }
.slide-content h2 {
    font-family: var(--font-heading, var(--font-secondary));
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 800; line-height: 1.15; margin: 0;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.slide-content p {
    font-size: clamp(.85rem, 1.6vw, 1rem);
    max-width: 380px; line-height: 1.5; margin: 0;
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}
.slide-btn {
    display: inline-block; margin-top: .25rem;
    padding: .65rem 1.8rem; background: var(--color-accent, #C68B59);
    color: #fff; font-weight: 700; font-size: .85rem;
    border-radius: var(--radius-btn, 6px);
    text-transform: uppercase; letter-spacing: .06em;
    text-decoration: none; transition: background .3s, transform .3s;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}
.slide-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 42px; height: 42px; background: rgba(0,0,0,0.3);
    border: none; border-radius: 50%; color: #fff; font-size: .95rem;
    cursor: pointer; z-index: 5;
    display: flex; align-items: center; justify-content: center;
    transition: background .3s, opacity .3s; opacity: 0;
}
.hero-slider:hover .slider-arrow { opacity: 1; }
.slider-arrow:hover { background: rgba(0,0,0,0.55); }
.slider-prev { left: 1rem; }
.slider-next { right: 1rem; }
.slider-dots {
    position: absolute; bottom: 1rem; left: 50%;
    transform: translateX(-50%); display: flex; gap: .4rem; z-index: 5;
}
.slider-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.4); border: none; padding: 0;
    cursor: pointer; transition: all .3s;
}
.slider-dot.active { background: #fff; width: 26px; border-radius: 4px; }

/* Sections */
.section { padding: 4rem 0; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-family: var(--font-heading, var(--font-secondary)); font-size: 1.8rem; margin-bottom: 0.5rem; }
.section-header p { color: var(--color-text-light, #6B6560); }
.section-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--color-accent); font-weight: 600; }
.section-link:hover { gap: 0.7rem; }

/* Categories */
.categories-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.category-card {
    background: var(--color-bg-alt, #FAF8F5); border-radius: var(--radius, 8px);
    padding: 2rem 1.5rem; text-align: center; transition: all 0.3s ease;
}
.category-card:hover { transform: translateY(-3px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.category-card h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.category-card p { font-size: 0.85rem; color: var(--color-text-light); }

/* Product Grid (home) */
.product-grid { display: grid; grid-template-columns: repeat(var(--shop-columns, 4), 1fr); gap: var(--gap, 1.5rem); }
.product-card { background: var(--color-bg, #fff); border-radius: var(--radius, 8px); overflow: hidden; transition: all 0.3s; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.product-card-img { display: block; aspect-ratio: 1; overflow: hidden; position: relative; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.product-card:hover .product-card-img img { transform: scale(1.06); }
.product-card-body { padding: 1rem; }
.product-card-name { display: block; font-weight: 500; margin-bottom: 0.5rem; font-size: 0.92rem; }
.product-card-price { display: flex; align-items: center; gap: 0.5rem; }
.price-current { font-weight: 700; color: var(--color-primary); }
.price-old { text-decoration: line-through; color: var(--color-text-light); font-size: 0.85rem; }
.badge-sale { position: absolute; top: 0.75rem; left: 0.75rem; background: #e53e3e; color: #fff; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.75rem; font-weight: 700; }

/* Empty state */
.empty-state { text-align: center; padding: 5rem 2rem; color: var(--color-text-light); }

/* Responsive - slider + home */
@media (max-width: 768px) {
    .hero-slider { height: 45vh; min-height: 300px; max-height: 400px; }
    .slide-content h2 { font-size: 1.4rem; }
    .slide-content { padding-bottom: 2rem; }
    .slider-arrow { width: 34px; height: 34px; font-size: .85rem; }
    .slider-prev { left: .5rem; }
    .slider-next { right: .5rem; }
    .slide .slide-desktop { display: none; }
    .slide .slide-mobile { display: block; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}
@media (max-width: 480px) {
    .hero-slider { height: 40vh; min-height: 260px; max-height: 340px; }
    .slide-content h2 { font-size: 1.2rem; }
    .slide-btn { padding: .5rem 1.2rem; font-size: .78rem; }
    .categories-grid { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
}
