/* =========================================================
   ORDER PAGE - Modern Gaming/iOS style
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&family=Orbitron:wght@700;900&display=swap');

/* ============ CSS VARIABLES ============ */
:root {
  /* Colors - có thể override bởi theme */
  --primary: #00f0ff;
  --accent: #ff006e;
  --gold: #ffd700;
  --success: #00ff88;
  --danger: #ff3b30;
  
  /* Background */
  --bg: #0a0a1a;
  --bg-2: #1a1a2e;
  --bg-3: #16213e;
  
  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-blur: 24px;
  
  /* Text */
  --text: #ffffff;
  --text-2: #a0a0c0;
  --text-3: #6a6a80;
  
  /* Fonts */
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Be Vietnam Pro', sans-serif;
  
  /* Radius */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-full: 100px;
  
  /* Spacing */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-top: var(--safe-top);
  padding-bottom: calc(100px + var(--safe-bottom));
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* =========================================================
   PARTICLES BACKGROUND
   ========================================================= */
.particles-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 15% 20%, rgba(0, 240, 255, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 70%, rgba(255, 0, 110, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(255, 215, 0, 0.06) 0%, transparent 50%);
  animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, 20px) scale(1.05); }
}

/* =========================================================
   HEADER
   ========================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  background: rgba(10, 10, 26, 0.75);
  border-bottom: 1px solid var(--glass-border);
  padding: 12px 16px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.restaurant-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  flex-shrink: 0;
}

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

.logo-placeholder {
  font-size: 22px;
}

.header-text {
  min-width: 0;
}

.restaurant-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.table-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.3);
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.header-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px var(--accent);
  animation: badgePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badgePop {
  0% { transform: scale(0); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* =========================================================
   TABS
   ========================================================= */
.tabs {
  position: sticky;
  top: 68px;
  z-index: 40;
  background: linear-gradient(to bottom, rgba(10, 10, 26, 0.95), rgba(10, 10, 26, 0.85));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  padding: 12px 0;
  margin-bottom: 8px;
}

.tabs-inner {
  display: flex;
  gap: 8px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 900px;
  margin: 0 auto;
}

.tabs-inner::-webkit-scrollbar { display: none; }

.tab {
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: var(--r-full);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}

.tab:active { transform: scale(0.94); }

.tab.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0a0a1a;
  border-color: transparent;
  box-shadow: 
    0 0 20px rgba(0, 240, 255, 0.5),
    0 0 40px rgba(255, 0, 110, 0.25);
  animation: tabGlow 3s ease-in-out infinite;
}

@keyframes tabGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5), 0 0 40px rgba(255, 0, 110, 0.25);
  }
  50% {
    box-shadow: 0 0 28px rgba(0, 240, 255, 0.8), 0 0 56px rgba(255, 0, 110, 0.4);
  }
}

/* =========================================================
   MENU CONTENT
   ========================================================= */
.menu-content {
  position: relative;
  z-index: 1;
  padding: 0 16px 20px;
  max-width: 900px;
  margin: 0 auto;
}

.loading-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-2);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 240, 255, 0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =========================================================
   CATEGORY SECTION
   ========================================================= */
.category-section {
  margin-bottom: 24px;
  animation: sectionEnter 0.5s ease-out backwards;
}

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

.category-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
  padding-left: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-title::before {
  content: '';
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  box-shadow: 0 0 10px var(--primary);
}

/* =========================================================
   MENU ITEM CARD
   ========================================================= */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.menu-item {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: cardEnter 0.5s ease-out backwards;
  display: flex;
  flex-direction: column;
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.menu-item:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow: 
    0 0 24px rgba(0, 240, 255, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.5);
}

.menu-item:active {
  transform: scale(0.98);
}

.menu-item-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-2);
}

.menu-item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.menu-item:hover .menu-item-image {
  transform: scale(1.08);
}

.menu-item-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(255, 0, 110, 0.08));
}

