/* ============================================================
   K&D MINI MARKET — styles.css  (v2: réplica 1:1)
   #0C4D99 | #063B8B | #FACE08 | #E1E4E5
   ============================================================ */

:root {
  --royal: #0C4D99;
  --navy: #063B8B;
  --yellow: #FACE08;
  --cold-white: #E1E4E5;
  --white: #FFFFFF;
  --brick: #B23A2B;
  --green: #3FA34D;
  --ink: #1B2A41;
  --radius-card: 12px;
  --radius-pill: 999px;
  --shadow-card: 0 6px 18px rgba(6, 59, 139, 0.14);
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.10);
  --font: 'Montserrat', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { font-family: var(--font); background: var(--cold-white); color: var(--ink); line-height: 1.5; }
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
.container { width: min(1180px, 92%); margin: 0 auto; }

/* iconos SVG monocromos */
.i { width: 1em; height: 1em; fill: currentColor; display: block; flex-shrink: 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 11px 24px; border-radius: var(--radius-pill); border: none; cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:focus-visible { outline: 3px solid var(--royal); outline-offset: 3px; }
.btn--yellow { background: var(--yellow); color: var(--navy); box-shadow: var(--shadow-soft); }
.btn--navy { background: var(--navy); color: var(--white); box-shadow: var(--shadow-soft); }
.btn .arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; font-size: 0.65rem; line-height: 1;
}
.btn--navy .arrow { background: var(--yellow); color: var(--navy); }
.btn--yellow .arrow { background: var(--navy); color: var(--yellow); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--navy); color: var(--white); }
.header-inner { display: flex; align-items: center; gap: 24px; padding: 9px 0; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-badge {
  width: 60px; height: 60px; border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #8FD3EE 0%, #2E86C1 55%, #0B3D91 100%);
  border: 3px solid var(--white);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.brand-badge .palm { font-size: 1.55rem; position: relative; z-index: 1; transform: translateY(-2px); }
.brand-badge::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 32%;
  background: #123B2E; border-radius: 50% 50% 0 0 / 90% 90% 0 0;
}
.brand-text { line-height: 1; }
.brand-text .kd { font-weight: 900; font-size: 1.55rem; color: var(--white); letter-spacing: 0.02em; }
.brand-text .kd em { font-style: normal; color: var(--yellow); }
.brand-text .sub {
  display: block; margin-top: 4px; font-weight: 800; font-size: 0.6rem;
  letter-spacing: 0.3em; color: var(--yellow); text-transform: uppercase;
}

.main-nav { flex: 1; }
.main-nav ul { list-style: none; display: flex; justify-content: center; gap: 22px; }
.main-nav a {
  font-weight: 700; font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 8px 2px; border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.main-nav a:hover, .main-nav a:focus-visible, .main-nav a.active { color: var(--yellow); border-color: var(--yellow); }

.header-contact { display: flex; align-items: center; gap: 18px; flex-shrink: 0; font-size: 0.73rem; font-weight: 700; }
.header-contact .item { display: flex; align-items: center; gap: 8px; }
.header-contact .ico {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--yellow); color: var(--navy);
  display: flex; align-items: center; justify-content: center; font-size: 0.78rem;
}
.header-contact .item small { display: block; font-weight: 500; opacity: 0.85; }

.nav-toggle {
  display: none; background: transparent; border: 2px solid var(--yellow); color: var(--yellow);
  border-radius: 8px; font-size: 1.2rem; padding: 4px 10px; cursor: pointer;
}

/* cinta amarilla diagonal: corte a la izquierda, barre todo el ancho */
.header-ribbon {
  height: 14px;
  background: linear-gradient(102deg, var(--navy) 0 7%, var(--yellow) 9% 100%);
}

/* ---------- Hero (sellos DENTRO del hero) ---------- */
.hero-visual {
  position: relative; min-height: 560px;
  background: var(--royal);
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
}
.hero-visual .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
/* overlay blanco degradado concentrado al centro */
.hero-visual::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse 62% 75% at 50% 42%, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.45) 55%, rgba(255,255,255,0) 100%);
}
.hero-center { position: relative; z-index: 2; text-align: center; padding: 74px 20px 30px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.hero-title {
  font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 900; color: var(--navy);
  text-transform: uppercase; line-height: 1.04;
}
.hero-banner {
  display: inline-block; margin: 20px auto 0; background: var(--yellow); color: var(--navy);
  font-weight: 900; font-size: clamp(0.9rem, 1.8vw, 1.3rem); letter-spacing: 0.05em; text-transform: uppercase;
  padding: 10px 36px; transform: skewX(-8deg); box-shadow: var(--shadow-soft);
}
.hero-banner > span { display: inline-block; transform: skewX(8deg); }

.hero-badges {
  position: relative; z-index: 2;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  display: flex; justify-content: center; gap: 56px;
  padding: 20px 40px; margin: 26px auto 30px;
  width: min(820px, 92%);
}
.badge-item { display: flex; align-items: center; gap: 12px; text-align: left; }
.badge-item .circle {
  width: 52px; height: 52px; border-radius: 50%;
  border: 3px solid var(--royal); color: var(--royal);
  display: flex; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0;
}
.badge-item h3 { font-size: 0.76rem; font-weight: 900; letter-spacing: 0.08em; color: var(--ink); text-transform: uppercase; }
.badge-item p { font-size: 0.7rem; color: #4a5568; max-width: 150px; }

/* ---------- Banda amarilla ---------- */
.family-band { background: var(--yellow); padding: 15px 0; scroll-margin-top: 90px; }
.family-band .container {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  color: var(--navy); font-weight: 900;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem); letter-spacing: 0.12em; text-transform: uppercase;
}
.family-band .heart { color: var(--navy); font-size: 1.35rem; line-height: 1; }

/* ---------- destellos (rayos amarillos) ---------- */
.rays { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.rays b { display: block; width: 4px; border-radius: 2px; background: var(--yellow); }
.rays b:nth-child(1) { height: 10px; transform: rotate(24deg); }
.rays b:nth-child(2) { height: 16px; }
.rays b:nth-child(3) { height: 10px; transform: rotate(-24deg); }

/* ---------- Títulos de sección ---------- */
.section-title {
  text-align: center; color: var(--royal); font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: 0.05em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 30px;
}

/* ---------- Productos Hispanos ---------- */
.products { padding: 34px 0 46px; background: var(--cold-white); scroll-margin-top: 90px; }
.products-panel { background: var(--white); border-radius: 18px; box-shadow: var(--shadow-card); padding: 38px 30px 42px; }
.cards-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cat-card {
  background: var(--white);
  border: 4px solid var(--white);
  border-radius: var(--radius-card);
  overflow: hidden; box-shadow: 0 3px 10px rgba(6,59,139,0.18);
  display: flex; flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.cat-card:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.cat-card .thumb { aspect-ratio: 1 / 0.92; width: 100%; object-fit: cover; background: var(--cold-white); border-radius: 8px 8px 0 0; }
.cat-card .label {
  background: var(--navy); color: var(--white);
  font-weight: 800; font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase;
  text-align: center; padding: 12px 6px; flex: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0 0 8px 8px;
}
.products .cta-row { text-align: center; margin-top: 32px; }

/* ---------- Comida de la Casa ---------- */
.food { background: var(--navy); padding: 48px 0; scroll-margin-top: 90px; }
.food-layout { display: grid; grid-template-columns: 230px 1fr; gap: 30px; align-items: center; }
.food-intro h2 { font-weight: 900; text-transform: uppercase; font-size: 1.85rem; line-height: 1.06; color: var(--white); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.food-intro h2 .accent { color: var(--yellow); display: block; width: 100%; }
.food-intro p { color: var(--cold-white); font-size: 0.84rem; margin: 15px 0 20px; }
.food-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; }
.food-card {
  border: 3px solid var(--yellow); border-radius: var(--radius-card);
  overflow: hidden; background: var(--navy);
  display: flex; flex-direction: column; transition: transform 0.18s ease;
}
.food-card:hover { transform: translateY(-5px); }
.food-card:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.food-card .thumb { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; background: var(--royal); }
.food-card .label {
  color: var(--white); font-weight: 800; font-size: 0.68rem; letter-spacing: 0.05em;
  text-transform: uppercase; text-align: center; padding: 10px 4px;
}

/* ---------- Ofertas + Info ---------- */
.offers-info { padding: 30px 0 40px; background: var(--cold-white); scroll-margin-top: 90px; }
.offers-info .row { display: grid; grid-template-columns: 380px 1fr; gap: 22px; align-items: stretch; }
.offer-card {
  background: var(--brick); border-radius: 16px; box-shadow: var(--shadow-card);
  color: var(--white); padding: 30px 28px;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; min-height: 210px;
}
.offer-card h2 { font-weight: 900; text-transform: uppercase; font-size: 1.55rem; line-height: 1.08; }
.offer-card h2 .accent { color: var(--yellow); display: block; }
.offer-card p { font-size: 0.8rem; margin: 12px 0 16px; max-width: 190px; opacity: 0.95; }
.offer-card .btn { align-self: flex-start; }
.offer-visual {
  position: absolute; right: -18px; top: 50%; transform: translateY(-50%);
  width: 158px; height: 172px; z-index: 1;
}
.offer-visual img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 12px; box-shadow: 0 10px 20px rgba(0,0,0,0.35);
  transform: rotate(6deg);
}
.offer-visual .cart-emoji {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 4.6rem; z-index: -1;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.3));
}
.offer-card h2, .offer-card p, .offer-card .btn { position: relative; z-index: 2; }

