/* =================================================================
 * SUPERYACHT INFLATABLES — Clon del diseño actual
 * Header azul oscuro, sidebar de filtros, grid limpio
 * ================================================================= */

:root {
  --color-primary: #1a2842;          /* Azul oscuro del header (extraído del screenshot) */
  --color-primary-dark: #131e32;
  --color-accent: #d97706;           /* Naranja para item activo en sidebar */
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-bg: #ffffff;
  --color-bg-soft: #f9fafb;
  --color-bg-card: #ffffff;
  --color-border: #e5e7eb;
  --color-border-soft: #f3f4f6;

  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Manrope', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);

  --container-max: 1280px;
  --header-height: 84px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ===== Container ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--color-primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.site-header__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header__brand {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.25rem;
  flex-shrink: 0;
  white-space: nowrap;
}
.brand__primary { font-weight: 800; }
.brand__secondary { font-weight: 400; opacity: 0.85; }

.site-nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: space-between;
  margin-left: 2rem;
  gap: 1.5rem;
}

.site-nav__list {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  flex-wrap: nowrap;
}

.site-nav__list li {
  white-space: nowrap;
}

.site-nav__list a {
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  padding: 0.5rem 0;
  position: relative;
  transition: opacity .2s;
  white-space: nowrap;
  display: inline-block;
}
.site-nav__list a:hover { opacity: 0.75; }

.site-nav__right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Selector idioma */
.lang-switcher {
  position: relative;
}
.lang-switcher__current {
  display: flex; align-items: center; gap: 0.5rem;
  color: #fff; font-weight: 600; font-size: 0.92rem;
  padding: 0.4rem 0.6rem;
}
.lang-switcher__menu {
  position: absolute; top: 100%; right: 0; margin-top: 0.5rem;
  background: #fff; color: var(--color-text);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  list-style: none; padding: 0.5rem; min-width: 160px;
  display: none;
}
.lang-switcher:hover .lang-switcher__menu,
.lang-switcher:focus-within .lang-switcher__menu { display: block; }
.lang-switcher__menu a {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.75rem; border-radius: var(--radius-sm);
  font-size: 0.92rem;
}
.lang-switcher__menu a:hover { background: var(--color-bg-soft); }

