@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #1a4fa0;
    --primary-dark: #0f3272;
    --primary-light: #2d6fd4;
    --accent: #00a86b;
    --accent-dark: #007a4d;
    --bg: #f8fafc;
    --bg-subtle: #eef2f7;
    --bg-white: #ffffff;
    --text: #0f1f3d;
    --text-muted: #5a6a85;
    --border: #dde3ee;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.13);
    --shadow-accent: 0 8px 30px rgba(0, 168, 107, 0.25);
    --radius-sm: 4px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --header-bg: #ffffff;
    --card-bg: #ffffff;
    --modal-bg: #ffffff;
    --input-bg: #f8fafc;
    --footer-bg: #0f1f3d;
    --footer-text: #c8d4e8;
}

body.dark-theme {
    --bg: #0d1626;
    --bg-subtle: #162035;
    --bg-white: #1a2740;
    --text: #e2eaf5;
    --text-muted: #8a9bbf;
    --border: #2a3a55;
    --header-bg: #111e33;
    --card-bg: #1a2740;
    --modal-bg: #1a2740;
    --input-bg: #162035;
    --footer-bg: #080f1c;
    --footer-text: #8a9bbf;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-subtle);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== NAVBAR ===== */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 70px;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: background 0.3s, border-color 0.3s;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.header-logo img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.header-logo h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

.header-logo h2 span {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-search-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid rgba(26, 79, 160, 0.16);
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(26, 79, 160, 0.08), rgba(0, 168, 107, 0.08));
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}

@media (max-width: 830px) {
    .header-search-trigger {
        padding: 0 10px;
        font-size: 0.65rem;
    }
}

.header-search-trigger svg {
    fill: currentColor;
    flex-shrink: 0;
}

.header-search-trigger:hover,
.header-search-trigger:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(26, 79, 160, 0.3);
    box-shadow: var(--shadow-md);
    outline: none;
}

.btn-ml {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #ffe600;
    color: #1a1a1a;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    border: none;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.btn-ml:hover {
    background: #ffd000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 214, 0, 0.4);
}

.btn-ml-icon {
    width: 48px;
    height: 33px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .btn-ml-icon {
        width: 40px;
        height: 28px;
    }
}

#theme {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text);
}

#theme:hover {
    background: var(--bg-subtle);
    transform: rotate(15deg);
}

#theme svg {
    fill: var(--text);
    width: 20px;
    height: 20px;
}

/* ===== HERO ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
    padding: 64px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}

.hero-section h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-section p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 520px;
    margin: 0 auto 32px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    position: relative;
}

.hero-stat {
    text-align: center;
    color: #fff;
}

.hero-stat strong {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.hero-stat span {
    font-size: 0.8rem;
    opacity: 0.75;
    margin-top: 4px;
    display: block;
}

/* ===== SLIDES ===== */
#slides-images {
    width: 100%;
    max-width: 960px;
    margin: 32px auto;
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.slides-container {
    position: relative;
    width: 100%;
    padding-bottom: 50%;
    overflow: hidden;
    background: var(--bg-subtle);
}

.slides-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-subtle);
}

.slide img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--radius-md);
    transition: transform 0.3s;
}

.slide:hover img {
    transform: scale(1.02);
}

.slide-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary);
    border: 1px solid var(--border);
    width: 44px;
    height: 44px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.slide-nav-button:hover {
    background: var(--primary);
    color: #fff;
}

.slide-prev {
    left: 12px;
}

.slide-next {
    right: 12px;
}

.slides-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(105, 105, 105, 0.5);
    cursor: pointer;
    transition: all 0.2s;
    border: 1.5px solid rgba(255, 255, 255, 0.8);
}

.dot.active {
    background: #f1f1f1;
    transform: scale(1.3);
    border: 1px solid #5f5f5f;
}

.dot:hover {
    background: rgba(112, 112, 112, 0.85);
}

/* ===== SEARCH ===== */
.products-section {
    padding: 24px 32px 12px;
}

.products-shell {
    max-width: 1320px;
    margin: 0 auto;
}

.search-container {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 24px;
    padding: 30px;
    background:
        linear-gradient(135deg, rgba(26, 79, 160, 0.08), rgba(0, 168, 107, 0.06)),
        var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.search-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.65), transparent 38%);
    pointer-events: none;
}

.search-copy,
.search-controls {
    position: relative;
    z-index: 1;
}

