/* ==========================================================================
   Header & Footer
   Consumes design tokens from tokens.css via var(--...)
   ========================================================================== */

/* ── Mobile-only elements: hidden by default, revealed in the ≤899px media query below ── */
.rodasshop-mobile-hamburger,
.rodasshop-mobile-menu-drawer,
.rodasshop-mobile-menu-overlay,
.rodasshop-mobile-search,
.rodasshop-chips {
  display: none;
}

/* ── Top Bar ── */
.rodasshop-top-bar {
  background-color: var(--color-dark);
  color: var(--color-white);
  display: flex;
  align-items: center;
  padding: 0 40px;
  height: 64px;
  gap: var(--grid-gap-min);
}

.rodasshop-logo {
  font-weight: 800;
  font-size: 20px;
  color: var(--color-white);
  text-decoration: none;
  white-space: nowrap;
}

.rodasshop-logo-mark {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 4px;
}

.rodasshop-search-form {
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
}

.rodasshop-search-form .woocommerce-product-search,
.rodasshop-mobile-search .woocommerce-product-search {
  display: flex;
  align-items: center;
  margin: 0;
  background: var(--color-white);
  border-radius: 6px;
  overflow: hidden;
  /* The vendored Storefront CSS has a generic "form { margin: 0 0 1.618em }"
     rule that adds ~26px below every <form>, including this one. That makes
     the wrapper ~8px taller than the top bar's fixed 64px height, and since
     the bar centers its children, the search pill overflows evenly above
     and below it — cut off at the very top of the page. */
  margin: 0;
}

.rodasshop-search-form input[type="search"],
.rodasshop-mobile-search input[type="search"] {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--color-dark);
  background: var(--color-white);
}

.rodasshop-search-form button[type="submit"],
.rodasshop-mobile-search button[type="submit"] {
  border: none;
  background: transparent;
  padding: 0 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 0;
  color: transparent;
}

.rodasshop-search-form button[type="submit"]::after,
.rodasshop-mobile-search button[type="submit"]::after {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23141416' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.rodasshop-header-icons {
  display: flex;
  align-items: center;
  gap: var(--grid-gap-min);
}

.rodasshop-account-icon,
.rodasshop-cart-icon {
  color: var(--color-white);
  text-decoration: none;
  position: relative;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.rodasshop-account-icon {
  gap: 6px;
}

.rodasshop-cart-count {
  background-color: var(--color-primary);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -6px;
  right: -8px;
}

.rodasshop-cart-count:empty {
  display: none;
}

/* ── Red Nav Links Bar ── */
.rodasshop-navlinks {
  background-color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 40px;
  height: 44px;
}

.rodasshop-navlinks a {
  color: var(--color-white);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.rodasshop-navlinks a:hover {
  opacity: 0.85;
}

/* ── Benefits Strip ── */
.rodasshop-benefits {
  background-color: var(--color-white);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 20px 40px;
  gap: 48px;
  border-bottom: 1px solid var(--color-border);
}

.rodasshop-benefit {
  display: flex;
  align-items: center;
  gap: var(--grid-gap-min);
  font-size: 13px;
  color: var(--color-dark);
  min-width: 180px;
}

.rodasshop-benefit-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
}

.rodasshop-benefit-title {
  font-weight: 700;
}

.rodasshop-benefit-subtitle {
  color: var(--color-text-secondary);
  font-size: 11px;
}

/* ── Footer Columns ── */
.rodasshop-footer {
  background-color: var(--color-dark-secondary);
  color: var(--color-white);
  padding: 48px 40px 0;
}

.rodasshop-footer-columns {
  display: flex;
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
}

.rodasshop-footer-col {
  flex: 1;
}

.rodasshop-footer-col:first-child {
  flex: 2;
}

.rodasshop-footer-col p {
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: var(--grid-gap-min);
}

.rodasshop-social {
  display: flex;
  gap: 14px;
  margin-top: 4px;
}

.rodasshop-footer-col h4 {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: var(--grid-gap-min);
  color: var(--color-white);
}

.rodasshop-footer-col h4.rodasshop-footer-logo {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 800;
}

.rodasshop-footer-logo-accent {
  color: var(--color-primary);
}

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

.rodasshop-footer-col ul li {
  margin-bottom: 6px;
}

.rodasshop-footer-col ul li a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 13px;
}

.rodasshop-footer-col ul li a:hover {
  color: var(--color-primary);
}

.rodasshop-copyright {
  text-align: center;
  padding: var(--grid-gap-max) 0;
  color: var(--color-text-secondary);
  font-size: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--grid-gap-max);
}

/* ── WhatsApp Floating Button ── */
.rodasshop-whatsapp-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--color-whatsapp);
  color: var(--color-white);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 9999;
}

/* ── Mobile (≤ 899px) ── */
@media (max-width: 899px) {
  /* Hide desktop nav links, show hamburger */
  /* Hide desktop search pill — only mobile search is visible */
  .rodasshop-search-form {
    display: none;
  }

  .rodasshop-navlinks {
    display: none;
  }

  /* Compact sizing matches docs/static-export's mobile top-bar (site.js HEADER_HTML: padding:12px 16px) */
  .rodasshop-top-bar {
    box-sizing: border-box;
    height: 64px;
    padding: 12px 16px;
    min-width: 0;
  }

  .rodasshop-logo,
  .rodasshop-header-icons {
    min-width: 0;
  }

  .rodasshop-mobile-hamburger {
    display: block;
    font-size: 24px;
    color: var(--color-white);
    padding: 8px 12px;
    cursor: pointer;
    background: none;
    border: none;
  }

  /* Mobile drawer overlay (JS-toggled .is-open class) */
  .rodasshop-mobile-menu-drawer {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background-color: var(--color-dark);
    z-index: 9998;
    padding: var(--grid-gap-max);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .rodasshop-mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997;
  }

  .rodasshop-mobile-menu-drawer.is-open {
    transform: translateX(0);
  }

  .rodasshop-mobile-menu-overlay.is-open {
    display: block;
  }

  /* Mobile search */
  .rodasshop-mobile-search {
    display: block;
    padding: 8px 16px;
    background-color: var(--color-dark);
  }

  /* Chips horizontal scroll */
  .rodasshop-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 16px;
    background-color: var(--color-bg);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .rodasshop-chips::-webkit-scrollbar {
    display: none;
  }

  .rodasshop-chip {
    flex-shrink: 0;
    padding: 6px 14px;
    background-color: var(--color-white);
    border: 1px solid var(--color-primary);
    border-radius: 16px;
    font-size: 13px;
    color: var(--color-dark);
    text-decoration: none;
    white-space: nowrap;
  }

  .rodasshop-chip:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
  }

  /* Footer columns stack vertically */
  .rodasshop-footer-columns {
    flex-direction: column;
  }

  .rodasshop-benefits {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 16px;
  }
}