.menu-item-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.menu-item-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-item-desc {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.menu-item-price {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
  white-space: nowrap;
}

/* =========================================================
   ADD BUTTON
   ========================================================= */
.btn-add {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0a0a1a;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 
    0 0 16px rgba(0, 240, 255, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-add::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-add:hover::after { opacity: 1; }

.btn-add:active {
  transform: scale(0.85);
}

/* Ripple */
.btn-add .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out;
  pointer-events: none;
}

@keyframes rippleAnim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* =========================================================
   FLOATING CART
   ========================================================= */
.floating-cart {
  position: fixed;
  bottom: calc(16px + var(--safe-bottom));
  left: 16px;
  right: 16px;
  max-width: 868px;
  margin: 0 auto;
  padding: 14px 18px;
  border-radius: var(--r-lg);
  background: rgba(20, 20, 40, 0.9);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: 
    0 0 30px rgba(0, 240, 255, 0.3),
    0 12px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 60;
  animation: cartSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.floating-cart:active {
  transform: scale(0.98);
}

.cart-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cart-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0a0a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.5);
}

.cart-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cart-count {
  font-size: 11px;
  color: var(--text-2);
  font-weight: 500;
}

.cart-total {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  color: var(--success);
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.5);
  white-space: nowrap;
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--r-full);
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0a0a1a;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
  white-space: nowrap;
}

.cart-btn:active {
  transform: scale(0.95);
}

/* =========================================================
   BOTTOM SHEET
   ========================================================= */
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 90vh;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: rgba(15, 15, 30, 0.98);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -10px 60px rgba(0, 0, 0, 0.7);
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 200;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-bottom);
}

.bottom-sheet.open {
  transform: translateY(0);
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--text-3);
  margin: 12px auto 8px;
  opacity: 0.5;
  flex-shrink: 0;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px 12px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.sheet-header h2 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.sheet-close:active {
  transform: scale(0.9);
  background: rgba(255, 59, 48, 0.2);
}

.sheet-content {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  max-height: 60vh;
}

.sheet-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--glass-border);
  background: rgba(10, 10, 26, 0.9);
  flex-shrink: 0;
}

/* =========================================================
   CART ITEM
   ========================================================= */
.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  animation: itemEnter 0.3s ease-out;
}

@keyframes itemEnter {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.cart-item:last-child { border-bottom: none; }

.cart-item-img {
  width: 56px;
  height: 56px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-2);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-item-price {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: center;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.qty-btn:active { transform: scale(0.85); }

.qty-btn.plus {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0a0a1a;
  border: none;
}

.qty-value {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn-primary {
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--r-md);
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0a0a1a;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.4);
}

.btn-primary:active {
  transform: scale(0.97);
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
}

.total-amount {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: var(--success);
  text-shadow: 0 0 16px rgba(0, 255, 136, 0.5);
}

/* =========================================================
   SUCCESS SHEET
   ========================================================= */
.success-content {
  padding: 40px 24px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.success-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 240, 255, 0.15));
  border: 2px solid var(--success);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 0 40px rgba(0, 255, 136, 0.4),
    inset 0 0 20px rgba(0, 255, 136, 0.1);
  animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(0, 255, 136, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 60px rgba(0, 255, 136, 0.7); }
}

.success-content h2 {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.5px;
  color: var(--success);
}

.success-content p {
  color: var(--text-2);
  font-size: 14px;
}

.order-code {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--gold);
  padding: 12px 24px;
  border-radius: var(--r-md);
  background: rgba(255, 215, 0, 0.08);
  border: 1px dashed var(--gold);
  text-shadow: 0 0 16px rgba(255, 215, 0, 0.5);
}

/* =========================================================
   TOAST
   ========================================================= */
.toast {
  position: fixed;
  top: calc(80px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  padding: 12px 24px;
  border-radius: var(--r-full);
  background: rgba(20, 20, 40, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--primary);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 300;
  white-space: nowrap;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success { border-color: var(--success); box-shadow: 0 0 30px rgba(0, 255, 136, 0.5); }
.toast.error { border-color: var(--danger); box-shadow: 0 0 30px rgba(255, 59, 48, 0.5); }

/* =========================================================
   CONFETTI (JS sẽ tạo)
   ========================================================= */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  pointer-events: none;
  z-index: 1000;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 400px) {
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .menu-item-name { font-size: 13px; }
  .restaurant-name { max-width: 140px; }
}

@media (min-width: 768px) {
  .menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

.btn-add {
  background: linear-gradient(135deg, #00ff6e 0%, #00b4ff 100%);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0, 255, 110, 0.3);
}

.btn-add:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 255, 110, 0.5);
}

.btn-add:active {
  transform: scale(0.95);
}

.btn-add svg {
  width: 22px;
  height: 22px;
}



/* ============================================
   MODIFIER SHEET — LAYOUT 2 CỘT (LAZADA STYLE)
   ============================================ */

/* Override .bottom-sheet mặc định */
#item-sheet {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  display: none;
}

