/*! -> Estilos Base */
:root {
  --color-primary: #2f855a;
  --color-primary-dark: #276749;
  --color-primary-light: #48bb78;
  --color-text: #2d3748;
  --color-text-light: #718096;
  --color-background: #ffffff;
  --color-background-alt: #f7fafc;
  --color-background-alt-dark: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/*!-> Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  color: var(--color-text);
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  margin-bottom: 0.5em;
}

/*!-> Barra Navegación */
.header {
  background-color: var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  max-width: 100vw;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-background);
  text-decoration: none;
}

.nav__logo-icon {
  width: 2rem;
  height: 2rem;
  filter: brightness(0) invert(1);
}

.nav__logo-text {
  font-size: 1.5rem;
  font-weight: bold;
}

.cart-icon,
.register-icon,
.log-in-icon,
.log-out-icon,
.profile-icon {
  width: 2rem;
  height: 2rem;
  vertical-align: middle;
  transition: all 0.3s ease;
}

.cart-icon:hover,
.register-icon:hover,
.log-out-icon:hover,
.log-in-icon:hover,
.profile-icon:hover {
  opacity: 0.6;
}

.cart-icon__active,
.register-icon_active,
.log-in-icon__active,
.log-out-icon__active,
.profile-icon__active {
  opacity: 0.5;
}

.cart-container {
  position: relative;
}

.cart-counter {
  position: absolute;
  top: -7px;
  right: -10px;
  background-color: #ff5a5f;
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 50%;
  display: inline-block;
  min-width: 20px;
  text-align: center;
}

.nav__toggle {
  display: none;
}

.nav__toggle-label {
  display: block;
  position: relative;
  width: 30px;
  height: 21px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav__toggle-label:hover {
  transform: scale(1.2);
}

.nav__toggle-label span,
.nav__toggle-label span::before,
.nav__toggle-label span::after {
  position: absolute;
  width: 100%;
  height: 3px;
  background: white;
  transition: all 0.3s ease;
}

.nav__toggle-label span {
  top: 9px;
}

.nav__toggle-label span::before,
.nav__toggle-label span::after {
  content: "";
}

.nav__toggle-label span::before {
  top: -9px;
}

.nav__toggle-label span::after {
  bottom: -9px;
}

.nav__toggle:checked + .nav__toggle-label span {
  background: transparent;
}

.nav__toggle:checked + .nav__toggle-label span::before {
  transform: rotate(45deg);
  top: 0;
}

.nav__toggle:checked + .nav__toggle-label span::after {
  transform: rotate(-45deg);
  bottom: 0;
}

.nav__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-primary);
  padding: 1rem;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
  align-items: center;
  text-align: center;
}

.nav__toggle:checked ~ .nav__menu {
  display: flex;
  justify-content: center;
}

.nav__link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav__link:hover {
  color: var(--color-primary-light);
}

.nav__link--active {
  color: var(--color-primary-light);
}

/*!-> Footer */
.footer {
  background: var(--color-primary);
  color: white;
  padding: 2rem 1rem 2rem;
}

.footer__content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer__links {
  flex-direction: column;
}

.footer__logo {
  width: 2rem;
  height: 2rem;
  filter: brightness(0) invert(1);
}

.footer__title {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.footer__menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__menu a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer__menu a:hover {
  color: var(--color-primary-light);
}

.footer__social {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer__social-icons {
  display: flex;
  gap: 1rem;
}

.footer__social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.2s ease-in-out;
}

.footer__social-icons a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-7px);
}

.footer__social-icons a:active {
  transform: translateY(0);
}

.footer__social-icons img {
  width: 1.25rem;
  height: 1.25rem;
  filter: brightness(0) invert(1);
}

.footer__bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.875rem;
}

/*!-> Botones */
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  width: 10rem;
  transition: all 0.2s ease-in-out;
}

.button:hover {
  transform: translateY(-7px);
  box-shadow: 0px 6px 12px black;
}

.button:active {
  transform: translateY(0);
  box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2);
}

.button--primary {
  background-color: var(--color-primary);
  color: white;
}

.detail {
  padding: 0.6rem 1.2rem;
}

.button--primary:hover {
  background-color: var(--color-primary-dark);
}

.button--secondary {
  background-color: var(--color-background-alt);
  color: var(--color-primary);
}

.button--secondary:hover {
  background-color: var(--color-background-alt-dark);
}

/*!-> Checkbox */
.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox input {
  width: 1rem;
  height: 1rem;
}

/*!-> Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0px);
  }
}
