* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

:root {
  --bg: #ECF5E4;
  --pattern: #D8E7CD;
  --accent: #8F7D99;
  --accent-dark: #7A6A85;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --muted: #6b6b6b;
  --warn: #B3261E;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg);
  background-image: url('../assets/images/page-background.png?v=4');
  background-repeat: no-repeat;
  background-position: top center;
  background-size: cover;
  background-attachment: fixed;
  color: var(--text);
}

.site-header {
  position: relative;
  text-align: center;
  padding: 140px 20px 20px;
}

.lang-switcher {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
}

.lang-btn {
  border: none;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  padding: 6px 8px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

.lang-btn:active {
  transform: scale(0.92);
}

.lang-btn.active {
  background: var(--accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.lang-btn img {
  width: 22px;
  height: 16px;
  vertical-align: middle;
}

.tagline {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--accent-dark);
  margin-top: 4px;
}

.page-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 16px 40px;
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.category-nav {
  flex: 0 0 190px;
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-nav a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--accent-dark);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.25;
  transition: background 0.15s ease, color 0.15s ease;
}

.category-nav a:hover {
  background: rgba(143, 125, 153, 0.12);
}

.category-nav a.active {
  background: var(--accent);
  color: #fff;
}

.category-nav a.active:hover {
  background: var(--accent);
}

.category-content {
  flex: 1;
  min-width: 0;
}

.cart-panel {
  flex: 0 0 380px;
  position: sticky;
  top: 20px;
  background: var(--card);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.09);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
}

.cart-panel h2 {
  font-family: 'Baloo 2', sans-serif;
  color: var(--accent);
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 16px;
}

.cart-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.plata-note {
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.8rem;
  color: var(--accent-dark);
  margin-bottom: 14px;
}

.highlight-warning {
  background: var(--warn);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 14px;
}

.checkout-trigger[hidden] {
  display: none;
}

.checkout-trigger {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.checkout-trigger:not(.is-disabled):hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 14px rgba(143, 125, 153, 0.35);
}

.checkout-trigger:not(.is-disabled):active {
  transform: translateY(1px);
}

.checkout-trigger.is-disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

@media (max-width: 960px) {
  body {
    background-image: none;
    padding-bottom: 76px;
  }

  .site-header {
    padding: 60px 20px 16px;
  }

  .page-layout {
    flex-direction: column;
    gap: 0;
  }

  .category-nav {
    position: sticky;
    top: 0;
    z-index: 5;
    flex: 0 0 auto;
    flex-direction: row;
    overflow-x: auto;
    flex-wrap: nowrap;
    background: var(--bg);
    padding: 10px 0;
    gap: 6px;
    width: 100%;
  }

  .category-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .cart-panel {
    position: static;
    flex: 1 1 auto;
    max-height: none;
    width: 100%;
  }

  .stepper button {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
  }

  .mobile-checkout-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    border-radius: 0;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
    z-index: 15;
    box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.18);
  }

  .mobile-checkout-bar.is-disabled {
    display: none;
  }

  .mobile-cart-summary {
    font-weight: 500;
    opacity: 0.9;
  }
}

.mobile-checkout-bar {
  display: none;
}

.category {
  margin-bottom: 28px;
}

.category h2 {
  font-family: 'Baloo 2', sans-serif;
  color: var(--accent);
  font-size: 1.3rem;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--pattern);
}

.category-note {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 10px;
}

.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  gap: 12px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.item:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.item-info {
  flex: 1;
}

.item-name {
  font-weight: 500;
  font-size: 0.95rem;
}

.item-price {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.stepper button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s ease, transform 0.1s ease;
}

.stepper button:hover:not(:disabled) {
  background: var(--accent-dark);
}

.stepper button:active:not(:disabled) {
  transform: scale(0.9);
}

.stepper button:disabled {
  background: #d0c9d5;
  cursor: default;
}

.stepper .qty {
  min-width: 18px;
  text-align: center;
  font-weight: 600;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  align-items: flex-end;
  justify-content: center;
  z-index: 20;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding: 28px 22px 30px;
  position: relative;
  box-shadow: 0 -4px 28px rgba(0, 0, 0, 0.18);
  animation: modalSlideUp 0.25s ease;
}

@keyframes modalSlideUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (min-width: 540px) {
  .modal-overlay { align-items: center; }
  .modal { border-radius: 20px; }
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.6rem;
  padding: 10px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}

.modal h2 {
  font-family: 'Baloo 2', sans-serif;
  color: var(--accent);
  margin-bottom: 18px;
}

.field {
  margin-bottom: 14px;
}

.pickup-note {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 5px;
  color: var(--accent-dark);
}

.field input,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(143, 125, 153, 0.15);
}

.phone-input {
  display: flex;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.phone-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(143, 125, 153, 0.15);
}

.phone-input input {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 0;
  padding: 10px 12px;
}

.country-select {
  position: relative;
  flex: 0 0 auto;
  border-right: 1px solid #cfcfcf;
}

.country-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  border: none;
  background: transparent;
  padding: 10px 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 8px 0 0 8px;
}

.country-trigger:hover {
  background: var(--bg);
}

.country-trigger .chevron {
  font-size: 0.7rem;
  color: var(--muted);
}

.country-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 260px;
  max-width: calc(100vw - 60px);
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #cfcfcf;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 30;
}

.country-divider {
  border-top: 1px solid #eee;
  margin: 4px 0;
}

.country-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: none;
  padding: 8px 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
}

.country-option:hover {
  background: var(--bg);
}

.country-name {
  flex: 1;
}

.country-dial {
  color: var(--muted);
}

.flag img {
  width: 20px;
  height: 15px;
  vertical-align: middle;
}

.payment-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.order-recap {
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 16px 0;
  font-size: 0.85rem;
  max-height: 160px;
  overflow-y: auto;
}

.order-error {
  color: #b3261e;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.order-recap .recap-line,
.cart-items-list .recap-line {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 0.88rem;
}

.order-recap .recap-total,
.cart-items-list .recap-total {
  border-top: 1px solid #eee;
  margin-top: 6px;
  padding-top: 6px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
}


#submitOrderBtn,
#closeConfirmBtn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

#submitOrderBtn:hover,
#closeConfirmBtn:hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 14px rgba(143, 125, 153, 0.35);
}

#submitOrderBtn:active,
#closeConfirmBtn:active {
  transform: translateY(1px);
}

#whatsappSendLink {
  margin-bottom: 12px;
}

.chabat-number {
  font-family: 'Baloo 2', sans-serif;
  font-size: 2rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
  animation: popIn 0.3s ease;
}

@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.cart-items-list::-webkit-scrollbar,
.order-recap::-webkit-scrollbar,
.country-dropdown::-webkit-scrollbar {
  width: 6px;
}

.cart-items-list::-webkit-scrollbar-thumb,
.order-recap::-webkit-scrollbar-thumb,
.country-dropdown::-webkit-scrollbar-thumb {
  background: var(--pattern);
  border-radius: 3px;
}

.confirmation-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 10px;
}