#item-sheet.open {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
}

#item-sheet::before {
  content: '' !important;
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 0 !important;
}

/* Modal content */
#item-sheet .sheet-content {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  max-width: 900px !important;
  max-height: 90vh !important;
  background: #12121f !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  padding: 0 !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.9) !important;
  display: flex !important;
  flex-direction: column !important;
  animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes modalIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Nút đóng */
#item-sheet .sheet-close,
#item-sheet button[onclick*="closeBottomSheet"] {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(8px) !important;
  border: none !important;
  color: #fff !important;
  font-size: 18px !important;
  cursor: pointer !important;
  z-index: 10 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ═══════════════════════════════════════════
   LAYOUT 2 CỘT
   ═══════════════════════════════════════════ */

.modifier-sheet-2col {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* CỘT TRÁI: ẢNH */
.modifier-left-col {
  position: sticky;
  top: 0;
  align-self: start;
  padding: 20px;
  background: #0f0f1a;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.modifier-main-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: #1a1a2e;
  margin-bottom: 12px;
  position: relative;
}

.modifier-main-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 16px !important;
  transition: opacity 0.15s ease !important;
}

.modifier-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(255, 0, 110, 0.08));
}

/* ✅ Gallery 1 hàng có mũi tên */
.modifier-gallery-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.modifier-gallery {
  flex: 1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
}

.modifier-gallery::-webkit-scrollbar {
  display: none;
}

.gallery-nav-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(20, 20, 40, 0.9);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}

.gallery-nav-btn:hover {
  background: #00ff6e;
  color: #000;
  border-color: #00ff6e;
}

.gallery-nav-btn:active {
  transform: scale(0.9);
}

.gallery-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.gallery-thumb {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #1a1a2e;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
}

.gallery-thumb:hover {
  border-color: rgba(0, 240, 255, 0.4);
}

.gallery-thumb.active {
  border-color: #00ff6e;
  box-shadow: 0 0 12px rgba(0, 255, 110, 0.5);
}

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


.gallery-thumb {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #1a1a2e;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
}

.gallery-thumb:hover {
  border-color: rgba(0, 240, 255, 0.4);
}

.gallery-thumb.active {
  border-color: #00f0ff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}

.gallery-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 8px !important;
}

