/*
 * Sieshka Brand Theme
 * Primary Color: #DD291B (60-30-10 Rule)
 * Border Radius: 50px (Pill)
 */

:root {
  /* Brand Colors - 60-30-10 Rule */
  --brand-primary: #DD291B;
  --brand-dark: #B51D12;
  --brand-light: #FF6B5F;
  --brand-very-light: #FFF5F5;
  
  /* 60% - Backgrounds (Surfaces) */
  --color-bg-primary: #FAFAFA;
  --color-bg-secondary: #FFFFFF;
  --color-bg-tertiary: #F5F5F5;
  
  /* 30% - Primary Elements */
  --color-element-primary: var(--brand-primary);
  --color-element-secondary: var(--brand-dark);
  --color-element-hover: var(--brand-light);
  
  /* 10% - Accents */
  --color-accent: var(--brand-primary);
  --color-accent-border: rgba(221, 41, 27, 0.2);
  --color-accent-bg: var(--brand-very-light);
  
  /* Text Colors */
  --color-text-primary: #1A1A1A;
  --color-text-secondary: #666666;
  --color-text-muted: #999999;
  --color-text-inverse: #FFFFFF;
  
  /* Header & Footer Colors */
  --color-header-bg: #FFFFFF;
  --color-header-border: rgba(221, 41, 27, 0.15);
  --color-footer-bg: #1A1A1A;
  --color-footer-text: #FFFFFF;
  --color-footer-muted: rgba(255, 255, 255, 0.6);
  --color-footer-border: rgba(221, 41, 27, 0.3);
  
  /* Border Radius - Pill Style */
  --radius-pill: 50px;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(221, 41, 27, 0.08);
  --shadow-md: 0 4px 16px rgba(221, 41, 27, 0.12);
  --shadow-lg: 0 8px 32px rgba(221, 41, 27, 0.16);
}

/* Base Styles */
body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
}

/* 60% - Background Elements */
.bg-brand-light {
  background-color: var(--color-bg-secondary) !important;
}

.bg-brand-surface {
  background-color: var(--color-bg-tertiary) !important;
}

/* 30% - Primary Brand Elements */
.bg-brand-primary {
  background-color: var(--color-element-primary) !important;
}

.text-brand {
  color: var(--color-element-primary) !important;
}

/* 10% - Accents */
.border-brand {
  border-color: var(--color-accent) !important;
}

.border-brand-light {
  border-color: var(--color-accent-border) !important;
}

