/* ============================================================
   CARMELA — Design Overhaul
   Modern, clean building materials retailer
   ============================================================ */

:root {
  --c-dark:        #0f172a;
  --c-navy:        #1e3a5f;
  --c-orange:      #e8530e;
  --c-orange-h:    #c44409;
  --c-white:       #ffffff;
  --c-surface:     #f8fafc;
  --c-border:      #e2e8f0;
  --c-text:        #334155;
  --c-muted:       #64748b;
  --c-footer-bg:   #0f172a;
  --c-footer-text: #94a3b8;
  --c-footer-link: #cbd5e1;
  --h-header:      76px;
  --max-w:         1100px;
  --font-ui:       roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display:  Boldy, 'Arial Black', sans-serif;
}

/* ============================================================
   GLOBAL
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

body {
  background-color: #f0f4f8;
  margin: 0;
  padding: 0;
}

.center_div {
  background-color: var(--c-white);
  max-width: 1300px;
  margin: 0 auto;
  box-shadow: 0 0 40px rgba(0,0,0,0.08);
}

/* Remove leftover sidebar indent (sidebar is disabled) */
.center_right {
  padding-left: 0;
  padding-right: 0;
}

.center_right_inner {
  border: none;
  border-radius: 0;
}

/* ============================================================
   HEADER — MAIN BAR
   ============================================================ */

.header {
  margin: 0;
  background-color: var(--c-white);
  box-shadow: 0 1px 0 var(--c-border), 0 3px 16px rgba(0,0,0,0.07);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Orange accent strip at the very bottom of the header */
.header::after {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #c44409 0%, #e8530e 40%, #ff7e3f 70%, #e8530e 100%);
}

.header_bottom_container {
  background-image: none !important;
  background-color: var(--c-white);
  padding: 0 28px;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: var(--h-header);
  gap: 20px;
  padding-top: 0;
}

.header_logo_wrap,
.header_bottom_container > a:first-of-type {
  flex-shrink: 0;
  display: block;
  transition: opacity 0.15s;
}

.header_logo_wrap:hover,
.header_bottom_container > a:first-of-type:hover {
  opacity: 0.85;
}

.header img.imglogo {
  display: block;
  padding: 0;
  margin: 0;
  height: 50px;
  width: auto;
  flex-shrink: 0;
}

/* ============================================================
   HEADER — PHONES
   ============================================================ */

.header-phones {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  padding-left: 20px;
  margin-left: 8px;
  border-left: 1.5px solid var(--c-border);
}

.header-phones-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: rgba(232,83,14,0.1);
  border: 1.5px solid rgba(232,83,14,0.22);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8530e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 13a19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 3.6 2.22h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 9.91a16 16 0 0 0 6.18 6.18l.95-.95a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 17px;
}

.header-phones-nums {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.header-phone {
  display: block;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  color: var(--c-dark);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.35;
  transition: color 0.15s;
}

.header-phone:hover { color: var(--c-orange); }

.header-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 8px;
}

.header-cart-btn {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(232,83,14,0.25);
  background: linear-gradient(180deg, #fff9f5 0%, #fff 100%);
  color: #c2410c;
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  position: relative;
}

.header-cart-btn:hover {
  color: #fff;
  background: var(--c-orange);
  border-color: var(--c-orange);
  box-shadow: 0 8px 20px rgba(232,83,14,0.24);
}

.header-cart-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(232,83,14,0.2), 0 8px 20px rgba(232,83,14,0.24);
}

.header-cart-icon {
  display: inline-flex;
  line-height: 0;
}

.header-cart-text {
  white-space: nowrap;
}

.header-cart-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--c-orange);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(232,83,14,0.3);
}

.header-cart-count[hidden] {
  display: none !important;
}

