/* Ajustes responsivos y de accesibilidad para Solaris GT. */
html { overflow-x: hidden; }
body { min-width: 320px; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
.brand-logo-wrap { width: 72px; height: 66px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border-radius: 13px; background: #fff; box-shadow: 0 7px 22px rgba(0,0,0,.22); }
.brand-logo { width: 100%; height: 100%; max-width: none; object-fit: contain; padding: 3px; }
.brand-copy { min-width: 0; }
.footer-brand .brand-logo-wrap { width: 104px; height: 96px; border-radius: 16px; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, .button, .filter, .icon-button, .site-header a { touch-action: manipulation; }
.button, .mini-button, .filter, .icon-button, .cart-button, .menu-button { min-height: 44px; }
.product-card, .contact-card, .auth-card, .product-form, .admin-item { min-width: 0; }
.product-body h3, .product-body p, .contact-card a, .contact-card p, .admin-item h3, .admin-item p { overflow-wrap: anywhere; }

@media (min-width: 1280px) {
  .product-grid { max-width: 1320px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .section-heading, .shop-tools { max-width: 1320px; }
  .hero-content { max-width: 720px; }
}

@media (max-width: 1100px) {
  .site-header { padding-inline: 24px; }
  .site-header nav { gap: 18px; }
  .hero-content { left: clamp(24px, 6vw, 70px); max-width: min(620px, 64vw); }
  .admin-grid { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); }
}

@media (max-width: 850px) {
  .site-header { height: 74px; gap: 10px; padding-inline: 18px; }
  .brand-logo-wrap { width: 64px; height: 58px; border-radius: 11px; }
  .site-header nav { top: 74px; max-height: calc(100svh - 74px); overflow-y: auto; box-shadow: 0 18px 30px rgba(3,15,29,.24); }
  .site-header nav a { min-height: 46px; display: flex; align-items: center; }
  .menu-button { order: 4; width: 44px; height: 44px; padding: 0; place-items: center; }
  .menu-button[aria-expanded="true"] { background: rgba(255,255,255,.1); border-radius: 50%; }
  .cart-button { min-height: 42px; }
  .hero { height: min(720px, calc(100svh - 74px)); min-height: 600px; }
  .hero-content { max-width: min(620px, calc(100% - 48px)); }
  .hero h1 { font-size: clamp(3rem, 10vw, 5rem); }
  .promise { gap: 28px; }
  .featured-section { padding-block: 64px; }
  .shop-tools { align-items: flex-start; flex-direction: column; }
  .search { width: 100%; min-width: 0; }
  .filters { width: 100%; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: thin; }
  .filter { flex: 0 0 auto; }
  .admin-grid { grid-template-columns: 1fr; }
  .cart-drawer { width: min(520px, 100%); }
}

@media (max-width: 640px) {
  .site-header { padding-inline: 12px; }
  .brand { gap: 9px; min-width: 0; }
  .brand-logo-wrap { width: 56px; height: 52px; border-radius: 10px; }
  .brand b { font-size: .88rem; letter-spacing: .15em; white-space: nowrap; }
  .cart-button { padding: 7px 10px; }
  .hero { height: auto; min-height: calc(100svh - 74px); }
  .hero > img { position: absolute; inset: 0; }
  .hero-content { position: relative; left: auto; top: auto; bottom: auto; transform: none; max-width: none; min-height: calc(100svh - 74px); padding: clamp(110px, 24vh, 190px) 20px 42px; display: flex; flex-direction: column; justify-content: flex-end; }
  .hero h1 { font-size: clamp(2.55rem, 13vw, 4.3rem); line-height: .98; }
  .hero-content > p { line-height: 1.55; margin-block: 19px 25px; }
  .hero-actions { width: 100%; }
  .hero-actions .button { width: 100%; }
  .promise { grid-template-columns: 1fr; padding: 48px 20px; }
  .featured-section { padding: 54px 16px; }
  .section-heading { gap: 5px; }
  .section-heading h2 { font-size: clamp(2rem, 10vw, 3rem); }
  .product-grid { grid-template-columns: 1fr; gap: 16px; }
  .product-visual { aspect-ratio: 16 / 11; }
  .product-body { padding: 18px; }
  .product-bottom { gap: 12px; align-items: stretch; flex-direction: column; }
  .mini-button { width: 100%; display: inline-flex; align-items: center; justify-content: center; }
  .page-head { padding: 54px 20px 38px; }
  .page-head h1, .contact-copy h1, .admin-intro h1 { font-size: clamp(2.5rem, 13vw, 4rem); }
  .shop-tools { margin-block: 24px 18px; padding-inline: 16px; }
  .shop-grid { padding: 0 16px 56px; }
  .empty-state { padding: 56px 18px; }
  .contact-copy { padding: 58px 20px; }
  .contact-copy p { font-size: 1rem; }
  .contact-card { width: calc(100% - 32px); padding: 24px 20px; margin: 32px auto; }
  .admin-shell { padding: 46px 16px 70px; }
  .auth-card, .product-form { padding: 22px 18px; }
  .admin-toolbar { align-items: flex-start; gap: 14px; flex-direction: column; }
  .admin-toolbar .button { width: 100%; }
  .form-actions { flex-direction: column; }
  .form-actions .button { width: 100%; }
  .admin-actions { width: 100%; }
  .admin-actions .icon-button { flex: 1; }
  .site-footer { padding: 36px 20px; }
  .footer-brand .brand-logo-wrap { width: 92px; height: 84px; border-radius: 14px; }
  .cart-drawer { width: 100%; }
  .cart-head { padding: 18px 16px; }
  .cart-head h2 { font-size: 1.65rem; }
  .cart-items { padding-inline: 16px; }
  .cart-checkout { padding: 16px; max-height: 66svh; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .cart-checkout input, .cart-checkout textarea, .auth-card input, .product-form input, .product-form select, .product-form textarea { font-size: 16px; }
}

/* Cabecera clara y acceso de cuenta, siguiendo el patrón funcional de la tienda de referencia. */
.topbar { padding: 7px 16px; background: var(--navy); color: #dbe8f2; text-align: center; font-size: .82rem; }
.site-header { height: 78px; top: 0; justify-content: flex-start; gap: 28px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); color: var(--navy); backdrop-filter: blur(12px); }
.site-header nav { margin-left: auto; }
.site-header nav a { color: #344b5e; font-weight: 700; }
.site-header nav a:not(.admin-link)::after { background: var(--sun); }
.admin-link { border-color: #cbd8de; }
.nav-actions { display: flex; align-items: center; gap: 9px; }
.account-button,.cart-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #d7e1e5; border-radius: 11px; padding: 9px 13px; background: #fff; color: var(--navy); font-size: .86rem; font-weight: 800; }
.cart-button { position: relative; }
.cart-button b { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: #e54848; color: #fff; font-size: .7rem; }
.menu-button { color: var(--navy); }

.social-login-grid { display: grid; gap: 10px; margin: 18px 0; }
.social-login { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 11px; border: 1px solid #d6e0e4; border-radius: 10px; background: #fff; color: var(--ink); font-weight: 800; cursor: pointer; }
.social-login.facebook { background: #1877f2; border-color: #1877f2; color: #fff; }
.social-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #174ea6; font-weight: 900; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: .8rem; }
.auth-divider::before,.auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.account-muted { color: var(--muted); }

.multi-image-preview { min-height: 82px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 10px; border: 1px dashed #bfcfd5; border-radius: 10px; color: var(--muted); font-size: .8rem; }
.multi-image-preview > span { grid-column: 1 / -1; align-self: center; text-align: center; }
.preview-image { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: #e8eff1; }
.preview-image img { width: 100%; height: 100%; object-fit: cover; }
.preview-image button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(7,27,49,.82); color: #fff; cursor: pointer; }
.gallery-button { position: absolute; z-index: 2; top: 50%; width: 34px; height: 34px; transform: translateY(-50%); border: 0; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--navy); box-shadow: 0 4px 14px rgba(0,0,0,.18); cursor: pointer; }
.gallery-button.prev { left: 9px; }
.gallery-button.next { right: 9px; }
.gallery-count { position: absolute; z-index: 2; right: 11px; bottom: 10px; padding: 4px 8px; border-radius: 999px; background: rgba(7,27,49,.78); color: #fff; font-size: .68rem; font-weight: 800; }

@media (max-width: 850px) {
  .site-header { height: 72px; gap: 10px; padding-inline: 14px; }
  .site-header nav { top: 72px; background: #fff; }
  .site-header nav a { color: var(--navy); }
  .nav-actions { margin-left: auto; }
  .menu-button { order: 4; }
}

@media (max-width: 560px) {
  .topbar { padding: 5px 8px; font-size: .68rem; }
  .site-header { gap: 6px; padding-inline: 9px; }
  .nav-actions { gap: 6px; }
  .account-button,.cart-button { width: 40px; height: 40px; min-height: 40px; flex: 0 0 40px; margin-left: 0; padding: 0; font-size: 1rem !important; }
  .account-button span,.cart-button .cart-label { display: none !important; }
  .cart-button::before { content: none !important; }
  .cart-button b { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; font-size: .62rem; }
  .menu-button { width: 40px; height: 40px; min-height: 40px; flex: 0 0 40px; font-size: 1.35rem; }
  .brand-logo-wrap { width: 46px; height: 44px; }
  .multi-image-preview { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 380px) {
  .brand-logo-wrap { width: 44px; height: 42px; }
  .brand small { display: none; }
  .brand b { letter-spacing: .1em; }
  .site-header { gap: 6px; }
  .hero-content { padding-inline: 16px; }
  .hero h1 { font-size: 2.55rem; }
  .cart-button { padding: 0; }
}

@media (hover: hover) and (pointer: fine) {
  .product-card { transition: transform .22s ease, box-shadow .22s ease; }
  .product-card:hover { transform: translateY(-4px); box-shadow: 0 18px 45px rgba(7,27,49,.13); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

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

.password-card { margin: 0 0 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.password-card summary { cursor: pointer; padding: 16px 20px; font-weight: 800; color: var(--navy); background: #f3f8f9; }
.password-card form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; padding: 20px; }
.password-card form > p:first-child { grid-column: 1 / -1; margin: 0; color: var(--muted); }
.password-card label { display: grid; gap: 6px; min-width: 0; font-size: .88rem; font-weight: 700; }
.password-card input { width: 100%; border: 1px solid #cad6dc; border-radius: 8px; padding: 12px; }
.password-card .form-message { grid-column: 1 / -1; margin: 0; }
.image-upload-label input[type="file"] { padding: 9px; background: #fff; cursor: pointer; }
.image-upload-label small { color: var(--muted); font-weight: 500; line-height: 1.4; }

.cart-summary { display: grid; gap: 9px; margin-bottom: 14px; }
.cart-summary > div { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.cart-summary strong { color: var(--ink); }
.cart-summary .cart-total { margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink); }
.cart-summary > small { color: #087f79; font-weight: 750; line-height: 1.4; }
.cart-summary > small.free-shipping { color: #168543; }
.continue-shopping { width: 100%; margin-bottom: 16px; background: #eef4f5; color: var(--navy); border: 1px solid #dbe5e8; }
.location-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cart-checkout select { width: 100%; border: 1px solid #cad6dc; border-radius: 8px; padding: 10px; background: #fff; }

@media (max-width: 480px) {
  .location-fields { grid-template-columns: 1fr; }
  .cart-checkout select { font-size: 16px; }
}

@media (max-width: 900px) {
  .password-card form { grid-template-columns: 1fr; }
}

/* Tienda, cuenta y catálogo enriquecidos. */
.sort-control { display: grid; gap: 5px; min-width: 210px; color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.sort-control select { min-height: 46px; border: 1px solid #cad6dc; border-radius: 999px; padding: 0 38px 0 16px; background: #fff; color: var(--ink); font: inherit; letter-spacing: 0; text-transform: none; }
.results-count { width: min(1320px, calc(100% - 48px)); margin: 0 auto 18px; color: var(--muted); font-weight: 700; }
.product-label { position: absolute; top: 14px; left: 14px; z-index: 1; padding: 7px 10px; border-radius: 999px; background: var(--amber); color: var(--navy); font-size: .7rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.product-brand { display: block; margin: -3px 0 10px; color: #087f79; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.product-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.product-meta span { padding: 5px 8px; border-radius: 999px; background: #eff6f7; color: #31535d; font-size: .7rem; font-weight: 750; }
.product-price { display: grid; gap: 1px; }
.product-price del { color: #88999f; font-size: .75rem; font-weight: 600; }
.mini-button:disabled { cursor: not-allowed; opacity: .48; }

.account-shell { min-height: calc(100svh - 84px); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); gap: clamp(28px, 6vw, 90px); align-items: center; padding: clamp(54px, 8vw, 110px) max(24px, calc((100vw - 1200px) / 2)); background: linear-gradient(135deg, #eef7f6 0%, #fff9eb 100%); }
.account-intro h1 { max-width: 650px; margin: 12px 0 20px; color: var(--navy); font-size: clamp(3rem, 6vw, 5.8rem); line-height: .94; }
.account-intro > p { max-width: 630px; color: var(--muted); font-size: 1.08rem; line-height: 1.7; }
.account-intro ul { display: grid; gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; color: #174d55; font-weight: 750; }
.account-card { width: 100%; max-width: 530px; justify-self: end; padding: clamp(24px, 4vw, 44px); border: 1px solid rgba(10,65,76,.12); border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: 0 24px 70px rgba(7,37,48,.12); }
.account-card h2 { margin: 8px 0 22px; color: var(--navy); font-size: clamp(1.8rem, 3vw, 2.6rem); }
.account-card form { display: grid; gap: 15px; }
.account-card label { display: grid; gap: 7px; color: var(--ink); font-size: .88rem; font-weight: 750; }
.account-card input { width: 100%; min-height: 48px; border: 1px solid #c9d7dc; border-radius: 10px; padding: 11px 13px; font-size: 1rem; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 22px; padding: 5px; border-radius: 12px; background: #edf3f4; }
.auth-tabs button { min-height: 42px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.auth-tabs button.active { background: #fff; color: var(--navy); box-shadow: 0 4px 14px rgba(7,37,48,.1); }
.auth-link { border: 0; background: transparent; color: #087f79; font-weight: 750; cursor: pointer; }
.account-avatar { width: 70px; height: 70px; display: grid; place-items: center; margin-bottom: 20px; border-radius: 50%; background: var(--amber); color: var(--navy); font-size: 1.8rem; font-weight: 900; }

@media (max-width: 900px) {
  .account-shell { grid-template-columns: 1fr; }
  .account-card { max-width: 680px; justify-self: stretch; }
}

@media (max-width: 640px) {
  .sort-control { width: 100%; }
  .sort-control select { width: 100%; border-radius: 10px; font-size: 16px; }
  .results-count { width: calc(100% - 32px); }
  .account-shell { padding: 48px 16px 70px; }
  .account-intro h1 { font-size: clamp(2.7rem, 14vw, 4.1rem); }
  .account-card { padding: 22px 18px; border-radius: 18px; }
  .account-card input { font-size: 16px; }
}
