/* Reset y base */
* {
  box-sizing: border-box;
  text-decoration: none;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

body {
  margin: 0;
  background-color: #f5f5f5;
}

body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Header principal */
.header__box--1 {
  background-color: #93bd00;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header__box-container--1 {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.header__logo {
  width: 125px;
  height: auto;
  flex-shrink: 0;
}

.header__box-left {
  flex: 1;
  min-width: 300px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.header__title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0.5rem 0;
  color: #1a3300;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.header__resume-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.resume-container__resume,
.resume-container__shop-bag {
  height: 4rem;
  min-width: 4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
}

.resume__price,
.resume__price--mobile {
  font-weight: 700;
  font-size: 1.8rem;
  color: #1a3300;
}

.resume__quantity,
.resume__quantity--mobile {
  font-size: 1.3rem;
  color: #2d5500;
  font-weight: 500;
}

.shop-bag__quantity {
  font-size: 1.8rem;
  color: #2d5500;
  font-weight: 500;
}

.resume-container__shop-bag i,
.resume-container__shop-bag--mobile i,
.resume-container__shop-bag--mobile i {
  color: #1a3300;
  font-size: 1.5rem;
}

.resume-container__shop-bag--mobile {
  position: relative;
  min-height: 4rem;
  min-width: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #93bd00;
  border-radius: 50%;
  backdrop-filter: blur(4px);
}

.shop-bag__quantity--mobile {
  position: absolute;
  font-size: 1.2rem;
  top: -0.5rem;
  right: -0.5rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #bf0019;
  color: #fff;
  font-weight: 500;
  z-index: 1000;
  min-width: 2rem;
}

/* Header de abajo */
.header__box--2 {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background-color: #679000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header__box-container--2 {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.bheader__welcome {
  font-weight: 600;
  color: #fff;
  font-size: 1.6rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

/* Buscador */
.bheader__search {
  position: relative;
  flex: 1;
  max-width: 70vw;
  min-width: 200px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: #fff;
}

.bheader__search form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.bheader__search-input {
  width: 100%;
  padding: 0.5rem;
  border: 2px solid #fff;
  border-radius: 6px;
  background: #fff;
  font-size: 1.6rem;
  color: #333;
  transition: all 0.3s ease;
  outline: none;
}

.bheader__search-input:focus {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
  background: #fff;
}

.bheader__search-input::placeholder {
  color: #666;
  font-weight: 400;
}

.bheader__search-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.bheader__search i {
  color: #666;
  font-size: 2rem;
  pointer-events: none;
}

/* Botones */
.bheader__buttons-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.buttons-container__box1 {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dropdown-menu {
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 10px;
  min-width: 200px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
}

.dropdown-wrapper:hover .dropdown-menu,
.dropdown-wrapper:focus-within .dropdown-menu {
  display: block;
}

.dropdown-wrapper {
  position: relative;
}

.dropdown-info {
  color: #000;
}

.buttons-container__box1-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  font-size: 1.6rem;
  font-weight: 500;
  transition: all 0.3s ease;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  min-height: 44px;
  cursor: pointer;
}

.resume-container__shop-bag:hover,
.buttons-container__box1-button:hover,
.buttons-container__box1-button:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.716);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  outline-offset: 2px;
}

.buttons-container__box2-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: #fff;
  color: #679000;
  border: 2px solid #fff;
  border-radius: 6px;
  font-size: 1.6rem;
  font-weight: 600;
  transition: all 0.3s ease;
  min-height: 44px;
  cursor: pointer;
}

.buttons-container__box2-button:hover,
.buttons-container__box2-button:focus {
  background: transparent;
  color: #fff;
  border-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  outline-offset: 2px;
}

.buttons-container__box1-button i,
.buttons-container__box2-button i {
  font-size: 1rem;
}

.mobile-header__logo {
  display: none;
}