.header-cart-popover {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  border-radius: 12px;
  border: 1px solid var(--c-border);
  background: #fff;
  color: var(--c-text);
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 13px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  opacity: 0;
  transform: translateY(6px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 30;
}

.header-cart-btn:hover .header-cart-popover,
.header-cart-btn:focus-visible .header-cart-popover,
.header-cart-btn:focus-within .header-cart-popover {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.header-cart-popover-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.header-cart-popover-line {
  font-size: 13px;
  line-height: 1.35;
}

.header-cart-popover-line strong {
  color: var(--c-dark);
}

.header-cart-popover-cta {
  margin-top: 2px;
  color: var(--c-orange);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 1200px) {
  .header-cart-btn {
    width: 42px;
    min-width: 42px;
    padding: 0;
    justify-content: center;
    border-radius: 12px;
  }

  .header-cart-text {
    display: none;
  }

  .header-cart-count {
    position: absolute;
    right: -6px;
    top: -7px;
  }
}


/* ============================================================
   NAVBAR — CONTAINER
   ============================================================ */

.navbar_container {
  flex: 1;
  background-image: none !important;
  background-color: transparent;
  border: none;
  position: static;
}

.navbar_inner {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0;
}

/* ============================================================
   NAVBAR — ITEMS
   ============================================================ */

ul.navbar {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: normal;
  gap: 0;
  flex-shrink: 0;
}

ul.navbar > li {
  display: block;
  position: relative;
}

/* ── Standard nav links (Nosotros, Cómo Llegar, Contacto) ── */
ul.navbar > li > a {
  display: flex;
  align-items: center;
  height: var(--h-header);
  padding: 0 16px;
  color: #475569;
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  border-bottom: none;
  transition: color 0.18s;
  white-space: nowrap;
}

/* Animated underline for secondary items */
ul.navbar > li:not(:first-child) > a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  right: 50%;
  height: 3px;
  background-color: var(--c-orange);
  border-radius: 2px 2px 0 0;
  transition: left 0.22s ease, right 0.22s ease;
}

ul.navbar > li:not(:first-child) > a:hover,
ul.navbar > li:not(:first-child):hover > a {
  color: var(--c-orange);
}

ul.navbar > li:not(:first-child) > a:hover::before,
ul.navbar > li:not(:first-child):hover > a::before {
  left: 0;
  right: 0;
}

/* ── Productos — dark department button ── */
ul.navbar > li:first-child {
  background-image: none;
}

ul.navbar > li:first-child > a {
  background-color: var(--c-navy);
  color: #fff;
  padding: 0 18px;
  gap: 10px;
  font-weight: 700;
  font-size: 13.5px;
  border-radius: 8px;
  margin-right: 6px;
  height: 42px;
  align-self: center;
  transition: background-color 0.18s;
}

ul.navbar > li:first-child > a:hover,
ul.navbar > li:first-child:hover > a {
  background-color: var(--c-orange);
  color: #fff;
}

/* No underline pseudo on the Productos button */
ul.navbar > li:first-child > a::before { display: none; }

/* Hamburger icon */
.nav-cat-icon {
  width: 18px;
  height: 13px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav-cat-icon::before,
.nav-cat-icon::after {
  content: '';
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 1px;
}

/* Middle line via box-shadow on ::before */
.nav-cat-icon::before {
  box-shadow: 0 5.5px 0 currentColor;
}

/* Chevron after Productos */
ul.navbar > li:first-child > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(255,255,255,0.6);
  flex-shrink: 0;
  transition: transform 0.22s ease, border-top-color 0.18s;
}

ul.navbar > li:first-child:hover > a::after {
  transform: rotate(180deg);
  border-top-color: rgba(255,255,255,0.9);
}

/* ============================================================
   NAVBAR — MEGA DROPDOWN
   ============================================================ */

ul.navbar > li:hover .navbar_container_collapsed,
ul.navbar > li.nav-has-dropdown.is-open .navbar_container_collapsed {
  display: flex; /* override legacy CSS */
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.22s ease,
              transform 0.22s ease,
              visibility 0s linear 0s;
}

/* megaDropIn removed — dropdown uses CSS transitions now */

.navbar_container_collapsed {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  width: 980px;
  z-index: 200;
  background-color: var(--c-white);
  border: 1px solid var(--c-border);
  border-top: 3px solid var(--c-orange);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.16);
  overflow: hidden;
  /* Smooth fade + slide — visible only on hover/focus */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.22s ease,
              transform 0.22s ease,
              visibility 0s linear 0.22s;
}

/* ── Categories panel (left) ── */

.products_navbar {
  width: 100%;
  flex-shrink: 0;
  list-style: none;
  padding: 8px 0 20px;
  margin: 0;
  background: transparent;
  border-right: none;
  min-height: 460px;
}