.search-copy {
    max-width: 560px;
}

.search-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: var(--radius-full);
    background: rgba(26, 79, 160, 0.12);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.search-copy h2 {
    font-size: clamp(1.6rem, 2vw, 2.3rem);
    line-height: 1.15;
    margin-bottom: 10px;
}

.search-copy p {
    color: var(--text-muted);
    max-width: 48ch;
}

.search-controls {
    display: grid;
    gap: 14px;
    align-content: center;
}

.search-input-wrap,
.search-modal-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 0 18px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.82);
    min-height: 58px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 18px 30px rgba(15, 31, 61, 0.06);
}

.search-input-wrap svg,
.search-modal-input-wrap svg {
    fill: var(--primary);
    flex-shrink: 0;
}

.search-input-wrap:focus-within,
.search-modal-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26, 79, 160, 0.12);
    transform: translateY(-1px);
}

.search-controls #filters {
    display: flex;
}

#search-input,
#search-modal-input,
#filter-tipo {
    font-family: 'Poppins', sans-serif;
    width: 100%;
    max-width: 100%;
    padding: 0;
    border: none;
    border-radius: 0;
    font-size: 0.95rem;
    background: transparent;
    color: var(--text);
    transition: all 0.2s;
    outline: none;
}

#search-input:focus,
#search-modal-input:focus,
#filter-tipo:focus {
    box-shadow: none;
}

#filter-tipo {
    min-height: 52px;
    padding: 0 20px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 31, 61, 0.05);
}

option {
    font-size: 13px;
}

.taxonomy-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 18px 6px 4px;
}

.taxonomy-pill {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-white);
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.taxonomy-pill-accent {
    border-color: rgba(0, 168, 107, 0.18);
    background: rgba(0, 168, 107, 0.1);
    color: var(--accent-dark);
}

.search-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 88px 20px 24px;
    background: rgba(8, 15, 28, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    will-change: opacity;
}

.search-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.search-modal-panel {
    width: min(760px, 100%);
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 40px rgba(8, 15, 28, 0.14);
    position: relative;
    transform: translateY(10px) scale(0.985);
    transition: transform 0.18s ease, opacity 0.18s ease;
    will-change: transform, opacity;
}

body.dark-theme .search-modal-panel {
    background: rgba(17, 30, 51, 0.88);
    border-color: rgba(138, 155, 191, 0.22);
}

.search-modal.is-open .search-modal-panel {
    transform: translateY(0) scale(1);
}

.search-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    color: var(--text);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.search-modal-close:hover,
.search-modal-close:focus-visible {
    transform: rotate(90deg);
    outline: none;
}

.search-modal-kicker {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: var(--radius-full);
    background: rgba(26, 79, 160, 0.12);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-modal-panel h2 {
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    line-height: 1.08;
    margin-bottom: 8px;
}

.search-modal-panel p {
    color: var(--text-muted);
    max-width: 54ch;
    margin-bottom: 22px;
}

.search-modal-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.search-modal-input-wrap {
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 20px rgba(15, 31, 61, 0.05);
}

.search-modal-submit {
    min-height: 58px;
    padding: 0 24px;
    border: none;
    border-radius: var(--radius-full);
    background: linear-gradient(160deg, rgba(15, 50, 114, 0.65), rgba(0, 101, 168, 0.45));
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.16s, box-shadow 0.16s, filter 0.16s;
    box-shadow: 0 10px 24px rgba(0, 168, 107, 0.18);
}

.search-modal-submit:hover,
.search-modal-submit:focus-visible {
    transform: translateY(-2px);
    filter: brightness(1.04);
    outline: none;
}

.search-modal-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.search-suggestion {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(26, 79, 160, 0.16);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.62);
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.search-suggestion:hover,
.search-suggestion:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(26, 79, 160, 0.32);
    outline: none;
}

/* ===== CATEGORIES ===== */
#categories-section {
    padding: 40px 32px;
    background: var(--bg);
}

.categories-header {
    text-align: center;
    margin-bottom: 32px;
}

.categories-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.categories-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.categories-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.55s;
    text-decoration: none;
    color: #fff;
    box-shadow: var(--shadow-md);
    gap: 10px;
    min-height: 180px;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(15, 50, 114, 0.65), rgba(0, 101, 168, 0.45));
    transition: all 0.30s;
}

