/* =========================================
   EGIFT.COM - Global Styles & Variables
   2026 Modern Design System
   ========================================= */

:root {
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-200: #fed7aa;
  --orange-300: #fdba74;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-700: #c2410c;
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-light: #fdba74;
  --dark: #0f172a;
  --dark-800: #1e293b;
  --dark-700: #334155;
  --dark-600: #475569;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --white: #ffffff;
  --success: #16a34a;
  --error: #dc2626;
  --warning: #d97706;
  --info: #2563eb;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  --shadow-orange: 0 8px 32px rgba(249,115,22,0.25);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* Typography */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
h4 { font-size: 1.25rem; }
p { color: var(--dark-600); }

/* ========================= LAYOUT ========================= */
.container { max-width: 1440px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 860px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* ========================= BUTTONS ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: var(--transition);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-orange);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(249,115,22,0.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-dark {
  background: var(--dark);
  color: var(--white);
}
.btn-dark:hover {
  background: var(--dark-800);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--dark-600);
  padding: 10px 16px;
}
.btn-ghost:hover { background: var(--gray-100); color: var(--dark); }

.btn-sm { padding: 8px 18px; font-size: 0.875rem; }
.btn-lg { padding: 16px 36px; font-size: 1.0625rem; }
.btn-xl { padding: 20px 48px; font-size: 1.125rem; }

.btn-icon {
  width: 44px; height: 44px; padding: 0;
  border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
}

/* ========================= CARDS ========================= */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--orange-200);
}

/* ========================= BADGE ========================= */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-orange { background: var(--orange-100); color: var(--orange-600); }
.badge-dark { background: var(--dark); color: var(--white); }
.badge-success { background: #dcfce7; color: var(--success); }
.badge-hot { background: linear-gradient(135deg, #f97316, #dc2626); color: white; }

/* ========================= STAR RATING ========================= */
.stars { display: inline-flex; gap: 2px; }
.star { color: #fbbf24; font-size: 0.875rem; }
.star.empty { color: var(--gray-300); }

/* ========================= SECTION HEADERS ========================= */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-header .label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.section-header h2 { line-height: 1.15; }

/* ========================= GRID ========================= */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }

/* ========================= PRODUCT CARD ========================= */
.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: var(--orange-300);
}
.product-card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: var(--transition);
}
.product-card:hover .product-card__img { transform: scale(1.05); }
.product-card__img-wrap { overflow: hidden; position: relative; height: 200px; }
.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}
.product-card__fav {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px; height: 36px;
  background: var(--white);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: none;
}
.product-card__fav:hover { background: var(--orange-50); color: var(--primary); }
.product-card__fav.active { color: var(--primary); }
.product-card__body { padding: 16px; }
.product-card__brand {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.product-card__name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.3;
}
.product-card__rating { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.product-card__rating-count { font-size: 0.8125rem; color: var(--gray-400); }
.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
}
.product-card__price { font-size: 1.25rem; font-weight: 800; color: var(--dark); }
.product-card__price span { font-size: 0.875rem; color: var(--gray-400); font-weight: 500; }
.product-card__add {
  width: 38px; height: 38px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: var(--shadow-orange);
}
.product-card__add:hover {
  background: var(--primary-dark);
  transform: scale(1.1) rotate(90deg);
}

/* ========================= DELIVERY BADGE ========================= */
.delivery-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
  background: #f0fdf4;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

/* ========================= FORMS ========================= */
.form-group { margin-bottom: 24px; }
.form-label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--dark);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(249,115,22,0.1);
}
.form-control::placeholder { color: var(--gray-400); }
.form-control.error { border-color: var(--error); }
.form-hint { font-size: 0.8125rem; color: var(--gray-400); margin-top: 6px; }
.form-error { font-size: 0.8125rem; color: var(--error); margin-top: 6px; }

/* ========================= SEARCH BAR ========================= */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}
.search-bar input {
  width: 100%;
  padding: 14px 56px 14px 52px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 1rem;
  color: var(--dark);
  background: var(--gray-100);
  transition: var(--transition);
  outline: none;
}
.search-bar input:focus {
  background: var(--white);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(249,115,22,0.1);
}
.search-bar .search-icon {
  position: absolute;
  left: 18px;
  color: var(--gray-400);
  font-size: 1.1rem;
  pointer-events: none;
}
.search-bar .search-btn {
  position: absolute;
  right: 8px;
  background: var(--primary);
  color: white;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition);
}
.search-bar .search-btn:hover { background: var(--primary-dark); }

/* ========================= TOAST NOTIFICATIONS ========================= */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--dark);
  color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  min-width: 300px;
  max-width: 420px;
  animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-left: 4px solid var(--primary);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }
.toast.removing { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(100px); } }

/* ========================= SKELETON LOADER ========================= */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ========================= SCROLLBAR ========================= */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ========================= UTILITIES ========================= */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-dark { color: var(--dark); }
.text-gray { color: var(--gray-500); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.w-full { width: 100%; }
.rounded-full { border-radius: var(--radius-full); }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }

/* ========================= RESPONSIVE ========================= */
@media (max-width: 1280px) { .grid-6 { grid-template-columns: repeat(4, 1fr); } .grid-5 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } .grid-5 { grid-template-columns: repeat(3, 1fr); } .grid-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .section { padding: 56px 0; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-5, .grid-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-5, .grid-6 { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 1.875rem; }
}