/* ── Sidebar wrap + section label ── */
.pn-wrap {
  display: flex;
  flex-direction: column;
  width: 240px;
  flex-shrink: 0;
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
}

.pn-section-label {
  padding: 20px 22px 10px;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.products_navbar li { background: transparent; }

.products_navbar li a {
  display: flex;
  align-items: center;
  padding: 12px 18px 12px 22px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--c-text);
  text-decoration: none;
  text-shadow: none;
  border-left: 3px solid transparent;
  background-image: none;
  line-height: 1.3;
  gap: 0;
  letter-spacing: 0.01em;
  transition: background 0.18s, color 0.18s, border-color 0.18s, padding-left 0.18s;
}

.products_navbar li a .pn-label { flex: 1; }

.products_navbar li a .pn-thumb {
  width: 44px;
  height: 30px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 10px;
  flex-shrink: 0;
  background: var(--c-border);
}

.products_navbar li a::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0;
  flex-shrink: 0;
  margin-left: 8px;
  transition: opacity 0.18s, transform 0.18s;
}

.products_navbar li a:hover {
  background-color: var(--c-white);
  color: var(--c-orange);
  border-left-color: var(--c-orange);
  padding-left: 26px;
  background-image: none;
}

.products_navbar li a.is-active {
  background-color: var(--c-white);
  color: var(--c-dark);
  border-left-color: var(--c-orange);
  font-weight: 600;
  padding-left: 26px;
}

.products_navbar li a:hover::after,
.products_navbar li a.is-active::after {
  opacity: 0.55;
  transform: rotate(45deg) translate(2px, -2px);
}

/* ── Sub-category panel (right) ── */

.vista_rubro_navbar {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
  width: auto;
  min-height: 460px;
  gap: 0;
  overflow: hidden;
}

/* ── Category hero banner ── */

#rubro-hero {
  width: 100%;
  height: 144px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: var(--c-surface);
}

#rubro-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.45s ease;
}

#rubro-hero-img.is-loaded {
  opacity: 0.82;
}

.rubro-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(11, 26, 40, 0.55) 0%,
    transparent 55%
  ),
  linear-gradient(
    to top,
    rgba(11, 26, 40, 0.4) 0%,
    transparent 50%
  );
  pointer-events: none;
}

/* ── Category header row ── */
.rubro-header {
  display: flex;
  align-items: center;
  padding: 14px 22px 12px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}

.rubro-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

.vista_rubro_navbar span.nombre_rubro {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--c-dark);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.4px;
  line-height: 1.15;
}

/* Orange left-bar accent before the category name */
.vista_rubro_navbar span.nombre_rubro::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 22px;
  background: var(--c-orange);
  border-radius: 2px;
  flex-shrink: 0;
}

.rubro-view-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--c-orange);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(232,83,14,0.07);
  border: 1px solid rgba(232,83,14,0.22);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.rubro-view-all:hover {
  background: var(--c-orange);
  border-color: var(--c-orange);
  color: #fff;
}

/* ── Empty state before any category is hovered ── */
.rubro-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex: 1;
  color: var(--c-muted);
  opacity: 0.45;
  padding: 40px 22px;
}

.rubro-placeholder p {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.rubro-placeholder.is-hidden {
  display: none;
}

/* Product tile grid — 4 equal columns */
div.vista_rubro_navbar ul.vista_top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  list-style: none;
  padding: 16px 22px 0;
  margin: 0;
  flex: 1;
  align-content: start;
}

div.vista_rubro_navbar ul.vista_top > li {
  display: block;
}

div.vista_rubro_navbar ul.vista_top > li > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 10px 14px;
  border-radius: 14px;
  border: 1.5px solid #eaeef4;
  background: #fff;
  color: #334155;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  gap: 12px;
  height: 100%;
  box-sizing: border-box;
  transition: border-color 0.18s, color 0.18s, background 0.18s,
              transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.18s;
}

div.vista_rubro_navbar ul.vista_top > li > a img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

div.vista_rubro_navbar ul.vista_top > li > a .descripcion_elemento {
  line-height: 1.4;
  display: block;
  color: inherit;
}

div.vista_rubro_navbar ul.vista_top > li > a:hover {
  border-color: var(--c-orange);
  color: var(--c-orange);
  background: #fff9f7;
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(232,83,14,0.16);
}

