/* =========================================================================
   Tema Aurora — tienda de accesorios
   Estructura primero: cada bloque del panel tiene aquí su forma visual.
   ========================================================================= */

:root {
    --bg:        #ffffff;
    --tint:      #f6f6f4;
    --sand:      #efe9e1;
    --ink:       #1e1e1e;
    --ink-2:     #56585c;
    --ink-3:     #8b8d92;
    --line:      #e6e6e4;
    --dark:      #1b1d21;
    --sale:      #c8362a;
    --ok:        #1c7a54;

    --wrap:      1360px;
    --gap:       24px;
    --r:         4px;

    --ease-out:  cubic-bezier(.23, 1, .32, 1);
    --dur-press: 140ms;
    --dur-hover: 260ms;
}

* { box-sizing: border-box; }

body.site {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 15px/1.6 "Helvetica Neue", Helvetica, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    padding: 10px 16px; background: var(--dark); color: #fff;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* --- Cabecera ----------------------------------------------------------- */

.topline {
    background: var(--dark); color: #d8dade;
    font-size: 12.5px; text-align: center;
}
.topline .wrap { padding-top: 8px; padding-bottom: 8px; }

.masthead { border-bottom: 1px solid var(--line); }
.masthead__inner {
    display: flex; align-items: center; gap: 28px;
    padding-top: 18px; padding-bottom: 18px;
}

.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo__mark {
    width: 26px; height: 26px; border-radius: 7px;
    background: linear-gradient(140deg, #3a3f47, #14161a);
}
.logo__text { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.logo--light .logo__text { color: #fff; }
.logo--light .logo__mark { background: linear-gradient(140deg, #6d737d, #33373d); }

.searchbar {
    flex: 1; display: flex; align-items: stretch;
    border: 1px solid var(--ink); border-radius: 40px; overflow: hidden;
    max-width: 620px;
}
.searchbar__cat {
    border: 0; background: transparent; padding: 0 8px 0 18px;
    font: inherit; font-size: 13.5px; color: var(--ink-2); cursor: pointer;
}
.searchbar__input { flex: 1; border: 0; padding: 11px 12px; font: inherit; min-width: 0; }
.searchbar__input:focus { outline: none; }
.searchbar__go {
    border: 0; padding: 0 22px; cursor: pointer;
    background: var(--ink); color: #fff;
    font: 500 13.5px/1 inherit;
    transition: transform var(--dur-press) var(--ease-out);
}
.searchbar__go:active { transform: scale(.97); }

.tools { display: flex; align-items: center; gap: 22px; flex: none; }
.tools__item { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); position: relative; }
.tools__icon { font-size: 17px; color: var(--ink); }
.tools__count {
    min-width: 18px; height: 18px; padding: 0 5px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--ink); color: #fff;
    border-radius: 20px; font-size: 11px; font-weight: 600;
}

.burger { display: none; border: 0; background: none; font-size: 20px; cursor: pointer; }

/* Navegación: se usa constantemente, sin animaciones de entrada. */
.navbar { border-bottom: 1px solid var(--line); }
.navbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.navbar__aside { font-size: 13px; color: var(--ink-3); }

.menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.menu__item { position: relative; }
.menu__link {
    display: block; padding: 14px 14px;
    font-size: 13.5px; font-weight: 500; color: var(--ink-2);
}
.menu__item:hover > .menu__link,
.menu__item.is-active > .menu__link { color: var(--ink); }

.submenu {
    position: absolute; top: 100%; left: 0; z-index: 20;
    min-width: 210px; padding: 8px 0;
    background: #fff; border: 1px solid var(--line);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .08);
    opacity: 0; visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out), visibility 160ms;
}
.menu__item:hover > .submenu,
.menu__item:focus-within > .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu__list { list-style: none; margin: 0; padding: 0; }
.submenu__link { display: block; padding: 7px 18px; font-size: 13.5px; color: var(--ink-2); }
.submenu__link:hover { background: var(--tint); color: var(--ink); }

/* --- Secciones ---------------------------------------------------------- */

.section { padding: 62px 0; }
.section--tight { padding: 28px 0 50px; }
.section--tint  { background: var(--tint); }

.section-head { max-width: 620px; margin: 0 auto 34px; text-align: center; }
.section-head--left { margin-left: 0; text-align: left; }
.section-head__eyebrow { margin: 0 0 6px; font-size: 13px; color: var(--ink-3); }
.section-head__title   { font-size: 30px; }
.section-head__sub     { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; }

.note { padding: 40px 0; text-align: center; color: var(--ink-3); }
.page-title { font-size: 28px; margin-bottom: 24px; }

/* --- Botones ------------------------------------------------------------ */

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 26px;
    font: 500 13.5px/1 inherit; letter-spacing: .01em;
    border: 1px solid transparent; border-radius: 40px; cursor: pointer;
    transition: transform var(--dur-press) var(--ease-out),
                background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}
.btn:active { transform: scale(.97); }
.btn--solid { background: var(--ink); color: #fff; }
.btn--solid:hover { background: #000; }
.btn--line  { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn--wide  { flex: 1; }

/* --- Bloque: portada grande --------------------------------------------- */

.hero { overflow: hidden; }
.hero--claro  { background: #fff; }
.hero--arena  { background: var(--sand); }
.hero--oscuro { background: var(--dark); color: #fff; }
.hero--oscuro .hero__eyebrow { color: #a9adb5; }
.hero--oscuro .btn--line { color: #fff; border-color: rgba(255,255,255,.5); }
.hero--oscuro .btn--solid { background: #fff; color: var(--ink); }

.hero__inner {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 48px; align-items: center;
    min-height: 460px; padding-top: 48px; padding-bottom: 48px;
}
.hero__eyebrow { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); }
.hero__title   { font-size: clamp(30px, 4.4vw, 52px); }
.hero__lead    { margin: 16px 0 0; max-width: 48ch; font-size: 16px; line-height: 1.65; }
.hero__cta     { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.hero__media img { width: 100%; height: 420px; object-fit: cover; border-radius: 8px; }

/* --- Bloque: rejilla de categorías -------------------------------------- */

.cat-grid {
    display: grid; gap: var(--gap);
    grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr));
}
.cat { text-align: center; }
.cat__media {
    display: block; margin-bottom: 12px;
    border-radius: 50%; overflow: hidden; background: var(--tint);
    aspect-ratio: 1;
}
.cat__media img { width: 100%; height: 100%; object-fit: cover; }
.cat__name  { display: block; font-size: 14.5px; font-weight: 600; }
.cat__count { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }

@media (hover: hover) and (pointer: fine) {
    .cat__media img { transition: transform var(--dur-hover) var(--ease-out); }
    .cat:hover .cat__media img { transform: scale(1.05); }
}

/* --- Producto ----------------------------------------------------------- */

.product-grid {
    display: grid; gap: var(--gap) 18px;
    grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
}

.product { position: relative; }
.product__media {
    position: relative; overflow: hidden;
    background: var(--tint); border-radius: var(--r);
    aspect-ratio: 1;
}
.product__link { display: block; width: 100%; height: 100%; }
.product__img { width: 100%; height: 100%; object-fit: cover; }
.product__img--hover {
    position: absolute; inset: 0;
    opacity: 0;
}

.product__badge {
    position: absolute; top: 10px; left: 10px; z-index: 2;
    padding: 3px 9px; border-radius: 20px;
    background: var(--ink); color: #fff;
    font-size: 11px; font-weight: 600; letter-spacing: .02em;
}
.product__badge--oferta  { background: var(--sale); }
.product__badge--nuevo   { background: var(--ok); }
.product__badge--agotado { background: var(--ink-3); }

.product__actions {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    display: flex; flex-direction: column; gap: 6px;
}
.product__action {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: #fff; color: var(--ink);
    border: 1px solid var(--line); border-radius: 50%;
    font-size: 14px; cursor: pointer;
    transition: transform var(--dur-press) var(--ease-out), background-color 160ms ease;
}
.product__action:hover  { background: var(--ink); color: #fff; }
.product__action:active { transform: scale(.94); }

.product__cart {
    position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2;
    padding: 10px; cursor: pointer;
    background: var(--ink); color: #fff;
    border: 0; border-radius: 40px;
    font: 500 13px/1 inherit;
    transition: transform var(--dur-press) var(--ease-out);
}
.product__cart:active { transform: scale(.98); }

/* Los estados al pasar el cursor solo existen donde hay cursor real. */
@media (hover: hover) and (pointer: fine) {
    .product__img--hover,
    .product__actions,
    .product__cart {
        opacity: 0;
        transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
    }
    .product__actions { transform: translateX(6px); }
    .product__cart    { transform: translateY(8px); }

    .product:hover .product__img--hover,
    .product:hover .product__actions,
    .product:hover .product__cart { opacity: 1; transform: none; }

    .product__cart:active { transform: scale(.98); }
}

.product__info { padding-top: 12px; text-align: center; }
.product__cat   { font-size: 12px; color: var(--ink-3); }
.product__title { margin: 4px 0 6px; font-size: 14.5px; font-weight: 500; line-height: 1.35; }
.product__title a:hover { text-decoration: underline; }
.product__price { margin: 0; font-size: 15px; font-weight: 600; }
.product__price del { margin-right: 7px; color: var(--ink-3); font-weight: 400; }
.product__price span { color: var(--ink); }

/* --- Bloque: ventajas --------------------------------------------------- */

.features {
    display: grid; gap: var(--gap);
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.feature { text-align: center; padding: 8px; }
.feature__glyph {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; margin-bottom: 14px;
    border: 1px solid var(--ink); border-radius: 50%;
    font-size: 18px;
}
.feature__title { font-size: 16px; margin-bottom: 6px; }
.feature__text  { margin: 0; font-size: 14px; color: var(--ink-2); }

/* --- Bloque: banners ---------------------------------------------------- */

.banners {
    display: grid; gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.banner {
    position: relative; display: block;
    border-radius: 6px; overflow: hidden;
    aspect-ratio: 4 / 3;
}
.banner__img { width: 100%; height: 100%; object-fit: cover; }
.banner__body {
    position: absolute; inset: auto 0 0 0;
    display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
    padding: 22px;
    background: linear-gradient(to top, rgba(12, 14, 17, .72), rgba(12, 14, 17, 0));
    color: #fff;
}
.banner__sub   { font-size: 12.5px; opacity: .85; }
.banner__title { font-size: 21px; font-weight: 600; }
.banner__go    { margin-top: 8px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.6); padding-bottom: 2px; }

@media (hover: hover) and (pointer: fine) {
    .banner__img { transition: transform 400ms var(--ease-out); }
    .banner:hover .banner__img { transform: scale(1.04); }
}

/* --- Blog --------------------------------------------------------------- */

.post-grid {
    display: grid; gap: 28px;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.post-card__media { position: relative; display: block; border-radius: 6px; overflow: hidden; }
.post-card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.post-card__date {
    position: absolute; top: 12px; left: 12px;
    padding: 5px 10px; background: #fff;
    font-size: 12px; font-weight: 600; border-radius: var(--r);
}
.post-card__body  { padding-top: 14px; }
.post-card__cat   { font-size: 12px; color: var(--ink-3); }
.post-card__title { margin: 5px 0 7px; font-size: 17px; }
.post-card__title a:hover { text-decoration: underline; }
.post-card__text  { margin: 0; font-size: 14px; color: var(--ink-2); }

.entry-head { max-width: 760px; margin: 0 auto 26px; text-align: center; }
.entry-head__cat   { font-size: 12.5px; color: var(--ink-3); }
.entry-head__title { margin: 8px 0; font-size: clamp(26px, 3.4vw, 40px); }
.entry-head__date  { margin: 0; font-size: 13px; color: var(--ink-3); }
.entry__cover { width: 100%; max-height: 480px; object-fit: cover; border-radius: 8px; }

/* --- Tienda: listado con filtros ---------------------------------------- */

.crumbs {
    display: flex; gap: 8px; align-items: center;
    padding: 16px 0; font-size: 12.5px; color: var(--ink-3);
}
.crumbs a:hover { color: var(--ink); }
.crumbs__here { color: var(--ink); }

.shop { display: grid; grid-template-columns: 244px minmax(0, 1fr); gap: 40px; align-items: start; }
.shop__bar {
    display: flex; align-items: center; gap: 14px;
    padding-bottom: 16px; margin-bottom: 24px;
    border-bottom: 1px solid var(--line);
}
.shop__title { font-size: 24px; }
.shop__count { font-size: 13px; color: var(--ink-3); }
.shop__sort  { margin-left: auto; }
.input-line {
    border: 1px solid var(--line); border-radius: var(--r);
    padding: 7px 10px; font: inherit; font-size: 13.5px; background: #fff;
}

.widget { margin-bottom: 32px; }
.widget__title { font-size: 15px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.widget__list  { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.widget__list li { display: flex; justify-content: space-between; padding: 5px 0; color: var(--ink-2); }
.widget__list li.is-child { padding-left: 14px; font-size: 13.5px; color: var(--ink-3); }
.widget__list a:hover { color: var(--ink); text-decoration: underline; }
.widget__count { color: var(--ink-3); font-size: 12.5px; }

.widget__mini { list-style: none; margin: 0; padding: 0; }
.widget__mini a { display: flex; gap: 12px; align-items: center; padding: 9px 0; }
.widget__mini img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r); background: var(--tint); }
.widget__mini strong { display: block; font-size: 13.5px; font-weight: 500; }
.widget__mini em { font-style: normal; font-size: 13px; color: var(--ink-2); }

/* --- Ficha de producto --------------------------------------------------- */

.single { display: grid; grid-template-columns: 1.05fr 1fr; gap: 52px; align-items: start; }
.single__img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--tint); border-radius: 6px; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; }
.thumbs__item {
    width: 74px; height: 74px; padding: 0; cursor: pointer; overflow: hidden;
    background: var(--tint); border: 1px solid var(--line); border-radius: var(--r);
    transition: border-color 160ms ease;
}
.thumbs__item.is-current { border-color: var(--ink); }
.thumbs__item img { width: 100%; height: 100%; object-fit: cover; }

.single__cat   { font-size: 13px; color: var(--ink-3); }
.single__title { margin: 8px 0 14px; font-size: clamp(24px, 3vw, 34px); }
.single__price { margin: 0 0 6px; font-size: 26px; font-weight: 600; }
.single__price del { margin-right: 10px; font-size: 19px; color: var(--ink-3); font-weight: 400; }
.single__note  { margin: 0 0 18px; font-size: 13px; color: var(--ok); }
.single__lead  { margin: 0 0 24px; color: var(--ink-2); max-width: 52ch; }
.single__buy   { display: flex; gap: 10px; align-items: stretch; max-width: 420px; }
.qty {
    width: 78px; padding: 12px; text-align: center;
    border: 1px solid var(--line); border-radius: 40px; font: inherit;
}
.single__meta { list-style: none; margin: 28px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); font-size: 14px; }
.single__meta li { display: flex; gap: 12px; padding: 5px 0; color: var(--ink-2); }
.single__meta span { min-width: 130px; color: var(--ink-3); }
.single__meta a:hover { text-decoration: underline; }

/* --- Búsqueda ------------------------------------------------------------ */

.results { display: grid; gap: 12px; }
.result {
    display: flex; gap: 16px; align-items: center;
    padding: 14px; border: 1px solid var(--line); border-radius: 6px;
    transition: border-color 160ms ease;
}
.result:hover { border-color: var(--ink); }
.result img { width: 76px; height: 76px; object-fit: cover; border-radius: var(--r); background: var(--tint); }
.result strong { display: block; font-size: 15.5px; }
.result em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.result__text { display: block; margin-top: 4px; font-size: 13.5px; color: var(--ink-2); }

/* --- Texto libre --------------------------------------------------------- */

.prose { font-size: 16px; line-height: 1.72; color: var(--ink-2); }
.prose--narrow { max-width: 68ch; margin: 0 auto; }
.prose h2, .prose h3 { color: var(--ink); margin: 1.6em 0 .5em; }
.prose__title { font-size: 26px; margin-bottom: .6em; color: var(--ink); }
.prose p { margin: 0 0 1.1em; }
.prose a { text-decoration: underline; }
.prose ul, .prose ol { padding-left: 1.3em; }

.notfound { text-align: center; }
.notfound__code { font-size: 68px; font-weight: 700; color: var(--line); margin: 0; line-height: 1; }

/* --- Paginación ---------------------------------------------------------- */

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 40px; }
.pagination__link {
    min-width: 38px; padding: 9px 12px; text-align: center;
    font-size: 13.5px; color: var(--ink-2);
    border: 1px solid var(--line); border-radius: var(--r);
    transition: background-color 160ms ease, color 160ms ease;
}
.pagination__link:hover { background: var(--tint); color: var(--ink); }
.pagination__link.is-current { background: var(--ink); border-color: var(--ink); color: #fff; }

/* --- Pie ----------------------------------------------------------------- */

.footer { margin-top: 40px; background: var(--dark); color: #b9bdc4; }
.footer__grid {
    display: grid; gap: 40px;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    padding-top: 54px; padding-bottom: 44px;
}
.footer__text  { margin: 14px 0 0; font-size: 14px; max-width: 38ch; }
.footer__title { margin-bottom: 14px; font-size: 14px; color: #fff; }
.footer__list  { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.footer__list li { padding: 4px 0; }
.footer__list a:hover { color: #fff; }
.footer__list--plain li { color: #9aa0a8; }
.footer__bar { border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.footer__bar-inner { display: flex; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }

/* --- Menú lateral en móvil ------------------------------------------------ */

.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer[hidden] { display: none; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(12, 14, 17, .5); animation: fade 200ms var(--ease-out); }
.drawer__panel {
    position: absolute; top: 0; bottom: 0; left: 0;
    width: min(320px, 84vw); padding: 20px;
    background: #fff; overflow-y: auto;
    animation: slide-in 260ms var(--ease-out);
}
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.drawer__close { border: 0; background: none; font-size: 18px; cursor: pointer; }
.menu-mobile { list-style: none; margin: 0; padding: 0; }
.menu-mobile__link { display: block; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.menu-mobile .submenu { position: static; opacity: 1; visibility: visible; transform: none; border: 0; box-shadow: none; padding: 0 0 0 14px; }

@keyframes fade     { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(-100%); } }

/* --- Adaptación ----------------------------------------------------------- */

@media (max-width: 1100px) {
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cat-grid     { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .shop         { grid-template-columns: 210px minmax(0, 1fr); gap: 28px; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .searchbar, .navbar, .tools__label { display: none; }
    .burger { display: block; }
    .masthead__inner { justify-content: space-between; }
    .hero__inner { grid-template-columns: 1fr; min-height: 0; }
    .hero__media img { height: 280px; }
    .single { grid-template-columns: 1fr; gap: 28px; }
    .shop   { grid-template-columns: 1fr; }
    .shop__side { order: 2; }
    .section { padding: 44px 0; }
}

@media (max-width: 560px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cat-grid     { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer__grid { grid-template-columns: 1fr; gap: 28px; }
    .section-head__title { font-size: 24px; }
}

/* --- Movimiento reducido -------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 1ms !important; transition-duration: 1ms !important; }
    .product__img--hover, .product__actions, .product__cart { transform: none !important; }
}
