/**
 * Shield Header - Professional Retail
 */

.shield-header {
  position: relative;
  z-index: 100;
  font-family: var(--shield-font-base);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.shield-header svg {
  display: block;
}

/* Promo */
.shield-header__promo {
  background: #4c3bb3;
  color: #fff;
  font-size: 13px;
  line-height: 1.3;
  padding: 10px 0;
  position: relative;
  overflow: hidden;
}

.shield-header__promo::before {
  content: "%";
  position: absolute;
  left: 50%;
  top: -28px;
  transform: translateX(-50%);
  font-size: 120px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.shield-promo__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.shield-promo__text {
  color: #fff;
  font-weight: 500;
}

.shield-promo__countdown {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.86);
  white-space: nowrap;
}

.shield-promo__countdown .countdown-item strong {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

/* Topbar */
.shield-header__topbar {
  background: #23256e; /* Un poco más oscuro para dar contraste y jerarquía */
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.shield-topbar__inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.shield-topbar__left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.shield-topbar__left a,
.shield-top-notice {
  color: rgba(255, 255, 255, 0.9);
}

.shield-topbar__left a:hover {
  color: var(--shield-color-secondary);
}

.shield-top-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.35);
}

/* Main */
.shield-header__main {
  background: var(--shield-color-primary);
  padding: 16px 0;
  color: #fff;
}

.shield-main__inner {
  display: grid;
  grid-template-columns: auto auto minmax(300px, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.shield-brand__logo img {
  width: auto;
  height: 46px;
}

.shield-btn-categories {
  height: 40px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.shield-btn-categories:hover {
  background: var(--shield-color-secondary, #fec73b);
  color: #222;
}

.shield-btn-categories svg {
  width: 18px;
  height: 18px;
}

.shield-mobile-menu-btn {
  display: none;
}

.shield-search-container {
  width: 100%;
}

.shield-mega-search {
  display: flex;
  align-items: center;
  height: 42px;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: none;
  border: none;
  padding: 0 6px 0 14px;
  overflow: hidden;
}

.shield-mega-search:focus-within {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.shield-search-btn {
  width: 32px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--shield-transition-fast);
  padding: 0;
}

.shield-search-btn svg {
  width: 20px;
  height: 20px;
}

.shield-search-btn:hover {
  color: var(--shield-color-primary);
}

.shield-search-input {
  flex: 1;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent;
  color: #333333;
  font-size: 14px;
  font-weight: 400;
  padding: 0 12px;
  height: 100%;
}

.shield-search-input::placeholder {
  color: #a0a0a0;
  font-weight: 400;
}

.shield-user-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}


.shield-user-actions a:hover {
  color: var(--shield-color-secondary);
}

.shield-action-block {
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: opacity var(--shield-transition-fast), transform var(--shield-transition-fast);
}

.shield-action-block:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.shield-action-icon-large svg,
.shield-cart-icon-wrap svg {
  width: 24px;
  height: 24px;
}

.shield-action-text-bold {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.shield-cart-icon-wrap {
  position: relative;
  display: inline-flex;
}

.shield-counter {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ff3b30;
  color: #fff;
  border: 2px solid var(--shield-color-primary);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Nav line */
.shield-header__navline {
  background: var(--shield-color-primary, #2a2c82);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.shield-navline__inner {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.shield-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 20px;
}

.shield-nav-list a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color var(--shield-transition-fast);
}

.shield-nav-list a:hover {
  color: var(--shield-color-secondary, #fec73b);
}

.shield-nav-promo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.shield-nav-promo > a {
  text-decoration: none;
}

.shield-sale-badge {
  background: #e5332a;
  color: #fff !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  border-radius: 4px;
  padding: 4px 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.shield-sale-badge svg {
  width: 12px;
  height: 12px;
}

/* Category modal */
.shield-category-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

.shield-category-modal.is-open {
  pointer-events: auto;
}

.shield-category-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 20, 0.45);
  opacity: 0;
  transition: opacity var(--shield-transition-base);
}

.shield-category-modal.is-open .shield-category-modal__backdrop {
  opacity: 1;
}

.shield-category-modal__panel {
  position: absolute;
  top: 0;
  left: 0;
  width: min(360px, 90vw);
  height: 100%;
  background: #fff;
  transform: translateX(-100%);
  transition: transform var(--shield-transition-base);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
}

.shield-category-modal.is-open .shield-category-modal__panel {
  transform: translateX(0);
}

.shield-category-modal__header {
  padding: 14px 16px;
  border-bottom: 1px solid #e8e8ee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shield-category-modal__header h3 {
  margin: 0;
  font-size: 18px;
}

.shield-category-modal__close {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #555;
  cursor: pointer;
}

.shield-category-modal__body {
  overflow: auto;
  padding: 10px 16px 20px;
}

.shield-category-modal__body ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.shield-category-modal__body li {
  border-bottom: 1px solid #f0f0f5;
}

.shield-category-modal__body li ul {
  margin-left: 14px;
  border-left: 2px solid #f3f3f7;
  padding-left: 10px;
}

.shield-category-modal__body a {
  display: block;
  padding: 9px 0;
  color: var(--shield-color-title);
  font-size: 14px;
}

.shield-category-modal__body a:hover {
  color: var(--shield-color-primary);
}

.shield-mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.shield-mobile-menu-list li {
  border-bottom: 1px solid #f0f0f5;
}

.shield-mobile-menu-list a {
  display: block;
  padding: 12px 0;
  color: var(--shield-color-title);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.shield-mobile-menu-links {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid #ececf2;
  display: grid;
  gap: 8px;
}

.shield-mobile-menu-links a {
  font-size: 14px;
  font-weight: 500;
}

/* Mobile Bottom Nav (App Native) */
.shield-mobile-nav {
  display: none;
}

/* Mobile adjustments */
@media (max-width: 992px) {
  html, body {
    padding-bottom: 60px !important; /* Space for the bottom nav */
  }

  .shield-header__topbar,
  .shield-header__navline {
    display: none !important;
  }

  input[type="search"]{
    font-size: 12px!important;
    height: 20px;
    padding: 0;
  }
  .shield-header__main {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 10px 0;
  }

  .shield-main__inner {
    grid-template-columns: 40px auto 1fr;
    gap: 12px;
  }

  .shield-mobile-menu-btn {
    grid-column: 1 / 2;
    display: inline-flex;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 0;
    cursor: pointer;
  }

  .shield-mobile-menu-modal .shield-category-modal__panel {
    width: min(360px, 92vw);
  }

  .shield-brand {
    grid-column: 2 / 3;
  }

  .shield-brand__logo img {
    height: 36px;
  }

  .shield-search-container {
    grid-column: 3 / 4;
    width: 100%;
  }

  /* Make search look like a native app pill */
  .shield-mega-search {
    height: 35px;
    border-radius: 20px;
    background: #ffffff;
  }

  .shield-search-input {
    font-size: 14px;
    color: #333;
  }

  .shield-search-btn {
    height: 38px;
  }

  .shield-user-actions,
  .shield-btn-categories {
    display: none !important;
  }

  /* Bottom Nav */
  .shield-mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 9999;
    justify-content: space-around;
    align-items: center;
    height: 60px;
    padding-bottom: env(safe-area-inset-bottom); /* iOS safe area */
    border-top: 1px solid #eaeaea;
  }

  .shield-mobile-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888888;
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    gap: 4px;
    flex: 1;
    height: 100%;
    transition: color 0.2s ease;
  }

  .shield-mobile-nav__item--button {
    border: 0;
    background: transparent;
    font-family: inherit;
    padding: 0;
  }

  .shield-mobile-nav__item:hover,
  .shield-mobile-nav__item:active {
    color: var(--shield-color-primary, #2a2c82);
  }

  .shield-mobile-nav__item svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
  }
  
  .shield-mobile-nav__item .shield-counter {
    top: -5px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    font-size: 9px;
    border: 2px solid #fff;
  }

  .shield-promo__inner {
    justify-content: center;
    text-align: center;
    gap: 8px;
  }
}

@media (max-width: 600px) {
  .shield-header__promo {
    font-size: 12px;
    padding: 8px 0;
  }

  .shield-promo__countdown {
    flex-wrap: wrap;
    justify-content: center;
  }
}