/* Bottom sub-links as pill tags */
ul.vista_bottom {
  list-style: none;
  padding: 12px 22px 18px;
  margin: 0;
  border-top: 1px solid var(--c-border);
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  width: auto;
  flex-shrink: 0;
}

ul.vista_bottom > li { display: inline; }

.vista_bottom a {
  display: inline-block;
  color: var(--c-muted);
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 500;
  text-decoration: none;
  padding: 5px 13px;
  border: 1px solid var(--c-border);
  border-radius: 100px;
  background: var(--c-surface);
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}

.vista_bottom a:hover {
  color: var(--c-orange);
  border-color: rgba(232,83,14,0.4);
  background: #fff9f7;
}

/* ============================================================
   SEARCH BOX
   ============================================================ */

.header .search_box {
  background-color: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: 100px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  height: 42px;
  margin: 0 0 0 auto;
  padding: 0 5px 0 12px;
  flex: 1;
  max-width: 520px;
  width: auto;
  transition: border-color 0.15s, box-shadow 0.15s;
  vertical-align: unset;
}

.header .search_box:focus-within {
  border-color: var(--c-orange);
  box-shadow: 0 0 0 3px rgba(232, 83, 14, 0.1);
  background-color: var(--c-white);
}

.header .search_box form {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
}

.header .search_box input[type="text"] {
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--c-text);
  flex: 1;
  padding: 0;
  height: 100%;
  margin-right: 0;
  width: 100%;
}

.header .search_box input[type="text"]::placeholder {
  color: #a0aec0;
}

.search_btn {
  background-color: var(--c-orange);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  height: 33px;
  width: 33px;
  flex-shrink: 0;
  transition: background-color 0.15s;
  position: static;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  appearance: none;
  -webkit-appearance: none;
}

.search_btn:hover { background-color: var(--c-orange-h); }

/* ============================================================
   MOBILE MENU BUTTON
   ============================================================ */

#btn_menu_mobile {
  display: none;
  background-color: var(--c-dark);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 14'%3E%3Crect y='0' width='20' height='2' rx='1' fill='white'/%3E%3Crect y='6' width='20' height='2' rx='1' fill='white'/%3E%3Crect y='12' width='20' height='2' rx='1' fill='white'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  height: 42px;
  width: 42px;
  flex-shrink: 0;
  padding: 0;
  transition: background-color 0.15s;
}

#btn_menu_mobile:hover { background-color: var(--c-orange); }

/* ============================================================
   CONTACT SECTION (above footer)
   ============================================================ */

.mask {
  display: none;
}

.datos_contacto_contenedor {
  background-color: var(--c-surface);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  justify-content: center;
  overflow: visible;
}

.datos_contacto_contenedor_inner {
  float: none;
  flex: 1;
  max-width: 500px;
  padding: 52px 48px;
  box-sizing: border-box;
}

.datos_contacto_contenedor_inner:first-child {
  border-right: 1px solid var(--c-border);
}