.flag {
  display: inline-block; width: 18px; height: 12px;
  border-radius: 2px; flex-shrink: 0;
  background-size: cover; background-position: center;
}
.flag--en { background: linear-gradient(180deg, #012169 33%, #fff 33%, #fff 66%, #c8102e 66%); }
.flag--es { background: linear-gradient(180deg, #aa151b 25%, #f1bf00 25%, #f1bf00 75%, #aa151b 75%); }
.flag--it { background: linear-gradient(90deg, #009246 33%, #fff 33%, #fff 66%, #ce2b37 66%); }
.flag--de { background: linear-gradient(180deg, #000 33%, #dd0000 33%, #dd0000 66%, #ffce00 66%); }

/* Cart icon */
.cart-icon {
  position: relative; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  transition: opacity .2s;
}
.cart-icon:hover { opacity: 0.8; }
.cart-icon__count {
  position: absolute; top: 4px; right: 0;
  background: var(--color-accent); color: #fff;
  font-size: 0.7rem; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
}

.nav-toggle { display: none; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #2a3a5e 100%);
  color: #fff;
  padding: 5rem 1.5rem;
  text-align: center;
}
.hero__inner { max-width: 800px; margin: 0 auto; }
.hero__title {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.hero__subtitle {
  font-size: 1.15rem;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== SECTIONS ===== */
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 2rem;
  letter-spacing: -0.01em;
}

.page-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex; gap: 0.5rem; align-items: center;
  font-size: 0.9rem; color: var(--color-text-muted);
  margin-bottom: 2rem;
}
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span { color: var(--color-text-muted); }

/* ===== CATALOG (categoría) ===== */
.catalog {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  align-items: start;
}

.catalog__sidebar {
  background: var(--color-bg-soft);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  position: sticky;
  top: calc(var(--header-height) + 1rem);
}

.sidebar-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.sidebar-list { list-style: none; }
.sidebar-list li { margin: 0.4rem 0; }
.sidebar-list a {
  display: block;
  padding: 0.4rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  transition: color .15s;
}
.sidebar-list a:hover { color: var(--color-accent); }
.sidebar-list a.is-active {
  color: var(--color-accent);
  font-weight: 700;
}

.catalog__title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.catalog__count {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* ===== PRODUCT GRID ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.75rem;
}

.product-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.product-card__media {
  display: block;
  aspect-ratio: 1;
  background: #f5f5f5;
  overflow: hidden;
}
.product-card__media img {
  width: 100%; height: 100%; object-fit: contain;
  padding: 1.5rem;
}
.product-card__placeholder {
  width: 100%; height: 100%; background: var(--color-bg-soft);
}

.product-card__body {
  padding: 1.25rem 1.25rem 1.5rem;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.product-card__title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.product-card__price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.product-card__form { margin-top: auto; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-weight: 600; font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  text-align: center;
  border: none;
  white-space: nowrap;
}
.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn--secondary {
  background: var(--color-bg-soft);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn--secondary:hover { background: var(--color-border-soft); }
.btn--large { padding: 0.95rem 2.25rem; font-size: 1rem; }

.btn-link {
  color: var(--color-text-muted);
  font-size: 1.5rem;
  padding: 0 0.5rem;
  background: none;
}
.btn-link:hover { color: #dc2626; }

/* ===== PRODUCT PAGE ===== */
.product-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.product-page__media {
  background: var(--color-bg-soft);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.product-page__main-img {
  width: 100%; aspect-ratio: 1; object-fit: contain;
}
.product-page__thumbs {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem; margin-top: 1rem;
}
.product-page__thumb {
  background: #fff; border-radius: var(--radius-sm);
  padding: 0.25rem; cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .15s;
}
.product-page__thumb:hover { border-color: var(--color-primary); }
.product-page__thumb img { width: 100%; aspect-ratio: 1; object-fit: contain; }

.product-page__title {
  font-size: 2rem; font-weight: 700;
  letter-spacing: -0.01em; margin-bottom: 0.75rem;
}
.product-page__price {
  font-size: 1.75rem; font-weight: 800;
  color: var(--color-primary); margin-bottom: 1.5rem;
}
.product-page__short-desc {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.product-page__form { margin-bottom: 2rem; }
.form-row { margin-bottom: 1rem; }
.form-row label {
  display: block; font-weight: 600; font-size: 0.9rem;
  margin-bottom: 0.4rem;
}
.form-row select, .form-row input {
  width: 100%; max-width: 360px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem;
  background: #fff;
}
.form-row--qty input { max-width: 100px; }

.product-page__sku {
  font-size: 0.85rem; color: var(--color-text-muted);
  margin-top: 1rem;
}

.product-page__description, .product-page__specs {
  margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.product-page__description h2, .product-page__specs h2 {
  font-size: 1.4rem; font-weight: 700; margin-bottom: 1rem;
}

.specs-table {
  width: 100%; border-collapse: collapse; max-width: 500px;
}
.specs-table th, .specs-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--color-border-soft);
  text-align: left;
}
.specs-table th { width: 40%; font-weight: 600; color: var(--color-text-muted); }

/* ===== CART ===== */
.cart-table {
  width: 100%; border-collapse: collapse;
  margin-bottom: 2rem;
}
.cart-table th {
  text-align: left; padding: 0.75rem;
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--color-text-muted); border-bottom: 1px solid var(--color-border);
}
.cart-table td {
  padding: 1rem 0.75rem;
  border-bottom: 1px solid var(--color-border-soft);
  vertical-align: middle;
}
.cart-table__media { width: 80px; }
.cart-table__media img { width: 70px; height: 70px; object-fit: contain; background: var(--color-bg-soft); border-radius: var(--radius-sm); }
.cart-table__name { font-weight: 600; color: var(--color-text); }
.cart-table__name:hover { color: var(--color-primary); }
.cart-table__variant { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 0.25rem; }

.qty-input { width: 70px; padding: 0.4rem 0.6rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }

.cart-actions { margin-bottom: 2rem; }

.cart-totals {
  margin-left: auto; max-width: 380px;
  background: var(--color-bg-soft);
  padding: 1.75rem; border-radius: var(--radius-lg);
}
.cart-totals__row {
  display: flex; justify-content: space-between;
  font-size: 1.1rem; margin-bottom: 0.75rem;
}
.cart-totals__notice {
  font-size: 0.85rem; color: var(--color-text-muted);
  margin: 1rem 0 1.5rem; line-height: 1.5;
}

/* ===== CATEGORY GRID (home) ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 4rem;
}
.category-card {
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
  background: var(--color-bg-soft);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-align: center;
  transition: background .2s, transform .15s;
}
.category-card:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
}

/* ===== FLASH BARS ===== */
.flash-bar {
  padding: 0.75rem 1.5rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
}
.flash-bar--success { background: #d1fae5; color: #065f46; }
.flash-bar--error { background: #fee2e2; color: #991b1b; }
.flash-bar--info { background: #dbeafe; color: #1e40af; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--color-primary);
  color: #fff;
  margin-top: 4rem;
}
.site-footer__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  display: grid;
  grid-template-columns: 1.5fr 3fr;
  gap: 3rem;
}
.site-footer__brand { font-size: 1.2rem; font-weight: 700; }
.site-footer__nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer-col h4 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; opacity: 0.8; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { font-size: 0.92rem; opacity: 0.9; transition: opacity .15s; }
.footer-col a:hover { opacity: 1; }

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  padding: 1.25rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex; gap: 0.5rem; justify-content: center;
  margin-top: 3rem;
}
.pagination a, .pagination__current {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.9rem;
  border: 1px solid var(--color-border);
}
.pagination a { color: var(--color-text); }
.pagination a:hover { background: var(--color-bg-soft); }
.pagination__current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ===== EMPTY / ERROR ===== */
.empty-message {
  text-align: center; color: var(--color-text-muted);
  padding: 3rem 1rem; font-size: 1.1rem;
}
.error-page { text-align: center; padding: 5rem 1rem; }
.error-page h1 { font-size: 5rem; font-weight: 800; color: var(--color-primary); }
.error-page p { color: var(--color-text-muted); margin: 1rem 0 2rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .catalog { grid-template-columns: 1fr; }
  .catalog__sidebar { position: static; }
  .product-page { grid-template-columns: 1fr; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer__nav { grid-template-columns: repeat(2, 1fr); }
}

/* Activar hamburger antes (1024) — el menú multilingüe es ancho */
@media (max-width: 1024px) {
  .site-header__inner { padding: 0 1rem; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-primary); flex-direction: column; padding: 1.5rem; margin: 0; gap: 1rem; align-items: flex-start; }
  .site-nav.is-open { display: flex; }
  .site-nav__list { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .site-nav__right { margin-top: 1rem; width: 100%; justify-content: space-between; }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 4px; padding: 8px;
    background: transparent; border: 0;
  }
  .nav-toggle span { width: 22px; height: 2px; background: #fff; display: block; }
}

@media (max-width: 720px) {
  .hero { padding: 3rem 1rem; }
  .container { padding: 1.5rem 1rem; }
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
  .cart-table tr { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1rem; margin-bottom: 1rem; }
  .cart-table td { border: none; padding: 0.4rem 0; }
}

/* === Precio "consultar" para productos sin precio === */
.product-card__price--ask,
.product-page__price--ask {
  font-style: italic;
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.95em;
}
.product-page__price--ask { font-size: 1.4rem; }
