:root{
  --bg: #f8fafc;          /* gris muy claro */
  --text: #111827;        /* gray-900 */
  --muted: #6b7280;       /* gray-500/600 */
  --card: #ffffff;
  --theme-300: #bfdbfe;
  --theme-400: #93c5fd;
  --theme-500: #3b82f6;
  --theme-600: #2563eb;
  --theme-rgb: 59, 130, 246; /* r,g,b for rgba() */
  --on-theme-400: #ffffff;
  --on-theme-500: #ffffff;
  --yellow-300: #fde047;
  --shadow: 0 12px 30px rgba(17,24,39,0.10);
  --radius-32: 32px;
  --radius-24: 24px;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:"Plus Jakarta Sans","Noto Sans",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background: var(--bg);
  color: var(--text);
}
button, input{ font:inherit; }

.page{ min-height:100vh; padding: 24px; }
.container{ max-width: 672px; margin: 0 auto; }
.detail-container{ max-width: 512px; }

.header-card{
  background: var(--theme-400);
  border-radius: var(--radius-32);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
  --header-fg: #ffffff;
  position: sticky;
  top: 24px;
  z-index: 60;
}
.header-top{
  display:flex;
  align-items:center;
  gap: 16px;
  margin-bottom: 24px;
}
.search-wrap{ position: relative; flex: 1; }
.search{
  width: 100%;
  padding: 12px 52px 12px 24px;
  border-radius: var(--radius-24);
  border: none;
  outline: none;
  color: #374151;
}
.search::placeholder{ color: #9ca3af; }
.search-ico{
  position:absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.search-results{
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  z-index: 80;
  border-radius: 16px;
  border: 1px solid rgba(17,24,39,0.12);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 30px rgba(17,24,39,0.16);
}
.search-result-item{
  cursor: pointer;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(17,24,39,0.08);
  transition: background .12s ease;
}
.search-result-item:last-child{ border-bottom: none; }
.search-result-item:hover{ background: rgba(var(--theme-rgb), 0.10); }
.search-result-content{
  display:flex;
  align-items:center;
  gap: 12px;
}
.search-result-image{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(17,24,39,0.06);
}
.search-result-image img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.search-result-info{
  min-width: 0;
  flex: 1;
  display:flex;
  flex-direction: column;
  gap: 2px;
}
.search-result-title{
  font-size: 14px;
  font-weight: 900;
  color: #111827;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-sub{
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-price{
  font-size: 12px;
  font-weight: 900;
  color: var(--theme-600);
  white-space: nowrap;
}
.menu-btn{
  border:none;
  cursor:pointer;
  border-radius: var(--radius-24);
  padding: 12px;
  background: rgba(255,255,255,0.30);
  backdrop-filter: blur(6px);
  color: var(--header-fg);
  transition: background .15s ease;
  width: 48px;
  height: 48px;
  display:grid;
  place-items:center;
  font-size: 24px;
}
.menu-btn:hover{ background: rgba(255,255,255,0.40); }

.nav-cart-button{
  border:none;
  cursor:pointer;
  border-radius: var(--radius-24);
  padding: 12px;
  background: rgba(255,255,255,0.30);
  backdrop-filter: blur(6px);
  color: var(--header-fg);
  transition: background .15s ease;
  width: 48px;
  height: 48px;
  display:grid;
  place-items:center;
  font-size: 22px;
  position: relative;
}
.nav-cart-button:hover{ background: rgba(255,255,255,0.40); }

.nav-cart-count{
  position:absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--theme-600);
  display:grid;
  place-items:center;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(17,24,39,0.16);
  transition: transform .2s ease;
}

.nav-btn.cart-btn{ position: relative; }

.categories{
  display:flex;
  gap: 12px;
  overflow-x:auto;
  overflow-y:hidden;
  padding-bottom: 8px;
  width: 100%;
  scroll-behavior: smooth;
}

/* Ocultar barra de scroll pero mantener funcionalidad */
.categories::-webkit-scrollbar {
  height: 0;
}

.categories {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE y Edge */
}

.categories-scroll {
  display: flex;
  gap: 12px;
  animation: categoriesScroll 30s linear infinite;
  white-space: nowrap;
}

.categories-scroll.stopped {
  animation: none;
}

.categories-scroll.paused {
  animation-play-state: paused;
}

.categories:hover .categories-scroll:not(.stopped) {
  animation-play-state: paused;
}

@keyframes categoriesScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50% - 6px));
  }
}
.cat-btn{
  border:none;
  background: rgba(255,255,255,0.24);
  cursor:pointer;
  min-width: max-content;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 999px;
  padding: 10px 16px;
  transition: transform .15s ease, background .15s ease;
  color: var(--header-fg);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.cat-btn:hover{ transform: scale(1.05); }
.cat-btn.selected{
  background: #ffffff;
  color: var(--theme-600);
  transform: scale(1.05);
}

.list{ display:flex; flex-direction:column; gap: 16px; }

.section-title{
  margin: 18px 2px 4px;
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  text-transform: none;
}
.list .section-title:first-child{ margin-top: 0; }

.item{
  background: var(--card);
  border-radius: 24px;
  padding: 16px;
  display:flex;
  gap: 16px;
  align-items:center;
  box-shadow: 0 10px 20px rgba(17,24,39,0.08);
  cursor:pointer;
  transition: box-shadow .15s ease;
  position: relative;
}
.item:hover{ box-shadow: 0 16px 26px rgba(17,24,39,0.12); }

.item.search-highlight {
  animation: searchHighlightAura 3s ease-in-out 0.3s both;
}

@keyframes searchHighlightAura {
  0% {
    box-shadow: 0 10px 20px rgba(17,24,39,0.08), 0 0 0 0 rgba(59, 130, 246, 0.5);
  }
  25% {
    box-shadow: 0 10px 20px rgba(17,24,39,0.08), 0 0 40px 16px rgba(59, 130, 246, 0.4);
  }
  50% {
    box-shadow: 0 10px 20px rgba(17,24,39,0.08), 0 0 50px 20px rgba(59, 130, 246, 0.35);
  }
  75% {
    box-shadow: 0 10px 20px rgba(17,24,39,0.08), 0 0 40px 16px rgba(59, 130, 246, 0.2);
  }
  100% {
    box-shadow: 0 10px 20px rgba(17,24,39,0.08), 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.item-img-wrap{
  width: 128px;
  height: 128px;
  border-radius: 24px;
  padding: 0;
  flex: 0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  aspect-ratio: 1 / 1;
}
.item-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-main{ flex: 1 1 auto; min-width: 0; }
.item-title{ margin:0 0 4px; font-size: 18px; font-weight: 700; }
.item-desc{
  margin:0 0 12px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
.item-row{ display:flex; align-items:center; justify-content:space-between; gap: 12px; }
.item-price{ font-size: 16px; font-weight: 800; }

.qty-yellow{
  display:flex;
  align-items:center;
  gap: 10px;
  background: var(--yellow-300);
  border-radius: 12px;
  padding: 6px 10px;
}
.qty-mini-btn{
  border:none;
  background: transparent;
  cursor:pointer;
  color: #ffffff;
  font-size: 16px;
  display:grid;
  place-items:center;
  width: 22px;
  height: 22px;
  transition: transform .12s ease;
}
.qty-mini-btn:hover{ transform: scale(1.10); }
.qty-mini-value{ min-width: 20px; text-align:center; color: #ffffff; font-weight: 800; }

.add-to-cart-btn{
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--theme-500);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: none;
  min-width: 44px;
  height: 44px;
}

.add-to-cart-btn:hover{
  background: var(--theme-600);
  transform: translateY(-2px);
  box-shadow: none;
}

.add-to-cart-btn:active{
  transform: translateY(0);
  box-shadow: none;
}

/* Detail page */
.detail-hero{
  background: var(--theme-400);
  border-radius: var(--radius-32);
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  margin-bottom: 32px;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  --detail-nav-btn-bg: rgba(255,255,255,0.30);
  --detail-nav-btn-bg-hover: rgba(255,255,255,0.40);
  --detail-nav-btn-fg: #ffffff;
}
.detail-nav{ 
  display:flex; 
  align-items:center; 
  justify-content: space-between;
  gap: 10px;
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
}
.nav-btn{
  border:none;
  cursor:pointer;
  border-radius: var(--radius-24);
  transition: background .15s ease;
}
.detail-hero .nav-btn{
  padding: 0;
  background: var(--detail-nav-btn-bg);
  backdrop-filter: blur(6px);
  color: var(--detail-nav-btn-fg);
  width: 40px;
  height: 40px;
  display:grid;
  place-items:center;
  font-size: 22px;
}
.detail-hero .nav-btn:hover{ background: var(--detail-nav-btn-bg-hover); }

.detail-image-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
  flex: 1;
}
.detail-image{
  width: 256px;
  height: 256px;
  object-fit: cover;
  border-radius: 24px;
  aspect-ratio: 1 / 1;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,0.22));
}

.detail-body{ display:flex; flex-direction:column; gap: 24px; }
.detail-title{ margin:0; font-size: 30px; letter-spacing:-0.01em; }
.detail-row{ display:flex; align-items:center; justify-content:space-between; gap: 16px; }
.detail-price{ font-size: 28px; font-weight: 900; }

.qty-pill{
  display:flex;
  align-items:center;
  gap: 12px;
  background: var(--theme-400);
  border-radius: var(--radius-24);
  padding: 10px 14px;
}
.qty-pill-btn{
  border:none;
  background: transparent;
  cursor:pointer;
  color: #ffffff;
  font-size: 24px;
  width: 36px;
  height: 36px;
  display:grid;
  place-items:center;
  transition: transform .12s ease;
}
.qty-pill-btn:hover{ transform: scale(1.10); }
.qty-pill-value{
  color:#ffffff;
  font-weight: 900;
  font-size: 18px;
  min-width: 30px;
  text-align:center;
}

.about-title{ margin:0 0 12px; font-size: 24px; }
.about-text{ margin:0; color: #4b5563; line-height: 1.6; white-space: pre-line; }

.detail-info-section{ margin-top: 18px; }
.detail-info-title{
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 900;
  color: #111827;
}
.detail-info-body{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.detail-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(17,24,39,0.12);
  box-shadow: 0 8px 16px rgba(17,24,39,0.08);
  color: #111827;
  font-weight: 700;
  line-height: 1.2;
  max-width: 100%;
  white-space: normal;
}
.detail-pill.cascade-up{
  opacity: 0;
  animation: detailCascadeUp .45s ease-out forwards;
}
.detail-pill.reveal-on-scroll{
  opacity: 0;
  transform: translateY(12px);
}
.detail-pill.reveal-on-scroll.is-revealed{
  animation: detailCascadeUp .45s ease-out forwards;
  animation-delay: var(--stagger, 0ms);
}
@keyframes detailCascadeUp{
  from{ opacity: 0; transform: translateY(12px); }
  to{ opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce){
  .detail-pill.cascade-up,
  .detail-pill.reveal-on-scroll{
    opacity: 1;
    transform: none;
    animation: none;
  }
}
.detail-pill.is-selected{
  border-color: rgba(var(--theme-rgb), 0.55);
  box-shadow: 0 10px 18px rgba(var(--theme-rgb), 0.16);
}
.detail-pill-label{
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-pill-controls{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}
.detail-pill-btn{
  border: none;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(17,24,39,0.06);
  color: #111827;
  transition: transform .12s ease, background .12s ease;
}
.detail-pill-btn:hover{
  transform: scale(1.06);
  background: rgba(17,24,39,0.10);
}
.detail-pill-qty{
  min-width: 20px;
  text-align: center;
  font-weight: 900;
  color: #111827;
}
.detail-pill-sub{
  font-weight: 800;
  opacity: 0.75;
  white-space: nowrap;
}

.add-bag-btn{
  width: 100%;
  border:none;
  cursor:pointer;
  background: var(--theme-400);
  color:#ffffff;
  border-radius: var(--radius-24);
  padding: 16px;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(17,24,39,0.10);
  transition: background .15s ease, box-shadow .15s ease;
}
.add-bag-btn:hover{
  background: var(--theme-500);
  box-shadow: 0 16px 26px rgba(17,24,39,0.14);
}

/* Modal overlay (Darkness-style) */
.modal-overlay{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
  padding: 24px;
}
.modal-overlay.active{
  opacity: 1;
  visibility: visible;
}
.modal-overlay .modal-content{
  transform: scale(0.97);
  transition: transform .2s ease;
}
.modal-overlay.active .modal-content{
  transform: scale(1);
}

/* Modal: Image Preview */
.modal{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal-content{
  background: var(--card);
  border-radius: var(--radius-24);
  max-width: 512px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.modal-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-title{
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.modal-close{
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  transition: color 0.2s ease;
}

.modal-close:hover{
  color: var(--text);
}

.modal-body{
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}

/* Unified modal (carrito + pedidos) */
.unified-modal-content{
  max-width: 640px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cart-header{
  padding: 18px 18px;
  background: var(--theme-400);
  color: var(--on-theme-400);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cart-title{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 900;
  font-size: 16px;
}
.cart-header .modal-close{
  position: static;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
  color: var(--on-theme-400);
}
.cart-header .modal-close:hover{
  color: var(--on-theme-400);
  background: rgba(255,255,255,0.32);
}

.cart-nav{
  display:flex;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}
.cart-nav .nav-btn{
  flex: 1;
  width: auto;
  height: auto;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f3f4f6;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  backdrop-filter: none;
}
.cart-nav .nav-btn:hover{
  background: #e5e7eb;
}
.cart-nav .nav-btn.active{
  background: var(--theme-500);
  color: var(--on-theme-500);
}

.unified-modal-body{
  padding: 18px;
  overflow-y: auto;
  flex: 1;
}

.modal-section{ display: none; }
.modal-section.active{ display: block; }

.cart-items{ display:flex; flex-direction:column; gap: 12px; }
.empty-cart, .empty-orders{
  text-align:center;
  color: var(--muted);
  padding: 18px 10px;
  border: 1px dashed #d1d5db;
  border-radius: 16px;
  background: #ffffff;
}
.empty-cart span, .empty-orders span{ font-size: 22px; display:block; margin-top: 6px; }

.cart-item{
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}
.cart-item-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
  padding: 12px 14px;
}
.cart-item-details{ flex: 1; min-width: 0; }
.cart-item-details h4{
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
}
.cart-item-price{
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}
.cart-item-notes{
  margin: 6px 0 0;
  font-size: 12px;
  color: #374151;
  font-weight: 700;
  line-height: 1.3;
  word-break: break-word;
}
.add-note-btn{
  margin-top: 10px;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(var(--theme-rgb), 0.10);
  color: #111827;
  font-weight: 900;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.add-note-btn:hover{ background: rgba(var(--theme-rgb), 0.16); }
.add-note-btn.has-note{
  background: rgba(var(--theme-rgb), 0.16);
}

/* Edit notes modal */
.edit-notes-content{
  max-width: 640px;
  width: 100%;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.notes-section{
  display:flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
}
.notes-product-name{
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
}
.edit-notes-textarea{
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  padding: 12px;
  outline: none;
  font: inherit;
  color: var(--text);
  background: #ffffff;
}
.edit-notes-textarea:focus{
  border-color: rgba(var(--theme-rgb), 0.65);
  box-shadow: 0 0 0 3px rgba(var(--theme-rgb), 0.18);
}
.notes-helper{
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.notes-actions{
  display:flex;
  gap: 10px;
  padding-top: 6px;
}
.notes-actions .cart-action-btn{
  flex: 1;
}

/* Toast notifications */
.toast-container{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 1300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(520px, calc(100vw - 32px));
  pointer-events: none;
}
.toast{
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(17,24,39,0.12);
  box-shadow: 0 18px 30px rgba(17,24,39,0.16);
  backdrop-filter: blur(10px);
  color: #111827;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show{
  opacity: 1;
  transform: translateY(0);
}
.toast-icon{
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  margin-top: 1px;
  background: rgba(var(--theme-rgb), 0.12);
  color: #111827;
}
.toast-msg{
  flex: 1;
  min-width: 0;
  font-size: 13px;
}
.toast-close{
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(17,24,39,0.06);
  color: #111827;
  transition: background .12s ease, transform .12s ease;
}
.toast-close:hover{
  background: rgba(17,24,39,0.10);
  transform: scale(1.04);
}
@media (prefers-reduced-motion: reduce){
  .toast{ transition: none; }
  .toast.show{ transform: none; }
}
.remove-item-btn{
  border: none;
  cursor: pointer;
  border-radius: 12px;
  width: 40px;
  height: 40px;
  background: #fee2e2;
  color: #991b1b;
  display:grid;
  place-items:center;
  flex: 0 0 auto;
}
.remove-item-btn:hover{ background: #fecaca; }

.cart-item-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 10px 14px 14px;
  border-top: 1px solid #f3f4f6;
}
.cart-item-controls{
  display:flex;
  align-items:center;
  gap: 10px;
  background: #f3f4f6;
  border-radius: 14px;
  padding: 6px 10px;
}
.quantity-btn{
  border:none;
  cursor:pointer;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  display:grid;
  place-items:center;
  box-shadow: 0 8px 16px rgba(17,24,39,0.10);
}
.quantity{ min-width: 28px; text-align:center; font-weight: 900; color: var(--text); }
.cart-item-total{ font-weight: 900; color: var(--text); }
.subtotal-amount{ font-weight: 900; }

.cart-total{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}
.total-line{
  font-weight: 900;
  color: var(--text);
}

.customer-form{
  margin-top: 14px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 16px;
  padding: 14px;
}
.customer-form h4{ margin: 0 0 12px; font-size: 14px; font-weight: 900; color: var(--text); }
.form-group{ display:flex; flex-direction:column; gap: 6px; margin-bottom: 12px; }
.form-group label{ font-size: 12px; font-weight: 800; color: var(--muted); }
.form-control, .customer-form input{
  width: 100%;
  padding: 12px 12px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 14px;
}
.form-control:focus, .customer-form input:focus{
  outline: none;
  border-color: var(--theme-500);
  box-shadow: 0 0 0 3px rgba(var(--theme-rgb), 0.12);
}

.cart-actions{
  display:flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.cart-action-btn{
  border:none;
  cursor:pointer;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 900;
  font-size: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
}
.cart-action-btn.primary{
  background: var(--theme-500);
  color: var(--on-theme-500);
  box-shadow: 0 10px 18px rgba(var(--theme-rgb), 0.24);
}
.cart-action-btn.primary:hover{ background: var(--theme-600); }
.cart-action-btn.secondary{
  background: #f3f4f6;
  color: var(--text);
}
.cart-action-btn.secondary:hover{ background: #e5e7eb; }

.orders-intro{ padding: 0 0 10px; }
.orders-subtitle{ margin: 0; color: var(--muted); font-size: 13px; }
.orders-items{ display:flex; flex-direction:column; gap: 12px; }
.order-completed-item{
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}
.order-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 14px;
}
.order-info h4{ margin: 0 0 4px; font-size: 14px; font-weight: 900; color: var(--text); }
.order-date, .order-customer{ margin: 0; font-size: 12px; color: var(--muted); }
.order-total{ display: inline; font-weight: 900; color: var(--theme-600); }

/* Order confirmation */
.order-confirmation-content{
  max-width: 640px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
}
.confirmation-header{ padding: 18px 18px 12px; text-align:center; }
.confirmation-title{ margin: 0; font-size: 18px; font-weight: 900; color: var(--text); }
.order-details{ padding: 0 18px 18px; display:flex; flex-direction:column; gap: 12px; }
.detail-section{
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  padding: 12px 14px;
}
.detail-section h4{
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
  display:flex;
  align-items:center;
  gap: 8px;
}
.details-content{ color: var(--muted); font-size: 13px; display:flex; flex-direction:column; gap: 6px; }
.detail-line{ color: var(--muted); font-size: 13px; }
.total-section .total-amount{ font-weight: 900; color: var(--theme-600); }
.confirmation-footer{ padding: 0 18px 18px; display:flex; flex-direction:column; gap: 10px; }
.status-message{ margin: 0; color: var(--muted); font-size: 13px; text-align:center; }
.close-confirmation-btn{
  border:none;
  cursor:pointer;
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--theme-500);
  color: var(--on-theme-500);
  font-weight: 900;
}
.close-confirmation-btn:hover{ background: var(--theme-600); }

.image-preview-container{
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f3f4f6;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  overflow: hidden;
  border: 2px dashed var(--muted);
}

.preview-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-input-controls{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-label{
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: block;
}

.input-field{
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.input-field:focus{
  outline: none;
  border-color: var(--theme-500);
  box-shadow: 0 0 0 3px rgba(var(--theme-rgb), 0.10);
}

.modal-footer{
  display: flex;
  gap: 12px;
  padding: 24px;
  border-top: 1px solid #e5e7eb;
}

.btn-cancel, .btn-confirm{
  flex: 1;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cancel{
  background: #f3f4f6;
  color: var(--text);
}

.btn-cancel:hover{
  background: #e5e7eb;
}

.btn-confirm{
  background: var(--theme-500);
  color: var(--on-theme-500);
  box-shadow: 0 4px 12px rgba(var(--theme-rgb), 0.30);
}

.btn-confirm:hover{
  background: var(--theme-600);
  box-shadow: 0 6px 20px rgba(var(--theme-rgb), 0.40);
}

@media (min-width: 768px){
  .page{ padding: 32px; }
}