.info-panel {
  background: #F2F3F4; border-radius: 16px; box-shadow: var(--shadow-soft);
  display: grid; grid-template-columns: repeat(3, 1fr);
  align-items: center; padding: 28px 24px; gap: 18px;
}
.info-item { display: flex; gap: 14px; align-items: flex-start; padding: 0 10px; }
.info-item + .info-item { border-left: 1px solid #d3d7da; }
.info-item .ico { color: var(--green); font-size: 2.3rem; line-height: 1; flex-shrink: 0; }
.info-item h3 { font-size: 0.78rem; font-weight: 900; letter-spacing: 0.05em; color: var(--ink); text-transform: uppercase; margin-bottom: 4px; }
.info-item h3.green { color: var(--green); }
.info-item p { font-size: 0.75rem; color: #4a5568; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--white); scroll-margin-top: 90px; }
.footer-top { display: flex; align-items: stretch; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.15); }
.footer-top .tagline {
  font-weight: 900; text-transform: uppercase; font-size: 0.92rem; letter-spacing: 0.08em;
  padding: 16px 0; display: flex; align-items: center;
}
.footer-social {
  display: flex; align-items: center; gap: 14px;
  background: var(--yellow); color: var(--navy);
  font-weight: 900; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0 26px 0 46px;
  clip-path: polygon(28px 0, 100% 0, 100% 100%, 0 100%);
}
.footer-social .socials { display: flex; gap: 9px; }
.footer-social .socials a {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
  transition: transform 0.15s ease;
}
.footer-social .socials a:hover { transform: translateY(-2px); }

.footer-main { display: flex; align-items: center; justify-content: space-between; gap: 26px; padding: 26px 0; flex-wrap: wrap; }
.footer-contact { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; font-size: 0.78rem; font-weight: 600; }
.footer-contact .item { display: flex; align-items: center; gap: 10px; }
.footer-contact .ico {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--yellow); color: var(--navy);
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0;
}
.footer-contact .item + .item { border-left: 1px solid rgba(255,255,255,0.2); padding-left: 26px; }
.footer-copy { font-size: 0.7rem; opacity: 0.85; text-align: right; }
.footer-bottom-bar { height: 10px; background: var(--royal); }