/* Pill Buttons - 50px radius */
.btn {
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.btn-primary,
.btn-brand {
  background-color: var(--color-element-primary);
  border-color: var(--color-element-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover,
.btn-brand:hover {
  background-color: var(--color-element-secondary);
  border-color: var(--color-element-secondary);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-outline-primary,
.btn-outline-brand {
  border-color: var(--color-element-primary);
  color: var(--color-element-primary);
  border-radius: var(--radius-pill);
  background-color: transparent;
}

.btn-outline-primary:hover,
.btn-outline-brand:hover {
  background-color: var(--color-element-primary);
  border-color: var(--color-element-primary);
  color: var(--color-text-inverse);
}

.btn-light {
  background-color: var(--color-bg-secondary);
  border-color: var(--color-accent-border);
  color: var(--color-text-primary);
  border-radius: var(--radius-pill);
}

.btn-light:hover {
  background-color: var(--color-accent-bg);
  border-color: var(--color-element-primary);
  color: var(--color-element-primary);
}

/* Brand Call Button - Icon Only */
.btn-brand-call {
  background-color: var(--color-element-primary);
  color: var(--color-text-inverse);
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.btn-brand-call:hover {
  background-color: var(--color-element-secondary);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  opacity: 1;
}

.btn-brand-call svg {
  fill: currentColor;
}

/* Cards - 60% Background with Brand Accents */
.card {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  background-color: var(--color-bg-tertiary);
  border-bottom: 1px solid var(--color-accent-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

/* Form Controls - Pill Shape */
.form-control,
.form-select {
  border-radius: var(--radius-pill);
  border-color: var(--color-accent-border);
  background-color: var(--color-bg-secondary);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 0.2rem rgba(221, 41, 27, 0.15);
}

/* Navbar - Clean White with Brand Accent */
.navbar {
  background-color: var(--color-header-bg) !important;
  border-bottom: 2px solid var(--color-header-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.navbar-brand {
  color: var(--color-element-primary) !important;
  font-weight: 700;
}

/* Footer - Dark with Brand Accents */
.site-footer {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 3px solid var(--brand-primary);
}

.site-footer a {
  color: var(--color-footer-text);
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: var(--brand-light);
}

.site-footer .footer-text-muted {
  color: var(--color-footer-muted);
  font-size: 0.875rem;
}

.site-footer .footer-brand {
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 1.25rem;
}

/* Footer Action Buttons */
.footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--brand-primary);
  border-radius: 50%;
  color: var(--color-footer-text);
  transition: all 0.3s ease;
}

.footer-btn:hover {
  background-color: var(--brand-primary);
  color: var(--color-text-inverse);
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(221, 41, 27, 0.4);
}

.footer-btn svg {
  fill: currentColor;
}

/* Badges - Pill Style with Brand Colors */
.badge {
  border-radius: var(--radius-pill);
}

.badge.bg-danger {
  background-color: var(--color-element-primary) !important;
}

/* Alerts - Brand Color Accents */
.alert {
  border-radius: var(--radius-lg);
  border: none;
}

.alert-warning {
  background-color: #FFF9E6;
  color: #8B6914;
}

.alert-info {
  background-color: #E8F4FD;
  color: #0C5460;
}

.alert-success {
  background-color: #E8F5E9;
  color: #2E7D32;
}

/* Sticky Cart Bar - Brand Accent */
.sticky-cartbar {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-top: 2px solid var(--color-element-primary);
}

/* Price Display - Brand Color */
.price {
  color: var(--color-element-primary);
  font-weight: 700;
}

/* Quantity Buttons - Pill */
.qty-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-accent-border);
  background-color: var(--color-bg-secondary);
  color: var(--color-element-primary);
  transition: all 0.15s ease;
}

.qty-btn:hover {
  background-color: var(--color-element-primary);
  border-color: var(--color-element-primary);
  color: var(--color-text-inverse);
}

/* Category Headers - Brand Bottom Border */
.menu-category h2 {
  color: var(--color-text-primary);
  border-bottom: 3px solid var(--color-element-primary);
  padding-bottom: 0.5rem;
  display: inline-block;
}

/* Slot Availability Indicators */
.slot-full {
  color: var(--color-element-primary);
  text-decoration: line-through;
  opacity: 0.7;
}

.slot-available {
  color: #0A8A4D;
  font-weight: 500;
}

/* Loading/Spinner */
.spinner-border.text-danger {
  color: var(--color-element-primary) !important;
}

/* Preview Mode Badge */
.preview-badge {
  background-color: var(--color-element-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Admin Panel Link - Subtle Brand Accent */
.admin-link {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-decoration: none;
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.admin-link:hover {
  color: var(--color-element-primary);
  border-color: var(--color-accent-border);
  background-color: var(--color-accent-bg);
}

/* Product Images */
.product-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-accent-border);
}

/* Skeleton Loading Animation */
.skeleton {
  background: linear-gradient(90deg, 
    var(--color-bg-tertiary) 25%, 
    var(--color-bg-secondary) 50%, 
    var(--color-bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  :root {
    --radius-lg: 16px;
    --radius-md: 10px;
  }
  
  .btn {
    padding: 8px 16px;
  }
  
  .btn-brand-call {
    padding: 6px 14px;
    font-size: 0.9rem;
  }
}

/* Focus States for Accessibility */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--color-element-primary);
  outline-offset: 2px;
}

/* Selection Color */
::selection {
  background-color: var(--color-element-primary);
  color: var(--color-text-inverse);
}

/* ============================================================================
   Product Card Quantity Controls (Menu Page)
   ============================================================================ */

.product-card .product-controls {
  width: 100%;
}

.product-card .btn-add-to-cart {
  width: 100%;
  border-radius: var(--radius-pill);
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.15s ease;
}

.product-card .qty-control-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.product-card .qty-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-element-primary);
  background-color: var(--color-bg-secondary);
  color: var(--color-element-primary);
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.15s ease;
  flex-shrink: 0;
  cursor: pointer;
}

.product-card .qty-btn:hover:not(:disabled) {
  background-color: var(--color-element-primary);
  border-color: var(--color-element-primary);
  color: var(--color-text-inverse);
}

.product-card .qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: var(--color-text-muted);
  color: var(--color-text-muted);
}

.product-card .qty-btn-minus {
  border-color: var(--color-accent-border);
  color: var(--color-text-secondary);
}

.product-card .qty-btn-minus:hover:not(:disabled) {
  background-color: var(--color-bg-tertiary);
  border-color: var(--color-text-muted);
  color: var(--color-text-primary);
}

.product-card .qty-display {
  min-width: 36px;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text-primary);
  user-select: none;
}

.product-card .btn-unavailable {
  width: 100%;
  border-radius: var(--radius-pill);
  background-color: var(--color-bg-tertiary);
  border-color: var(--color-accent-border);
  color: var(--color-text-muted);
  cursor: not-allowed;
  padding: 0.5rem 1rem;
}

/* ============================================================================
   Navbar Cart Button Styles
   ============================================================================ */

.navbar-cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--color-accent-bg);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-pill);
  color: var(--color-element-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.navbar-cart-btn:hover {
  background-color: var(--color-element-primary);
  border-color: var(--color-element-primary);
  color: var(--color-text-inverse);
}

.navbar-cart-btn .cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: var(--color-element-primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.navbar-cart-btn .cart-summary {
  font-weight: 600;
  font-size: 0.9rem;
}

.navbar-menu-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

/* ============================================================================
   Offcanvas Cart Styles
   ============================================================================ */

.offcanvas-cart {
  max-width: 420px;
}

.offcanvas-cart .offcanvas-header {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-dark) 100%);
  color: white;
  border-bottom: none;
}