.category-card>* {
    position: relative;
    z-index: 1;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-card:hover::before {
    background: linear-gradient(160deg, rgba(15, 50, 114, 0.8), rgba(0, 115, 168, 0.6));
}

.category-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.category-count {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: var(--radius-full);
}

/* ===== PRODUCT CARDS ===== */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 20px;
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.container .card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    gap: 10px;
    transition: all 0.25s;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.container .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.25s;
}

.container .card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.container .card:hover::before {
    opacity: 1;
}

.container .card img {
    width: 100%;
    height: 170px;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    padding: 8px;
}

.card .title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card .price {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.card .product-button {
    width: 100%;
    justify-content: center;
    text-align: center;
    background: var(--primary);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    border: none;
    font-family: 'Poppins', sans-serif;
}

.card .product-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 79, 160, 0.35);
}

.product-button svg {
    display: none;
}

.product-button:hover svg {
    display: block;
}

.product-button:hover span {
    display: none;
}

.load-more-btn {
    display: block;
    width: fit-content;
    margin: 8px auto 0;
    padding: 12px 32px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.load-more-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 79, 160, 0.35);
}

/* ===== VIEW PRODUCTS HEADER ===== */
.view-products-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    text-align: center;
    padding: 48px 32px 40px;
    color: #fff;
}

.view-products-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 8px;
}

.view-products-header p {
    font-size: 1rem;
    opacity: 0.8;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(10, 20, 40, 0.75);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(6px);
}

.modal-content {
    background: var(--modal-bg);
    margin: auto;
    padding: 36px;
    border: 1px solid var(--border);
    width: 90%;
    max-width: 560px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    overflow-y: auto;
    max-height: 85vh;
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close-button {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    transition: color 0.2s;
    background: none;
    border: none;
}

.close-button:hover {
    color: #e53e3e;
}

#modal-image {
    max-width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    padding: 12px;
}

#modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

#modal-price {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
}

#modal-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.modal-observation {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(0, 168, 107, 0.18);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(0, 168, 107, 0.1), rgba(26, 79, 160, 0.08));
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.55;
}

#modal-product-url {
    background: var(--accent);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

#modal-product-url:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
}

.modal-open {
    overflow: hidden;
}

/* ===== FLOATING BUTTONS ===== */
#btnTopo {
    display: none;
    position: fixed;
    bottom: 50px;
    right: 20px;
    z-index: 500;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    width: 44px;
    height: 44px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
    align-items: center;
    justify-content: center;
}

#btnTopo:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-zap {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 500;
    background: #25d366;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-zap:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
}

.btn-zap svg {
    fill: #fff;
}

/* ===== FOOTER ===== */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 32px 20px;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

footer p {
    margin: 4px 0;
    font-size: 0.875rem;
}

footer strong {
    color: #fff;
}

/* ===== ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== BACK LINK ===== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s;
    background: var(--bg-white);
}

.back-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(-2px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    header {
        padding: 0 16px;
        height: 60px;
    }

    .header-logo h2 {
        font-size: 1.05rem;
    }

    .btn-ml span {
        display: none;
    }

    .header-search-trigger span {
        display: none;
    }

    .header-search-trigger {
        width: 44px;
        min-height: 44px;
        padding: 0;
        justify-content: center;
    }

    .hero-section {
        padding: 40px 20px;
    }

    .products-section {
        padding: 18px 16px 4px;
    }

    .hero-stats {
        gap: 24px;
    }

    #categories-section {
        padding: 28px 16px;
    }

    .container {
        padding: 16px;
        gap: 14px;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .search-container {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    #search-input,
    #search-modal-input,
    #filter-tipo {
        max-width: 100%;
    }

    .search-modal {
        padding-top: 72px;
    }

    .search-modal-panel {
        padding: 22px 18px;
        border-radius: 22px;
    }

    .search-modal-form {
        grid-template-columns: 1fr;
    }

    .view-products-header {
        padding: 32px 20px;
    }

    #slides-images {
        margin: 16px auto;
        border-radius: var(--radius-md);
    }

    .slides-container {
        padding-bottom: 60%;
    }

    .modal-content {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    .header-logo img {
        width: 34px;
        height: 34px;
    }

    .categories-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 12px;
    }

    .container .card img {
        height: 130px;
    }

    .taxonomy-strip {
        gap: 10px;
        padding-top: 14px;
    }

    .taxonomy-pill {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .hero-stat strong {
        font-size: 1.4rem;
    }
}