/*
Theme Name: Sibaite B2B
Theme URI: https://example.com/sibaite-b2b
Author: Codex
Description: Mobile-first B2B WordPress theme for Latin America 3C accessories suppliers, with quote forms, product cards, and WhatsApp actions.
Version: 1.0.9
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: sibaite-b2b
*/

:root {
  --brand: #07356f;
  --brand-2: #0d4e9d;
  --ink: #0a1b38;
  --muted: #5c6675;
  --line: #d9dee6;
  --soft: #f5f7fa;
  --green: #138a14;
  --orange: #f47b18;
  --shadow: 0 10px 26px rgba(10, 27, 56, .12);
  --radius: 8px;
  --content: 1160px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
textarea {
  font: inherit;
}

.sibaite-hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.site-shell {
  min-height: 100vh;
  padding-bottom: 76px;
}

.container {
  width: min(100% - 32px, var(--content));
  margin-inline: auto;
}

.top-strip,
.site-header,
.site-footer {
  border-bottom: 1px solid var(--line);
}

.top-strip {
  background: #fff;
  font-size: 14px;
}

.top-strip__inner,
.site-header__inner {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.language-switch {
  display: flex;
  gap: 9px;
  color: var(--ink);
  font-weight: 700;
}

.language-switch span + span::before {
  content: "|";
  margin-right: 9px;
  color: #8b93a0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--brand);
  font-weight: 700;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--brand);
  font-weight: 700;
}

.main-nav__list,
.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav li {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  white-space: nowrap;
}

.main-nav .sub-menu,
.main-nav .children {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 25;
  min-width: 210px;
  display: none;
  margin: 0;
  padding: 8px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  list-style: none;
}

.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu,
.main-nav li:hover > .children,
.main-nav li:focus-within > .children {
  display: block;
}

.main-nav .sub-menu a,
.main-nav .children a {
  width: 100%;
  min-height: 38px;
  padding: 0 14px;
}

.nav-quote,
.btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  cursor: pointer;
}

.nav-quote {
  font: inherit;
}

.menu-item-quote-link {
  display: none !important;
}

.btn--green {
  background: var(--green);
}

.btn--orange {
  background: var(--orange);
}

.mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 32px;
  cursor: pointer;
}