.offcanvas-cart .offcanvas-title {
  font-weight: 600;
}

.offcanvas-cart .btn-close {
  filter: invert(1);
}

.offcanvas-cart .cart-item {
  padding: 1rem;
  border-bottom: 1px solid var(--color-accent-border);
}

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

.offcanvas-cart .cart-item-name {
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 0.25rem;
}

.offcanvas-cart .cart-item-price {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.offcanvas-cart .cart-item-total {
  font-weight: 600;
  color: var(--color-element-primary);
}

.offcanvas-cart .qty-control {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.offcanvas-cart .qty-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-accent-border);
  background-color: var(--color-bg-secondary);
  color: var(--color-element-primary);
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.15s ease;
  cursor: pointer;
}

.offcanvas-cart .qty-btn:hover:not(:disabled) {
  background-color: var(--color-element-primary);
  border-color: var(--color-element-primary);
  color: var(--color-text-inverse);
}

.offcanvas-cart .qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.offcanvas-cart .qty-value {
  min-width: 28px;
  text-align: center;
  font-weight: 600;
}

.offcanvas-cart .cart-footer {
  background-color: var(--color-bg-tertiary);
  border-top: 1px solid var(--color-accent-border);
}

.offcanvas-cart .cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--color-accent-border);
}

.offcanvas-cart .cart-total-label {
  font-weight: 500;
  color: var(--color-text-secondary);
}

.offcanvas-cart .cart-total-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-element-primary);
}

.offcanvas-cart .cart-limits {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: center;
  padding: 0.5rem 1rem;
}

.offcanvas-cart .cart-actions {
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
}

.offcanvas-cart .cart-actions .btn {
  flex: 1;
}

.offcanvas-cart .empty-cart-message {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--color-text-muted);
}

.offcanvas-cart .empty-cart-message i {
  font-size: 3rem;
  color: var(--color-accent-border);
  margin-bottom: 1rem;
  display: block;
}

/* ============================================================================
   Toast Notifications
   ============================================================================ */

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1060;
}

.toast {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 320px;
}

.toast-header {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-dark) 100%);
  color: white;
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.toast-header .btn-close {
  filter: invert(1);
}

.toast-body {
  padding: 1rem;
}

.toast-footer {
  padding: 0.75rem 1rem;
  background-color: var(--color-bg-tertiary);
  border-top: 1px solid var(--color-accent-border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toast-cart-summary {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

/* ============================================================================
   Responsive Adjustments
   ============================================================================ */

@media (max-width: 576px) {
  .offcanvas-cart {
    max-width: 100%;
  }
  
  .navbar-menu-title {
    display: none;
  }
  
  .navbar-cart-btn .cart-text {
    display: none;
  }
  
  .navbar-cart-btn {
    padding: 0.5rem;
  }
  
  .toast-container {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
  
  .toast {
    min-width: auto;
    width: 100%;
  }
  
  .product-card .qty-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  
  .product-card .qty-display {
    min-width: 28px;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .sticky-bar {
    top: 56px !important;
  }
}