/* Menú móvil y hamburguesa */
.hamburger-btn {
  -webkit-appearance: none;
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
  color: #1a3300;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
  border-radius: 50%;
  background-color: #93bd00;
}
.hamburger-btn i {
  color: inherit;
  font-size: 1.5rem;
}
.mobile-header {
  display: none;
  width: 100%;
  padding: 10px 0;
}
.mobile-header__logo {
  flex: 1;
}
.header__logo--mobile {
  height: 40px;
  width: auto;
}
.header-menu {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.mobile-menu__content {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 400px;
  height: 100dvh;
  background: #fff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: right 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.header-menu.active .mobile-menu__content {
  right: 0;
}
.mobile-menu__header {
  background: #1a3300;
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-menu__welcome {
  font-size: 1.5rem;
  color: #fff;
}
.mobile-menu__close {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 5px;
}
.mobile-menu__nav {
  padding: 20px 0;
  flex-grow: 1;
}
.mobile-menu__link {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: #333;
  text-decoration: none;
  font-size: 1.3rem;
  transition: background-color 0.2s;
  border-bottom: 1px solid #f0f0f0;
}
.mobile-menu__link i {
  margin-right: 15px;
  color: #1a3300;
  width: 20px;
  text-align: center;
}
.mobile-menu__link:hover {
  background-color: #f8f9fa;
}
.header__resume-container--mobile {
  border-top: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem;
}
.resume-container__resume--mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.mobile-menu__overlay {
  display: none;
  height: 100dvh;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}
.header-menu.active + .mobile-menu__overlay {
  display: block;
}

/* Responsive ajustes */
@media (min-width: 769px) {
  .hamburger-btn {
    display: none !important;
  }
  .mobile-menu__content {
    display: none !important;
  }
}
@media (max-width: 1200px) {
  .header__box-container--1,
  .header__box-container--2 {
    padding: 1rem 0.75rem;
  }
  .buttons-container__box1 {
    gap: 0.25rem;
  }
  .buttons-container__box1-button {
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
  }
}
@media (max-width: 768px) {
  .header__box--1,
  .header__logo,
  .header__resume-container,
  .header__box-left,
  .bheader__welcome {
    display: none !important;
  }

  .mobile-header__logo {
    display: block;
  }
  .mobile-header {
    display: block;
  }
  .header__box-container--2 {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }
  .header__box--2 {
    padding: 0 1rem;
  }

  .mobile-header__logo,
  .bheader__search,
  .mobile-header {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
  }

  .bheader__search {
    flex: 3 1 0;
  }
  .mobile-header {
    flex: 0 0 auto;
  }
  .hamburger-btn {
    display: flex !important;
  }
  .mobile-menu__user {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
  }
  .mobile-menu__user .mobile-menu__welcome {
    color: #333;
    font-size: 1.3rem;
  }

  .bheader__buttons-container {
    display: none;
  }
  .mobile-sidemenu-list {
    margin-top: 1.5rem;
    padding: 0 1rem;
  }
  .mobile-sidemenu-list .sidemenu-list {
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 0.5rem 0;
  }
  .mobile-sidemenu-list .sidemenu-item {
    border-bottom: 1px solid #eee;
  }
  .mobile-sidemenu-list .sidemenu-link {
    color: #222;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    padding: 0.75rem 0.5rem;
  }
  .mobile-sidemenu-list .sidemenu-link .sidemenu-link-text {
    margin-left: 0.5rem;
  }
  .categories-menu.active ~ #main-container {
    display: none !important;
  }
}
@media (max-width: 480px) {
  .header__box-container--1,
  .header__box-container--2 {
    padding: 0.75rem 0.5rem;
  }
  .header__resume-container {
    justify-content: center;
    width: 100%;
  }
  .buttons-container__box1-button {
    min-width: 120px;
    font-size: 0.9rem;
  }
}

.mobile-menu__dropdown {
  width: 100%;
}
.mobile-dropdown-menu {
  background: #f8f9fa;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin: 0;
  padding: 10px 20px;
  list-style: none;
  color: #222;
  font-size: 1.1rem;
}
.mobile-dropdown-menu li {
  padding: 4px 0;
  color: #222;
}

.categories-btn {
  display: none;
  background: none;
  border: none;
  color: #1a3300;
  font-size: 1.7rem;
  margin-left: 0.5rem;
  cursor: pointer;
}
@media (max-width: 768px) {
  .categories-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .categories-menu {
    position: fixed;
    top: 0;
    left: -100%;
    right: auto;
    width: 85%;
    max-width: 400px;
    height: 100dvh;
    background: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: left 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
  .categories-menu.active {
    left: 0;
  }
  .categories-menu__header {
    background: #1a3300;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .categories-menu__title {
    font-size: 1.5rem;
    color: #fff;
  }
  .categories-menu__close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 5px;
  }
  .categories-menu__nav {
    padding: 20px 0 0 0;
    flex-grow: 1;
  }
  .categories-menu__overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
  }
  .categories-menu.active + .categories-menu__overlay {
    display: block;
  }
}
