:root {
    --purple: #8c52ff;
    --purple-dark: #6630c6;
    --cream: #f2ebe5;
    --ink: #30253d;
    --white: #ffffff;
    --border-color: #e6dce9;
    --light-purple: #f4eeff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--cream); color: var(--ink); font-family: "Poppins", Arial, sans-serif; line-height: 1.6; }

/* Header & Navegación */
.site-header { background: var(--purple); color: var(--white); }
.nav-menu, .site-footer { width: min(1180px, 92%); margin: 0 auto; }
.nav-menu { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.brand { color: inherit; font-size: 1.35rem; font-weight: 700; text-decoration: none; }
.menu-links { display: flex; gap: 1.5rem; list-style: none; }
.menu-links a { color: inherit; font-size: .95rem; font-weight: 700; text-decoration: none; }
.menu-links a:hover, .menu-links a:focus-visible, .menu-links [aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }

/* Catalog Hero */
.catalog-hero { padding: 5rem 1.5rem 4rem; text-align: center; background: linear-gradient(180deg, #e8dcfb 0%, var(--cream) 100%); }
.catalog-hero > p:last-child { max-width: 650px; margin: 1rem auto 0; }
.eyebrow { margin-bottom: .6rem; color: var(--purple-dark); font-size: .78rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.17; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }

/* Secciones generales */
.category-section, .product-section { width: min(1120px, 90%); margin: 0 auto; padding: 5rem 0; }
.section-heading { text-align: center; }

/* Grid y tarjetas de Categorías */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; margin-top: 2.2rem; }
.category-card { overflow: hidden; border: 2px solid transparent; border-radius: 18px; background: var(--white); color: var(--ink); cursor: pointer; font: inherit; text-align: left; box-shadow: 0 8px 22px rgba(48, 37, 61, .09); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.category-card:hover, .category-card:focus-visible { transform: translateY(-6px); box-shadow: 0 14px 28px rgba(48, 37, 61, .15); }
.category-card:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.category-card.active { border-color: var(--purple); box-shadow: 0 0 0 2px var(--purple), 0 12px 28px rgba(140, 82, 255, .22); }
.category-card img { display: block; width: 100%; aspect-ratio: 1 / .78; object-fit: cover; background: #eee; }
.category-card span, .category-card small { display: block; padding: 0 1.25rem; }
.category-card span { margin-top: 1.2rem; font-size: 1.15rem; font-weight: 700; }
.category-card small { padding-bottom: 1.3rem; color: var(--purple-dark); font-weight: 700; }

/* Grid y tarjetas de Productos */
.product-section { padding-top: 1rem; scroll-margin-top: 1rem; }
.products-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; }
.show-all { border: 1.5px solid var(--purple); border-radius: 999px; padding: .7rem 1.2rem; background: transparent; color: var(--purple-dark); cursor: pointer; font: inherit; font-weight: 700; transition: background .2s ease, color .2s ease; }
.show-all:hover { background: #eadfff; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.product-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border-color); border-radius: 18px; background: var(--white); box-shadow: 0 8px 22px rgba(48, 37, 61, .09); transition: transform .2s ease, box-shadow .2s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(48, 37, 61, .14); }
.product-image-wrap { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #eee; }
.product-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.product-card:hover .product-image-wrap img { transform: scale(1.04); }
.product-price-badge { position: absolute; top: 12px; right: 12px; background: rgba(140, 82, 255, 0.95); backdrop-filter: blur(4px); color: var(--white); font-weight: 700; font-size: 0.95rem; padding: 0.35rem 0.85rem; border-radius: 999px; box-shadow: 0 4px 12px rgba(0, 0, 0, .22); }
.product-content { padding: 1.4rem; display: flex; flex-direction: column; flex-grow: 1; }
.product-header { margin-bottom: .4rem; }
.product-content h3 { font-size: 1.25rem; color: var(--ink); }
.product-content p { margin: .4rem 0 1.2rem; font-size: .95rem; color: #584a6b; flex-grow: 1; }
.product-content .no-desc { font-style: italic; color: #8e80a0; }
.product-card-footer { margin-top: auto; padding-top: 0.5rem; }
.consult-link { color: var(--purple-dark); font-size: .92rem; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 0.35rem; }
.consult-link:hover { text-decoration: underline; }
.empty-state { grid-column: 1 / -1; padding: 3rem 2rem; border-radius: 18px; background: var(--white); text-align: center; color: #6e6080; font-size: 1.05rem; }

/* Sección personalizada / CTA */
.custom-order { padding: 5rem 1.5rem; text-align: center; color: var(--white); background: var(--purple); }
.custom-order .eyebrow { color: #ebddff; }
.custom-order > p:not(.eyebrow) { max-width: 600px; margin: 1rem auto 1.6rem; }
.button { display: inline-block; padding: .85rem 1.5rem; border-radius: 999px; background: var(--white); color: var(--purple-dark); font-weight: 700; text-decoration: none; transition: transform .2s ease, background-color .2s ease; }
.button:hover { transform: translateY(-2px); }

/* Footer */
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 82px; color: var(--white); background: #2d1b47; font-size: .85rem; }
.admin-link-footer { color: #caaeff; text-decoration: none; font-size: 0.8rem; margin-left: 0.8rem; padding: 0.2rem 0.5rem; border-radius: 6px; border: 1px solid rgba(202, 174, 255, 0.35); transition: all .2s ease; }
.admin-link-footer:hover { color: #fff; border-color: #fff; background: rgba(255, 255, 255, 0.1); }

/* Media queries */
@media (max-width: 800px) {
    .category-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .nav-menu { min-height: auto; padding: 1rem 0; flex-direction: column; gap: .75rem; }
    .menu-links { gap: 1rem; }
    .category-section, .product-section { padding: 4rem 0; }
    .category-grid, .product-grid { grid-template-columns: 1fr; max-width: 420px; margin-right: auto; margin-left: auto; }
    .products-toolbar, .site-footer { flex-direction: column; align-items: flex-start; }
    .site-footer { padding: 1.5rem 0; align-items: center; text-align: center; }
}