.hero-slider {
  position: relative;
  min-height: 330px;
  color: #fff;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 53, 111, .85), rgba(7, 53, 111, .25)),
    var(--hero-image, linear-gradient(120deg, #173a69, #6387aa));
  background-position: center;
  background-size: cover;
}

.hero-slider__track {
  position: relative;
  min-height: 330px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  opacity: 0;
  transform: translateX(18px);
  transition: opacity .45s ease, transform .45s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.hero-slide--battery {
  background: linear-gradient(90deg, rgba(7, 53, 111, .88), rgba(9, 95, 125, .28));
}

.hero-slide--power {
  background: linear-gradient(90deg, rgba(7, 53, 111, .9), rgba(19, 138, 20, .25));
}

.hero-slide__eyebrow {
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: .02em;
}

.hero-slide__text {
  max-width: 610px;
  margin: -10px 0 22px;
  font-size: 18px;
}

.hero-slider__dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-slider__dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  cursor: pointer;
}

.hero-slider__dots button.is-active {
  width: 28px;
  border-radius: 99px;
  background: #fff;
}

.hero {
  min-height: 255px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(7, 53, 111, .78), rgba(7, 53, 111, .2)),
    var(--hero-image, linear-gradient(120deg, #345b79, #8bb0c2));
  background-position: center;
  background-size: cover;
}

.hero__inner {
  min-height: 255px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 {
  max-width: 520px;
  margin: 0 0 24px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.12;
}

.hero-slide h2 {
  max-width: 620px;
  margin: 0 0 24px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.12;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-band {
  padding: 18px 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.product-search {
  display: grid;
  grid-template-columns: 1fr 62px;
  max-width: 620px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.product-search input {
  min-height: 50px;
  padding: 0 18px;
  border: 0;
}

.product-search button {
  border: 0;
  color: #fff;
  background: var(--brand);
  font-size: 24px;
  cursor: pointer;
}

.category-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 0 10px;
}

.category-tile {
  min-height: 92px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 3px 10px rgba(10, 27, 56, .07);
  text-align: center;
  font-weight: 800;
}

.category-tile__icon {
  font-size: 36px;
}

.section {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 18px;
  font-size: 28px;
  line-height: 1.2;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.product-card,
.product-list-card,
.info-panel,
.news-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.product-card__image {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: 12px;
  background: linear-gradient(#fff, #f4f6f8);
}

.product-card__body {
  padding: 12px;
}

.product-card h3,
.product-list-card h3,
.product-detail-layout h1 {
  margin: 0;
  color: var(--ink);
  line-height: 1.25;
}

.moq {
  margin: 4px 0;
  color: var(--muted);
  font-size: 14px;
}

.price {
  color: #087532;
  font-size: 20px;
  font-weight: 900;
}

.price,
.amount,
.woocommerce-Price-amount,
.price_range {
  display: none !important;
}

.why-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 18px;
}

.why-list li::before {
  content: "✓";
  margin-right: 8px;
  color: #0b8b36;
  font-weight: 900;
}

.news-list {
  display: grid;
  gap: 12px;
}

.news-card {
  min-height: 78px;
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px;
}

.news-card__thumb {
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  background: #d9dee6;
  overflow: hidden;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  padding: 24px 0 36px;
}

.sidebar-box {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.sidebar-box h3 {
  margin: 0;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.sidebar-box a {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.catalog-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.catalog-head h1 {
  margin: 0;
  font-size: 30px;
}

.product-list {
  display: grid;
  gap: 10px;
}

.product-list-card {
  display: grid;
  grid-template-columns: 150px 1fr 130px;
  align-items: center;
  gap: 18px;
  padding: 12px;
}

.product-list-card__image {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: linear-gradient(#fff, #f5f7fa);
}

.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 22px;
  padding: 24px 0 38px;
}

.product-detail-layout > section {
  min-width: 0;
}

.product-detail-layout .section {
  overflow-wrap: anywhere;
}

.gallery-main {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(#fff, #f6f8fb);
}

.gallery-main img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
}

.detail-panel {
  border: 1px solid var(--line);
  background: #fff;
}

.detail-panel__section {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.certs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.certs span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-weight: 900;
}

.spec-list {
  margin: 0;
  padding-left: 20px;
}

.quote-form {
  display: grid;
  gap: 9px;
}

.quote-form input,
.quote-form textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid #cfd6df;
  border-radius: 5px;
}

.quote-form__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.quote-form__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.inquiry-modal[hidden] {
  display: none;
}

.inquiry-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
}

.inquiry-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 27, 56, .5);
}

.inquiry-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  padding: 22px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.inquiry-modal__dialog h2 {
  margin: 0 42px 6px 0;
}

.inquiry-modal__product {
  margin: 0 0 16px;
  color: var(--muted);
  font-weight: 700;
}

.inquiry-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.inquiry-modal-open {
  overflow: hidden;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.site-footer {
  padding: 28px 0;
  color: #fff;
  background: var(--ink);
}

.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: none;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -8px 22px rgba(10, 27, 56, .10);
}

.mobile-bottom-nav a {
  min-height: 68px;
  display: grid;
  place-items: center;
  gap: 2px;
  color: #3f4650;
  font-size: 13px;
  font-weight: 700;
}

.mobile-bottom-nav strong {
  color: var(--brand);
}

.mobile-bottom-nav span {
  font-size: 24px;
  line-height: 1;
}

.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 35;
  width: 72px;
  height: 72px;
  display: none;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #12a327;
  box-shadow: var(--shadow);
  font-size: 36px;
}

.placeholder-product {
  width: min(100%, 210px);
  height: auto;
}

@media (max-width: 780px) {
  .site-shell {
    padding-bottom: 72px;
  }

  .container {
    width: min(100% - 28px, var(--content));
  }

  .top-actions {
    font-size: 0;
  }

  .logo {
    display: none;
  }

  .site-header__inner {
    min-height: 58px;
    justify-content: flex-end;
  }

  .main-nav {
    position: fixed;
    left: 14px;
    right: 14px;
    top: 104px;
    display: none;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
  }

  .main-nav__list,
  .main-nav > ul {
    display: grid;
    gap: 4px;
  }

  .main-nav .sub-menu,
  .main-nav .children {
    position: static;
    display: block;
    min-width: 0;
    padding: 0 0 0 14px;
    border: 0;
    box-shadow: none;
  }

  body.nav-open .main-nav {
    display: grid;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .hero-slider,
  .hero-slider__track {
    min-height: 380px;
  }

  .hero-slider .hero__inner {
    min-height: 380px;
    align-items: center;
    text-align: center;
  }

  .hero-slide__text {
    font-size: 16px;
  }

  .hero {
    min-height: 270px;
    text-align: center;
    background:
      linear-gradient(rgba(7, 53, 111, .46), rgba(7, 53, 111, .58)),
      var(--hero-image, linear-gradient(120deg, #345b79, #8bb0c2));
    background-position: center;
    background-size: cover;
  }

  .hero__inner {
    min-height: 270px;
    align-items: center;
  }

  .hero h1,
  .hero-slide h2 {
    font-size: 34px;
  }

  .hero__actions {
    justify-content: center;
  }

  .product-search {
    max-width: none;
    grid-template-columns: 1fr 56px;
  }

  .category-row {
    grid-template-columns: repeat(4, minmax(92px, 1fr));
    overflow-x: auto;
    padding-bottom: 16px;
  }

  .featured-grid {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .section h2 {
    font-size: 25px;
  }

  .news-card {
    grid-template-columns: 110px 1fr;
  }

  .catalog-layout,
  .product-detail-layout {
    grid-template-columns: 1fr;
  }

  .catalog-sidebar {
    display: none;
  }

  .catalog-head {
    display: block;
  }

  .catalog-head h1 {
    font-size: 26px;
  }

  .product-list-card {
    grid-template-columns: 120px 1fr;
  }

  .product-list-card .btn {
    grid-column: 2;
    justify-self: end;
    min-width: 138px;
  }

  .quote-form__actions {
    grid-template-columns: 1fr 1fr;
  }

  .mobile-bottom-nav {
    display: grid;
  }

  .whatsapp-float {
    display: grid;
  }
}

@media (max-width: 460px) {
  body {
    font-size: 15px;
  }

  .btn {
    min-height: 44px;
    padding-inline: 14px;
  }

  .hero h1,
  .hero-slide h2 {
    font-size: 30px;
  }

  .product-list-card {
    grid-template-columns: 116px 1fr;
    gap: 10px;
  }

  .product-list-card h3 {
    font-size: 18px;
  }

  .quote-form__split,
  .quote-form__actions {
    grid-template-columns: 1fr;
  }
}

/* WooCommerce adds "single-product" to <body>; keep it from becoming a layout grid. */
body.single-product {
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  padding: 0 !important;
}

body.single-product .site-shell {
  display: block !important;
  width: 100% !important;
  min-height: 100vh;
}

.site-header .site-header__inner {
  width: min(100% - 32px, var(--content)) !important;
  margin-inline: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.site-header .main-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
}

.site-header .main-nav ul,
.site-header .main-nav li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.site-header .main-nav > ul {
  display: flex !important;
  align-items: center !important;
  gap: 22px !important;
}

.site-header .main-nav .sub-menu,
.site-header .main-nav .children {
  margin: 0 !important;
  padding: 8px 0 !important;
  list-style: none !important;
}

.site-header .nav-quote {
  flex: 0 0 auto;
}