/* CỘT PHẢI: INFO + MODIFIERS */
.modifier-right-col {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modifier-item-name {
  font-size: 22px !important;
  font-weight: 800 !important;
  color: #fff !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}

.modifier-item-desc {
  font-size: 13px !important;
  color: #8a8aa0 !important;
  margin: 0 !important;
  line-height: 1.5 !important;
}

.modifier-item-price {
  font-size: 24px !important;
  font-weight: 900 !important;
  color: #00ff6e !important;
  text-shadow: 0 0 20px rgba(0, 255, 110, 0.3) !important;
}

.modifier-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

/* Group */
.modifier-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modifier-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modifier-group-header h3 {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.required-badge {
  font-size: 9px !important;
  color: #ff3b30 !important;
  background: rgba(255, 59, 48, 0.15) !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px;
}

.select-many-hint {
  font-size: 11px !important;
  color: #6a6a80 !important;
}

/* Chips chọn 1 */
.modifier-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modifier-chip {
  padding: 8px 14px !important;
  border-radius: 10px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #a0a0c0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.2s !important;
  font-family: inherit !important;
}

.modifier-chip:hover {
  border-color: rgba(0, 240, 255, 0.5) !important;
  background: rgba(0, 240, 255, 0.08) !important;
}

.modifier-chip.active {
  border-color: #00ff6e !important;
  background: rgba(0, 255, 110, 0.12) !important;
  color: #00ff6e !important;
  box-shadow: 0 0 12px rgba(0, 255, 110, 0.3) !important;
}

.chip-check {
  font-size: 11px;
  font-weight: 900;
}

.chip-name {
  font-size: 13px;
}

.chip-price {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.9;
}

/* Checkboxes chọn nhiều */
.modifier-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modifier-checkbox {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}

.modifier-checkbox:hover {
  border-color: rgba(0, 240, 255, 0.4) !important;
}

.modifier-checkbox.active {
  border-color: #00ff6e !important;
  background: rgba(0, 255, 110, 0.08) !important;
}

.checkbox-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.modifier-checkbox.active .checkbox-box {
  background: #00ff6e;
  border-color: #00ff6e;
}

.checkbox-check {
  color: #000;
  font-size: 14px;
  font-weight: 900;
}

.checkbox-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #a0a0c0;
}

.modifier-checkbox.active .checkbox-name {
  color: #00ff6e;
}

.checkbox-price {
  font-size: 13px;
  font-weight: 700;
  color: #00ff6e;
}

/* Ghi chú */
.modifier-note {
  width: 100% !important;
  padding: 12px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 13px !important;
  resize: none !important;
  min-height: 60px !important;
}

.modifier-note:focus {
  outline: none !important;
  border-color: #00ff6e !important;
}

/* ═══════════════════════════════════════════
   FOOTER STICKY
   ═══════════════════════════════════════════ */

.modifier-footer {
  padding: 16px 24px !important;
  background: #0f0f1a !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  flex-shrink: 0 !important;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4) !important;
}

.modifier-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 16px;
}

.modifier-qty-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-label {
  font-size: 13px;
  color: #8a8aa0;
}

.qty-btn-modal {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.qty-btn-modal:hover {
  border-color: #00ff6e;
}

.qty-btn-modal.plus {
  background: #00ff6e;
  color: #000;
  border-color: #00ff6e;
}

.qty-value-modal {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  min-width: 32px;
  text-align: center;
}

.modifier-total-wrap {
  text-align: right;
}

.total-label {
  font-size: 11px;
  color: #6a6a80;
  margin-bottom: 2px;
}

.total-value {
  font-size: 22px;
  font-weight: 900;
  color: #00ff6e;
  text-shadow: 0 0 20px rgba(0, 255, 110, 0.4);
}

.btn-add-to-cart {
  width: 100%;
  padding: 14px 20px !important;
  border-radius: 14px !important;
  border: none !important;
  background: linear-gradient(135deg, #00ff6e, #00b4ff) !important;
  color: #000 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  box-shadow: 0 8px 24px rgba(0, 255, 110, 0.3) !important;
  transition: all 0.2s !important;
  font-family: inherit !important;
}

.btn-add-to-cart:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 32px rgba(0, 255, 110, 0.5) !important;
}

.btn-price {
  background: rgba(0, 0, 0, 0.15);
  padding: 3px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

/* Tablet: 700-900px */
@media (max-width: 900px) and (min-width: 641px) {
  #item-sheet .sheet-content {
    max-width: 700px !important;
  }
  
  .modifier-sheet-2col {
    grid-template-columns: 280px 1fr;
  }
  
  .modifier-left-col {
    padding: 16px;
  }
  
  .modifier-right-col {
    padding: 20px;
  }
}

/* Mobile: < 640px — Chuyển về 1 cột */
@media (max-width: 640px) {
  #item-sheet.open {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  
  #item-sheet .sheet-content {
    max-width: 100% !important;
    max-height: 92vh !important;
    border-radius: 20px 20px 0 0 !important;
  }
  
  .modifier-sheet-2col {
    grid-template-columns: 1fr;
  }
  
  .modifier-left-col {
    position: relative;
    padding: 16px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  
  .modifier-main-image {
    aspect-ratio: 16/9;
    max-height: 200px;
  }
  
  .modifier-right-col {
    padding: 16px;
  }
  
  .modifier-item-name {
    font-size: 18px !important;
  }
  
  .modifier-item-price {
    font-size: 20px !important;
  }
  
  .modifier-footer {
    padding: 12px 16px !important;
  }
  
  .total-value {
    font-size: 18px;
  }
  
  .qty-btn-modal {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
}
/* ✅ Nút đóng bottom sheet */
.modifier-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: all 0.2s;
}

.modifier-close-btn:hover {
  background: rgba(255, 59, 48, 0.8);
  transform: scale(1.1);
}

.modifier-close-btn:active {
  transform: scale(0.95);
}