/* ---------- Páginas internas ---------- */
.page-hero { background: var(--navy); color: var(--white); text-align: center; padding: 44px 20px 52px; position: relative; }
.page-hero h1 { font-weight: 900; text-transform: uppercase; font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: 0.04em; }
.page-hero .under {
  display: inline-block; margin-top: 14px; background: var(--yellow); color: var(--navy);
  font-weight: 800; font-size: 0.8rem; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 8px 24px; transform: skewX(-8deg);
}
.page-hero .under > span { display: inline-block; transform: skewX(8deg); }
.breadcrumb {
  position: absolute; top: 15px; left: 4%;
  font-size: 0.73rem; font-weight: 700; color: var(--yellow);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.breadcrumb:hover { text-decoration: underline; }
.page-body { padding: 42px 0 58px; }

.category-block { margin-bottom: 44px; scroll-margin-top: 104px; }
.category-block > h2 {
  color: var(--royal); font-weight: 900; text-transform: uppercase; font-size: 1.2rem; letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.category-block > h2::after { content: ""; flex: 1; height: 4px; border-radius: 4px; background: var(--yellow); }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 15px; }
.item-card { background: var(--white); border-radius: var(--radius-card); box-shadow: var(--shadow-soft); overflow: hidden; display: flex; flex-direction: column; }
.item-card .thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--cold-white); }
.item-card .body { padding: 13px 15px 15px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.item-card h3 { font-size: 0.88rem; font-weight: 800; color: var(--navy); }
.item-card p { font-size: 0.75rem; color: #4a5568; flex: 1; }
.item-card .price { align-self: flex-start; background: var(--yellow); color: var(--navy); font-weight: 900; font-size: 0.78rem; padding: 4px 14px; border-radius: var(--radius-pill); }
.item-card .price.old { background: transparent; color: #8a94a6; text-decoration: line-through; padding-left: 0; font-weight: 700; }
.offer-tag { align-self: flex-start; background: var(--brick); color: var(--white); font-weight: 800; font-size: 0.66rem; letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 12px; border-radius: var(--radius-pill); }
.price-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.empty-note { text-align: center; background: var(--white); border-radius: var(--radius-card); box-shadow: var(--shadow-soft); padding: 32px; font-weight: 600; color: #4a5568; }

.category-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: -26px auto 34px; position: relative; z-index: 2; }
.category-nav a {
  background: var(--white); color: var(--navy);
  font-weight: 800; font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 10px 18px; border-radius: var(--radius-pill); box-shadow: var(--shadow-soft);
  transition: background 0.15s ease, transform 0.15s ease;
}
.category-nav a:hover { background: var(--yellow); transform: translateY(-2px); }

/* galería */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-card); box-shadow: var(--shadow-soft); background: var(--white); }

/* fallback de imágenes rotas */
.img-fallback {
  object-fit: contain !important;
  background:
    repeating-linear-gradient(45deg, rgba(12,77,153,0.06) 0 14px, rgba(12,77,153,0.12) 14px 28px),
    var(--cold-white) !important;
  padding: 18%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .main-nav ul { gap: 13px; }
  .header-contact .item.address { display: none; }
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .food-cards { grid-template-columns: repeat(3, 1fr); }
  .food-layout { grid-template-columns: 1fr; }
  .food-intro { text-align: center; max-width: 520px; margin: 0 auto; }
  .food-intro h2 { justify-content: center; }
  .offers-info .row { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; }
  .nav-toggle { display: block; margin-left: auto; }
  .header-contact { display: none; }
  .main-nav { display: none; width: 100%; order: 4; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding-bottom: 10px; }
  .main-nav a { display: block; padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,0.12); }
  .hero-visual { min-height: 460px; }
  .hero-badges { flex-direction: column; gap: 16px; align-items: flex-start; padding: 18px 22px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .food-cards { grid-template-columns: repeat(2, 1fr); }
  .info-panel { grid-template-columns: 1fr; }
  .info-item + .info-item { border-left: none; border-top: 1px solid #d3d7da; padding-top: 16px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { flex-direction: column; }
  .footer-social { clip-path: none; padding: 12px 20px; justify-content: center; }
  .footer-main { justify-content: center; text-align: center; }
  .footer-contact { justify-content: center; }
  .footer-contact .item + .item { border-left: none; padding-left: 0; }
  .footer-copy { text-align: center; width: 100%; }
  .offer-visual { display: none; }
}

@media (max-width: 440px) {
  .food-cards { grid-template-columns: 1fr 1fr; }
}