.titulo_hablamos {
  color: var(--c-text);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.titulo_hablamos > span.escuchamos {
  color: var(--c-orange);
}

.datos_contacto_contenedor ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.datos_contacto_contenedor ul li {
  color: var(--c-text);
  font-family: var(--font-ui);
  font-size: 19px;
  font-weight: 600;
  padding: 7px 0 7px 36px;
  background-position: left 50%;
  background-repeat: no-repeat;
  background-size: 20px;
}

.datos_contacto_contenedor ul li.whatsapp {
  background-image: url("/imgnew/whatsapp.png");
  color: #128c7e;
}

.datos_contacto_contenedor ul li.telefonito,
input[type=text].telefonito {
  background-image: url("/imgnew/telefonito.png");
}

.datos_contacto_contenedor_inner p {
  font-family: var(--font-ui);
  color: var(--c-muted);
  font-style: normal;
  line-height: 1.65;
  font-size: 14px;
}

.datos_contacto_contenedor_inner img {
  float: left;
  margin-right: 16px;
  border-radius: 6px;
  max-width: 130px;
  margin-bottom: 8px;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background-color: var(--c-footer-bg);
  color: var(--c-footer-text);
  padding: 48px 0 28px;
}

.footer_content {
  max-width: var(--max-w);
  width: auto;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 48px;
  align-items: start;
}

.footer_brand > img,
.footer_content > img:first-child {
  max-width: 130px;
  opacity: 0.75;
  display: block;
  margin-bottom: 14px;
  filter: brightness(0) invert(1);
}

.datos_barraca_footer {
  color: var(--c-footer-text);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.65;
  margin-top: 0;
}

.datos_barraca_footer p {
  color: var(--c-footer-text);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.65;
  margin: 0 0 8px 0;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer ul li {
  display: block;
  margin-bottom: 10px;
}

.footer ul li a {
  color: var(--c-footer-link);
  font-family: var(--font-ui);
  font-size: 13px;
  text-decoration: none;
  padding: 0;
  transition: color 0.15s;
  display: block;
}

.footer ul li a:hover { color: var(--c-orange); }

.disclaimer_footer {
  color: #475569;
  font-family: var(--font-ui);
  font-size: 11px;
  line-height: 1.6;
  margin-top: 20px;
}

.footer_rut {
  color: #475569;
  font-family: var(--font-ui);
  font-size: 11px;
  margin-top: 10px;
}

/* Footer column wrappers */
.footer_brand,
.footer_links,
.footer_legal {
  display: flex;
  flex-direction: column;
}

/* Footer column headers */
.footer_col_title {
  color: #e2e8f0;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #1e293b;
}

/* Footer divider line */
.footer_divider {
  border: none;
  border-top: 1px solid #1e2d4a;
  margin: 32px auto 20px;
  max-width: var(--max-w);
}

.footer_copyright {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 11px;
  color: #475569;
  padding: 0 24px;
}

/* ============================================================
   RESPONSIVE — TABLET / MOBILE
   ============================================================ */

@media (max-width: 900px) {
  .header_bottom_container {
    padding: 0 16px;
    gap: 12px;
    height: 64px;
  }
  .header img.imglogo {
    height: 40px;
  }
  .navbar_container {
    display: none;
  }
  .header-phones {
    display: none;
  }
  .header-actions {
    margin-left: auto;
  }
  .header-cart-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    border-radius: 11px;
    padding: 0;
    justify-content: center;
  }
  .header-cart-text {
    display: none;
  }
  .header-cart-popover {
    display: none;
  }
  #btn_menu_mobile {
    display: block;
    margin-left: 6px;
  }
  .footer_content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 0 16px;
  }
  .datos_contacto_contenedor {
    flex-direction: column;
  }
  .datos_contacto_contenedor_inner {
    max-width: 100%;
    padding: 32px 24px;
  }
  .datos_contacto_contenedor_inner:first-child {
    border-right: none;
    border-bottom: 1px solid var(--c-border);
  }
}

@media (max-width: 650px) {
  .titulo_hablamos {
    font-size: 22px;
  }
}

/* ============================================================
   UTILITY BAR (top dark strip)
   ============================================================ */

.util-bar {
  background-color: var(--c-dark);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-family: var(--font-ui);
}

.util-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.util-bar-left {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.util-bar-left span {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 2px 10px;
}

.util-bar-icon {
  flex-shrink: 0;
  color: #60a5fa;
}

.util-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  white-space: nowrap;
}

.util-link {
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.util-link:hover { color: var(--c-orange); }

.util-link-cta {
  color: var(--c-orange);
  font-weight: 600;
}

.util-link-cta:hover { color: #ff7e3f; }

.util-sep { color: #1e293b; }

.util-user {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
  font-size: 12px;
}

.util-order-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px 2px 8px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  font-size: 11px;
  font-weight: 600;
  color: var(--badge-color, #94a3b8);
  text-decoration: none;
  transition: background 0.15s;
}

.util-order-badge:hover { background: rgba(255,255,255,0.1); }

.util-order-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ============================================================
   UTILITY BAR — INLINE NAV LINKS (desktop only)
   ============================================================ */

.util-bar-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.util-bar-nav-link {
  color: #94a3b8;
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: color 0.15s;
}

.util-bar-nav-link:hover {
  color: var(--c-orange);
}

/* ============================================================
   SEARCH BOX — SVG ICON SUPPORT
   ============================================================ */

.search-icon-svg {
  flex-shrink: 0;
  color: #94a3b8;
  margin-right: 4px;
  pointer-events: none;
}

/* ============================================================
   NAVBAR — ACTIVE STATE
   ============================================================ */

ul.navbar > li.nav-active:not(:first-child) > a {
  color: var(--c-orange);
}

ul.navbar > li.nav-active:not(:first-child) > a::before {
  left: 0;
  right: 0;
}

/* ============================================================
   MOBILE MENU OVERLAY
   ============================================================ */

#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  visibility: hidden;
  pointer-events: none;
}

#mobile-menu.is-open {
  visibility: visible;
  pointer-events: auto;
}

#mm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 35, 0.58);
  opacity: 0;
  transition: opacity 0.32s ease;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

#mobile-menu.is-open #mm-backdrop {
  opacity: 1;
}

