/**
 * Header styles matching published https://tenddy.shop/store/ayme-pet
 */

:root {
  --published-primary: #A61C2E;
  --published-primary-hover: #921928;
  --published-promo-bg: #8C1625;
  --published-header-bg: rgba(11, 17, 32, 0.25);
  --published-header-scrolled-bg: #0a1128;
  --published-border-subtle: rgba(255, 255, 255, 0.1);
  --published-border-scrolled: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   1. FIXED HEADER WRAPPER & PROMO BAR
   ========================================================================== */
.fixed-header-wrapper,
.fixed-header-wrapper *,
.site-header,
.site-header *,
.top-promo-bar,
.top-promo-bar *,
.mobile-drawer-content,
.mobile-drawer-content * {
  font-family: "Instrument Sans", "Plus Jakarta Sans", sans-serif !important;
  letter-spacing: normal !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: auto !important;
  box-sizing: border-box;
}

.fixed-header-wrapper,
.site-header,
.mobile-drawer-content {
  font-size: 16px;
  line-height: 1.6;
  color: oklch(0.968 0.007 247.896);
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.fixed-header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.fixed-header-wrapper.header-hidden {
  transform: translateY(-100%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.top-promo-bar {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 12px !important;
  padding: 5.6px 16px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  line-height: 1.6 !important;
  text-align: center;
  background-color: var(--published-promo-bg) !important;
  color: rgba(255, 255, 255, 0.92) !important;
  box-shadow: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-promo-bar strong {
  font-size: inherit !important;
  font-weight: 900 !important;
  line-height: inherit !important;
  text-align: center;
}

.top-promo-bar svg {
  display: block;
  color: color-mix(in oklab, #ffffff 90%, transparent) !important;
  vertical-align: middle;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.top-promo-bar .inline-flex,
.top-promo-bar .md\:inline-flex {
  display: inline-flex !important;
  align-items: center;
  gap: 6px !important;
  text-align: center;
}

.top-promo-bar .hidden {
  display: none !important;
}

@media (min-width: 640px) {
  .top-promo-bar .sm\:inline {
    display: inline !important;
  }
}

@media (min-width: 768px) {
  .top-promo-bar .md\:inline {
    display: inline !important;
  }
  .top-promo-bar .md\:inline-flex {
    display: inline-flex !important;
    align-items: center;
    gap: 6px !important;
  }
}

@media (max-width: 768px) {
  .top-promo-bar {
    gap: 5.6px !important;
    padding: 4px 9.6px !important;
    font-size: 0.68rem !important;
    line-height: 1.3 !important;
    text-align: center;
  }
  .top-promo-bar strong {
    font-size: inherit !important;
    line-height: inherit !important;
  }
}

/* ==========================================================================
   2. SITE HEADER & INNER CONTAINER
   ========================================================================== */
.site-header {
  height: 75px;
  background: var(--published-header-bg);
  border-bottom: 1px solid var(--published-border-subtle);
  box-shadow: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.fixed-header-wrapper.scrolled .site-header,
.fixed-header-wrapper.solid-header .site-header,
.site-header.scrolled {
  background: var(--published-header-scrolled-bg) !important;
  border-bottom: 1px solid var(--published-border-scrolled) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7) !important;
}

.header-inner {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  height: 74px;
  padding: 0 24px;
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .site-header {
    height: 59px !important;
  }

  .header-inner {
    height: 58px !important;
    padding: 0 12px !important;
  }
}

/* ==========================================================================
   3. BRAND LOGO LINK & IMAGE
   ========================================================================== */
.brand-logo-link {
  background: #ffffff !important;
  border-radius: 8px !important;
  align-items: center;
  gap: 12px !important;
  padding: 5.6px 13.6px !important;
  transition: all 0.25s ease;
  display: flex !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.6) !important;
  text-decoration: none;
  cursor: pointer;
  line-height: 25.6px !important;
}

.brand-logo-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4), 0 0 0 1px #ffffff !important;
}

.brand-logo-img {
  object-fit: contain;
  width: auto;
  height: 38px !important;
  max-height: 38px !important;
  display: block;
}

@media (max-width: 768px) {
  .brand-logo-link {
    border-radius: 6px !important;
    padding: 3.2px 8px !important;
  }

  .brand-logo-img {
    height: 32px !important;
    max-height: 32px !important;
  }
}

/* ==========================================================================
   4. DESKTOP NAVIGATION
   ========================================================================== */
.main-navigation {
  display: block;
}

.main-nav-links {
  display: flex !important;
  align-items: center;
  gap: 32px !important;
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
}

.main-nav-links li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.nav-link {
  display: inline-block !important;
  color: rgba(255, 255, 255, 0.85) !important;
  padding: 8px 4px !important;
  margin: 0 !important;
  font-family: "Instrument Sans", "Plus Jakarta Sans", sans-serif !important;
  font-size: 14.72px !important;
  font-weight: 700 !important;
  line-height: 23.552px !important;
  transition: color 0.2s ease;
  position: relative;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  text-decoration: none;
}

.nav-link.active,
.nav-link:hover {
  color: #ffffff !important;
}

/* Strictly hide underline on inactive links */
.main-nav-links .nav-link::after {
  content: none !important;
  display: none !important;
}

/* Only the single active link receives the published accent bar */
.main-nav-links .nav-link.active::after {
  content: "" !important;
  display: block !important;
  background: var(--published-primary) !important;
  width: 100% !important;
  height: 3px !important;
  box-shadow: 0 0 10px var(--published-primary) !important;
  border-radius: 9999px !important;
  position: absolute !important;
  bottom: -4px !important;
  left: 0 !important;
}

@media (max-width: 992px) {
  .main-navigation {
    display: none !important;
  }
}

/* ==========================================================================
   5. HEADER ACTIONS (CART & MOBILE MENU TOGGLE)
   ========================================================================== */
.header-actions {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
}

.btn-cart-header {
  color: #ffffff !important;
  border-radius: 12px !important;
  width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: all 0.2s ease;
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  justify-content: center;
  align-items: center;
  display: flex !important;
  position: relative;
  cursor: pointer;
  box-sizing: border-box;
}

.btn-cart-header:hover {
  color: #ffffff !important;
  background: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.btn-cart-header svg {
  width: 20px;
  height: 20px;
  color: #ffffff;
}

.mobile-menu-btn {
  display: none;
  height: 38px;
  width: 38px;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 12px !important;
  background: color-mix(in oklab, oklch(20.8% 0.042 265.755) 90%, transparent) !important;
  border: 1px solid color-mix(in oklab, #ffffff 15%, transparent) !important;
  color: #ffffff;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.mobile-menu-btn:hover {
  background: rgba(30, 41, 59, 1) !important;
}

.mobile-menu-btn svg {
  width: 20px;
  height: 20px;
  color: #ffffff;
}

@media (max-width: 992px) {
  .mobile-menu-btn {
    display: flex !important;
  }
}

@media (max-width: 768px) {
  .header-actions {
    gap: 8px !important;
  }

  .btn-cart-header {
    border-radius: 12px !important;
    width: 38px !important;
    height: 38px !important;
  }
}

/* ==========================================================================
   6. MOBILE DRAWER OVERLAY & CONTENT
   ========================================================================== */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(2, 6, 23, 0.8) !important;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
}

.mobile-drawer-overlay.open {
  opacity: 1 !important;
  visibility: visible !important;
}

.mobile-drawer-content {
  position: fixed;
  top: 0;
  right: 0;
  width: 80% !important;
  max-width: 20rem !important; /* max-w-xs */
  height: 100% !important;
  background-color: #0f172b !important; /* fallback */
  background-color: oklch(0.208 0.042 265.755) !important; /* slate-900 */
  border-left: 1px solid #1e293b !important; /* slate-800 */
  border-left-color: oklch(0.279 0.041 260.031) !important;
  padding: 1.25rem !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  box-shadow: none !important;
  color: #f1f5f9;
  z-index: 1001;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
  box-sizing: border-box;
  visibility: hidden;
  pointer-events: none;
}

.mobile-drawer-content.open {
  transform: translateX(0) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 1rem;
}

.mobile-drawer-title {
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  color: #ffffff;
}

.mobile-drawer-close-btn {
  padding: 0.375rem;
  border-radius: 0.5rem;
  color: #94a3b8;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-drawer-close-btn:hover {
  color: #ffffff;
  background: #1e293b;
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-drawer-nav li {
  margin: 0;
  padding: 0;
}

.mobile-drawer-link {
  width: 100%;
  text-align: left;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  line-height: 20px !important;
  height: 40px !important;
  color: oklch(0.929 0.013 255.508) !important;
  background: transparent;
  border: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
  box-sizing: border-box !important;
}

.mobile-drawer-link:hover {
  background-color: #1e293b;
}

.mobile-drawer-link-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-drawer-count-badge {
  font-size: 12px !important;
  line-height: 16px !important;
  background-color: oklch(0.577 0.245 27.325 / 0.2) !important;
  color: oklch(0.704 0.191 22.216) !important;
  padding: 2px 8px !important;
  border-radius: 9999px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  margin-left: auto !important;
}

.mobile-drawer-footer {
  padding-top: 16px !important;
  border-top: 1px solid oklch(0.279 0.041 260.031) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.mobile-drawer-whatsapp {
  background: linear-gradient(135deg, rgb(37, 211, 102), rgb(18, 140, 126)) !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 24px !important;
  font-size: 12px !important;
  line-height: 16px !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
  text-decoration: none !important;
  transition: opacity 0.2s ease;
}

.mobile-drawer-whatsapp:hover {
  opacity: 0.9;
  color: #ffffff;
}

.mobile-drawer-footer-text {
  font-size: 11px !important;
  color: oklch(0.554 0.046 257.417) !important;
  text-align: center !important;
}

/* ==========================================================================
   7. ORDER ENTRY (CART / COTIZADOR) DRAWER
   ========================================================================== */
.order-entry-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.order-entry-overlay.open {
  opacity: 1 !important;
  visibility: visible !important;
}

.order-entry-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(2, 6, 23, 0.8);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.order-entry-panel-wrap {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  max-width: 100%;
  display: flex;
  padding-left: 0;
}

@media (min-width: 640px) {
  .order-entry-panel-wrap {
    padding-left: 2.5rem;
  }
}

.order-entry-panel {
  width: 100vw;
  max-width: 28rem; /* max-w-md */
  height: 100%;
  border-left: 1px solid rgba(166, 28, 46, 0.28);
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  background-color: rgb(10, 17, 40);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.order-entry-overlay.open .order-entry-panel {
  transform: translateX(0);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.order-entry-header {
  padding: 1.25rem 1rem 1rem 1rem;
  border-bottom: 1px solid rgba(166, 28, 46, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

@media (min-width: 640px) {
  .order-entry-header {
    padding: 1rem;
  }
}

.order-entry-header-left {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.order-entry-icon-box {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(166, 28, 46, 0.28);
  background-color: rgba(166, 28, 46, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #A61C2E;
}

.order-entry-title {
  font-weight: 700;
  font-size: 0.875rem;
  color: #ffffff;
  line-height: 1.25;
  margin: 0;
}

.order-entry-count {
  font-size: 11px;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  margin-top: 0.125rem;
  margin-bottom: 0;
}

.order-entry-close-btn {
  padding: 0.5rem;
  border-radius: 0.75rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
}

.order-entry-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.order-entry-location-row {
  padding: 0.625rem 1rem;
  background-color: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.order-entry-location-label {
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.order-entry-location-label svg {
  color: #A61C2E;
}

.order-entry-location-select {
  background-color: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  outline: none;
}

.order-entry-body {
  flex: 1 1 0%;
  overflow-y: auto;
  padding: 1rem;
}

.order-entry-empty {
  height: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  transform: translateY(-1px);
}

.order-entry-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background-color: oklab(0.279 -0.00709772 -0.040381 / 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: oklch(0.554 0.046 257.417);
  margin-bottom: 12px;
}

.order-entry-empty-title {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: oklch(0.869 0.022 252.894);
  margin: 0 0 12px 0;
}

.order-entry-empty-desc {
  font-size: 12px;
  line-height: 16px;
  color: oklch(0.554 0.046 257.417);
  max-width: 294px;
  margin: 0 0 8px 0;
}

.order-entry-catalog-btn {
  margin-top: 12px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  background-color: #A61C2E;
  color: #ffffff;
  border: 0;
  cursor: pointer;
  transition: opacity 0.2s;
}

.order-entry-catalog-btn:hover {
  opacity: 0.9;
}