#mm-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: auto;
  width: 100%;
  max-width: none;
  height: 87vh;
  max-height: 87vh;
  background: var(--c-white);
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateY(110%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -16px 60px rgba(0, 0, 0, 0.28);
}

#mobile-menu.is-open #mm-panel {
  transform: translateY(0);
}

/* MM: Drag handle */
.mm-drag-handle {
  width: 40px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 100px;
  margin: 12px auto 4px;
  flex-shrink: 0;
}

/* MM: Header */
.mm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px 14px;
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}

.mm-logo {
  height: 36px;
  width: auto;
  display: block;
}

#mm-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--c-muted);
  padding: 7px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

#mm-close:hover {
  background: var(--c-surface);
  color: var(--c-dark);
}

/* MM: Search */
.mm-search {
  padding: 14px 20px;
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}

.mm-search form {
  display: flex;
  align-items: center;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: 100px;
  padding: 0 14px;
  height: 40px;
  gap: 8px;
  transition: border-color 0.15s;
}

.mm-search form:focus-within {
  border-color: var(--c-orange);
  background: var(--c-white);
}

.mm-search-icon {
  color: #94a3b8;
  flex-shrink: 0;
}

.mm-search input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-family: var(--font-ui);
  font-size: 13.5px;
  color: var(--c-text);
  padding: 0;
}

/* MM: User / Auth */
.mm-user-section {
  padding: 14px 20px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
  flex-shrink: 0;
}

.mm-user-greeting {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--c-muted);
  margin-bottom: 8px;
  font-family: var(--font-ui);
}

.mm-user-greeting strong {
  color: var(--c-dark);
}

.mm-user-links {
  display: flex;
  gap: 16px;
}

.mm-user-links a {
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-orange);
  text-decoration: none;
  transition: opacity 0.15s;
}

.mm-user-links a:hover {
  opacity: 0.75;
}

.mm-auth-section {
  padding: 14px 20px;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.mm-btn-login,
.mm-btn-register {
  flex: 1;
  text-align: center;
  padding: 9px 12px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: block;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.mm-btn-login {
  background: var(--c-orange);
  color: white;
}

.mm-btn-login:hover {
  background: var(--c-orange-h);
}

.mm-btn-register {
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  color: var(--c-text);
}

.mm-btn-register:hover {
  border-color: var(--c-orange);
  color: var(--c-orange);
}

/* MM: Nav list */
.mm-nav-list {
  list-style: none;
  padding: 6px 0;
  margin: 0;
  flex: 1;
}

.mm-nav-list.is-hidden {
  display: none;
}

.mm-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 20px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  color: var(--c-text);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
  transition: background 0.12s, color 0.12s;
  box-sizing: border-box;
}

.mm-nav-item:hover {
  background: var(--c-surface);
  color: var(--c-orange);
}

.mm-nav-icon {
  color: var(--c-muted);
  flex-shrink: 0;
  display: flex;
}

.mm-has-sub {
  font-weight: 600;
}

.mm-chevron {
  margin-left: auto;
  color: var(--c-muted);
  flex-shrink: 0;
}

/* MM: Products sub-panel */
.mm-sub-panel {
  position: absolute;
  inset: 0;
  background: var(--c-white);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.mm-sub-panel.is-visible {
  transform: translateX(0);
  pointer-events: auto;
}

.mm-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border: none;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
  width: 100%;
  flex-shrink: 0;
  transition: color 0.12s;
  text-align: left;
}

.mm-back-btn:hover {
  color: var(--c-orange);
}

.mm-sub-title {
  padding: 14px 20px 8px;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  color: var(--c-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.mm-products-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  margin: 0;
  list-style: none;
  align-content: start;
  flex: 1;
}

@media (max-width: 440px) {
  .mm-products-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.mm-cat-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--c-border);
  background: var(--c-white);
  color: var(--c-text);
  transition: border-color 0.18s, color 0.18s,
              transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.18s;
}

.mm-cat-card:active {
  transform: scale(0.96);
}

.mm-cat-card:hover {
  border-color: var(--c-orange);
  color: var(--c-orange);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(232,83,14,0.16);
}

.mm-cat-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: var(--c-surface);
}

.mm-cat-card-name {
  padding: 8px 8px 9px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
  border-top: 1px solid var(--c-border);
  letter-spacing: 0.01em;
}

/* ── Mobile subcategory panel ── */
.mm-subcats-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--c-border);
  gap: 12px;
  flex-shrink: 0;
}

.mm-subcats-title {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  color: var(--c-dark);
}

.mm-subcats-viewall-btn {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--c-orange);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.mm-subcats-viewall-btn:hover { opacity: 0.75; }

.mm-subcats-list {
  list-style: none;
  padding: 6px 0 24px;
  margin: 0;
  flex: 1;
  overflow-y: auto;
}

.mm-subcat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  text-decoration: none;
  color: var(--c-text);
  border-bottom: 1px solid var(--c-border);
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
}

.mm-subcat-item:hover {
  background: var(--c-surface);
  color: var(--c-orange);
}

.mm-subcat-thumb {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--c-surface);
  padding: 4px;
}

.mm-subcat-name {
  flex: 1;
}

.mm-subcat-plain {
  padding-left: 26px;
  color: var(--c-muted);
}

.mm-subcat-plain:hover {
  color: var(--c-orange);
}

.mm-loading {
  padding: 24px 18px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--c-muted);
  list-style: none;
}

/* MM: Footer */
.mm-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.mm-footer-phones {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--c-muted);
  font-size: 12.5px;
  font-family: var(--font-ui);
}

.mm-footer-phones a {
  color: var(--c-dark);
  font-weight: 700;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}

.mm-footer-phones a:hover {
  color: var(--c-orange);
}

.mm-phone-sep { color: var(--c-muted); }

.mm-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: #22c55e;
  color: white;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
  align-self: flex-start;
}

.mm-whatsapp-btn:hover {
  background: #16a34a;
}

/* Body scroll lock when mobile menu is open */
body.mm-open {
  overflow: hidden;
}

/* ============================================================
   RESPONSIVE ADDITIONS
   ============================================================ */

@media (max-width: 900px) {
  .util-bar {
    display: none;
  }

  /* Hide desktop dropdown on mobile — mobile uses overlay */
  .navbar_container_collapsed {
    display: none !important;
  }
}

/* ============================================================
   MINIMAL LAYOUT (cart / checkout focused view)
   ============================================================ */

.header-minimal {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 24px;
}

.header-minimal-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-minimal-logo img {
  height: 34px;
  width: auto;
  display: block;
}

.header-minimal-secure {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  letter-spacing: .01em;
}

.header-minimal-secure svg {
  color: #22c55e;
  flex-shrink: 0;
}

/* Remove the center_div top padding that accounts for the full header */
body:has(.header-minimal) .center_div {
  padding-top: 0;
}

@media (max-width: 600px) {
  .header-minimal {
    padding: 0 16px;
  }
  .header-minimal-logo img {
    height: 28px;
  }
}

/* ── Product card shared badge system ──────────────────────────────────────
   Used by collection, brand, and other listing pages that render
   .product-card > .product-card-image > .product-badges.
   ─────────────────────────────────────────────────────────────────────── */

.product-card-image {
  position: relative;
  overflow: hidden;
}

.product-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  pointer-events: none;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
  line-height: 1;
  color: #fff;
  background: #475569;
  white-space: nowrap;
}

.badge-pct        { background: #16a34a; }
.badge-sale       { background: var(--c-orange, #e8530e); }
.badge-nuevo      { background: #0ea5e9; }
.badge-destacado  { background: #7c3aed; }
.badge-sin-stock  { background: #dc2626; }
.badge-consultar  { background: #d97706; }
.badge-retiro,
.badge-envio      { background: #475569; }
