/* ==========================================================================
   Pharmacy E-Commerce Theme — Design Tokens & Global Styles
   Based on UIUX.md & MAIN.md specifications
   RTL layout — Persian (Farsi) language
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Font Import (CDN)
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

/* --------------------------------------------------------------------------
   1. CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* === Primary Accent === */
  --color-primary:        #1A1A1A;
  --color-primary-alt:    #2C3E50;
  --color-primary-hover:  #333333;

  /* === Secondary / Interaction === */
  --color-secondary:      #D4A373;
  --color-secondary-alt:  #E9C46A;
  --color-secondary-hover:#C48E5A;

  /* === Alert & Discount === */
  --color-alert:          #E63946;
  --color-alert-light:    #FFF0F0;
  --color-success:        #2E7D32;
  --color-success-light:  #E8F5E9;

  /* === Neutral Backgrounds === */
  --bg-white:             #FFFFFF;
  --bg-light:             #FAFAFA;
  --bg-section:           #F4F4F4;
  --bg-hover:             #F0F0F0;

  /* === Borders === */
  --border-color:         #E5E5E5;
  --border-light:         #F0F0F0;
  --border-focus:         #1A1A1A;

  /* === Typography === */
  --font-primary:         'Vazirmatn', 'Dana', 'IranYekan Web', 'Pinar', 'Tahoma', sans-serif;
  --font-size-xs:         11px;
  --font-size-sm:         13px;
  --font-size-base:       15px;
  --font-size-md:         16px;
  --font-size-lg:         18px;
  --font-size-xl:         22px;
  --font-size-2xl:        28px;
  --font-size-3xl:        36px;
  --line-height-tight:    1.3;
  --line-height-base:     1.6;
  --line-height-loose:    1.8;

  /* === Text Colors === */
  --text-primary:         #1A1A1A;
  --text-secondary:       #555555;
  --text-muted:           #888888;
  --text-light:           #AAAAAA;
  --text-on-dark:         #FFFFFF;

  /* === Geometry === */
  --radius-sm:            6px;
  --radius-md:            8px;
  --radius-lg:            10px;
  --radius-xl:            12px;
  --radius-full:          50%;

  /* === Spacing (15-20% more than standard for visual comfort) === */
  --space-xs:             4px;
  --space-sm:             8px;
  --space-md:             16px;
  --space-lg:             24px;
  --space-xl:             32px;
  --space-2xl:            48px;
  --space-3xl:            64px;

  /* === Grid === */
  --grid-max-width:       1440px;
  --grid-gap:             24px;
  --grid-columns:         12;

  /* === Header Dimensions === */
  --header-utility-h:     40px;
  --header-core-h:        90px;
  --header-nav-h:         50px;

  /* === Shadows === */
  --shadow-sm:            0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:            0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:            0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl:            0 12px 40px rgba(0,0,0,0.15);

  /* === Transitions === */
  --transition-fast:      0.15s ease;
  --transition-base:      0.25s ease;
  --transition-slow:      0.35s ease;

  /* === Z-Index Layers === */
  --z-sticky:             100;
  --z-dropdown:           200;
  --z-mega-menu:          300;
  --z-overlay:            400;
  --z-modal:              500;
  --z-mobile-bar:         1000;
  --z-search-drop:        999;
}

/* --------------------------------------------------------------------------
   2. Reset & Base Styles (RTL)
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  direction: rtl;
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-primary);
  background-color: var(--bg-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-secondary);
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* --------------------------------------------------------------------------
   3. Grid & Container System
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--grid-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--grid-gap);
}

/* --------------------------------------------------------------------------
   4. Typography Utilities
   -------------------------------------------------------------------------- */
.text-xs      { font-size: var(--font-size-xs); }
.text-sm      { font-size: var(--font-size-sm); }
.text-base    { font-size: var(--font-size-base); }
.text-md      { font-size: var(--font-size-md); }
.text-lg      { font-size: var(--font-size-lg); }
.text-xl      { font-size: var(--font-size-xl); }
.text-2xl     { font-size: var(--font-size-2xl); }
.text-3xl     { font-size: var(--font-size-3xl); }

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-light     { color: var(--text-light); }
.text-accent    { color: var(--color-secondary); }
.text-alert     { color: var(--color-alert); }
.text-success   { color: var(--color-success); }

.font-light    { font-weight: 300; }
.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-extrabold{ font-weight: 800; }

.english {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  direction: ltr;
  display: inline-block;
}

/* --------------------------------------------------------------------------
   5. Button System
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 24px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: var(--font-size-base);
  line-height: 1;
  border: 2px solid transparent;
  transition: all var(--transition-base);
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  min-height: 44px;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--text-on-dark);
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: var(--text-on-dark);
}

/* Secondary / Nude */
.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-primary);
  border-color: var(--color-secondary);
}
.btn-secondary:hover {
  background-color: var(--color-secondary-hover);
  border-color: var(--color-secondary-hover);
}

/* Outline */
.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--border-color);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  background-color: var(--bg-hover);
}

/* Danger */
.btn-danger {
  background-color: var(--color-alert);
  color: var(--text-on-dark);
  border-color: var(--color-alert);
}
.btn-danger:hover {
  background-color: #C62828;
  border-color: #C62828;
}

/* Ghost */
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Sizes */
.btn-sm  { padding: 6px 16px; font-size: var(--font-size-sm); min-height: 34px; }
.btn-lg  { padding: 14px 32px; font-size: var(--font-size-lg); min-height: 52px; }
.btn-xl  { padding: 16px 40px; font-size: var(--font-size-xl); min-height: 58px; }

/* Full width */
.btn-block { width: 100%; }

/* Icon button */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}
.btn-icon.btn-sm { width: 32px; height: 32px; }
.btn-icon.btn-lg { width: 48px; height: 48px; }

/* --------------------------------------------------------------------------
   6. Form Elements
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.form-input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  background: var(--bg-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(26,26,26,0.1);
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-input.search-input {
  padding-right: 48px;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-md);
}

/* --------------------------------------------------------------------------
   7. Badge System
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
  line-height: 1.4;
}

.badge-primary   { background: var(--color-primary); color: var(--text-on-dark); }
.badge-secondary { background: var(--color-secondary); color: var(--color-primary); }
.badge-danger    { background: var(--color-alert); color: var(--text-on-dark); }
.badge-success   { background: var(--color-success-light); color: var(--color-success); }
.badge-outline   { background: transparent; border: 1px solid var(--border-color); color: var(--text-secondary); }
.badge-discount  {
  background: var(--color-alert);
  color: var(--text-on-dark);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: var(--font-size-xs);
  font-weight: 700;
}

/* Stock badges */
.badge-in-stock     { background: var(--color-success-light); color: var(--color-success); }
.badge-out-of-stock { background: var(--bg-section); color: var(--text-muted); }
.badge-low-stock    { background: #FFF8E1; color: #F57F17; }

/* --------------------------------------------------------------------------
   8. Card System
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

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

.card-body {
  padding: var(--space-md);
}

.card-header {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.card-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--border-light);
}

/* Product card */
.product-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-card__image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-light);
}
.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-md);
}
.product-card__discount {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
}

.product-card__body {
  padding: var(--space-md);
}

.product-card__brand {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.product-card__title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.product-card__price {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: auto;
}

.product-card__price-current {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--text-primary);
}

.product-card__price-old {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-card__colors {
  display: flex;
  gap: 6px;
  margin-top: var(--space-sm);
}

/* --------------------------------------------------------------------------
   9. Header — Multi-Tier Layout
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--bg-white);
}

/* --- Tier 1: Utility Bar --- */
.header-utility {
  height: var(--header-utility-h);
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-light);
  font-size: var(--font-size-xs);
}

.header-utility .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header-utility__links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.header-utility__links a {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
}
.header-utility__links a:hover {
  color: var(--text-primary);
}

.header-utility__social {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-utility__social a {
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}
.header-utility__social a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* --- Tier 2: Core Console --- */
.header-core {
  height: var(--header-core-h);
  background: var(--bg-white);
}

.header-core .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-lg);
}

.header-core__logo {
  flex: 0 0 auto;
}

.header-logo {
  font-size: var(--font-size-xl);
  font-weight: 900;
  color: var(--color-primary);
  letter-spacing: -0.5px;
}
.header-logo span {
  color: var(--color-secondary);
}

.header-core__search {
  flex: 1 1 auto;
  max-width: 600px;
  position: relative;
}

.search-wrapper {
  position: relative;
}

.search-wrapper .search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
  pointer-events: none;
}

.search-wrapper .form-input {
  padding-right: 44px;
  padding-left: 44px;
  height: 48px;
}

.search-wrapper .search-clear {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}
.search-wrapper .search-clear.visible {
  display: flex;
}
.search-wrapper .search-clear:hover {
  background: var(--bg-hover);
}

.header-core__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-action-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.header-action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.header-action-btn .icon {
  font-size: 20px;
}

.cart-btn {
  position: relative;
}

.cart-btn__count {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--color-alert);
  color: var(--text-on-dark);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Tier 3: Navigation Bar --- */
.header-nav {
  height: var(--header-nav-h);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-white);
}

.header-nav .container {
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0;
}

.nav-list > li {
  height: 100%;
  position: relative;
}

.nav-list > li > a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 var(--space-lg);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition-fast);
  border-bottom: 2px solid transparent;
}
.nav-list > li > a:hover {
  color: var(--text-primary);
  border-bottom-color: var(--color-secondary);
  background: var(--bg-light);
}

/* Mega Menu Dropdown */
.mega-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 720px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-lg);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-base);
  z-index: var(--z-mega-menu);
}

.nav-list > li:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-menu__column h4 {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-secondary);
}

.mega-menu__column ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.mega-menu__column ul a {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  padding: 4px 0;
  display: block;
  transition: all var(--transition-fast);
}
.mega-menu__column ul a:hover {
  color: var(--color-secondary);
  padding-right: 4px;
}

.mega-menu__banner {
  grid-column: 1 / -1;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.mega-menu__banner img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  object-fit: cover;
}
.mega-menu__banner-text {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   10. Live Search Dropdown
   -------------------------------------------------------------------------- */
.search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 100%;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-search-drop);
  display: none;
  overflow: hidden;
}
.search-dropdown.active {
  display: block;
}

.search-dropdown__brands {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.search-dropdown__brands-label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.search-dropdown__brand-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.search-dropdown__brand-tag {
  padding: 4px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.search-dropdown__brand-tag:hover {
  background: var(--color-primary);
  color: var(--text-on-dark);
  border-color: var(--color-primary);
}

.search-dropdown__results {
  max-height: 480px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.search-result-item:last-child {
  border-bottom: none;
}
.search-result-item:hover {
  background: var(--bg-light);
}

.search-result-item__image {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-section);
}
.search-result-item__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.search-result-item__info {
  flex: 1;
  min-width: 0;
}

.search-result-item__title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-item__english {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.search-result-item__meta {
  text-align: left;
  flex-shrink: 0;
}

.search-result-item__price {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.search-dropdown__footer {
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.search-dropdown__footer a {
  font-size: var(--font-size-xs);
  color: var(--color-secondary);
  font-weight: 600;
}

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: calc(var(--z-search-drop) - 1);
  display: none;
}
.search-overlay.active {
  display: block;
}

/* --------------------------------------------------------------------------
   11. Product Page Layout
   -------------------------------------------------------------------------- */
.product-page {
  padding: var(--space-xl) 0 var(--space-3xl);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--text-muted);
}
.breadcrumb a:hover {
  color: var(--color-secondary);
}
.breadcrumb .separator {
  font-size: 10px;
  color: var(--text-light);
}
.breadcrumb .current {
  color: var(--text-primary);
  font-weight: 500;
}

/* Product grid: asymmetrical 2-column */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 0.67fr; /* ~60% info, ~40% gallery */
  gap: var(--space-2xl);
  align-items: start;
}

/* --- Product Info Column (appears first in RTL: right side) --- */
.product-info {
  /* grid-column: 1 in RTL = right side */
}

.product-info__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.product-info__brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  object-fit: contain;
  border: 1px solid var(--border-light);
}

.product-info__brand-name {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-secondary);
}

.product-info__title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  line-height: var(--line-height-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.product-info__title-en {
  font-size: var(--font-size-md);
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

/* Variant Selector Matrix */
.variant-section {
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.variant-section__label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.variant-section__label span {
  color: var(--text-primary);
}

/* Color Swatches */
.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 3px solid transparent;
  box-shadow: 0 0 0 1px var(--border-color);
  transition: all var(--transition-base);
  position: relative;
}

.color-swatch:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 1px var(--color-secondary);
}

.color-swatch.active {
  border-color: var(--bg-white);
  box-shadow: 0 0 0 3px var(--color-primary);
  transform: scale(1.1);
}

.color-swatch__inner {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
}

.color-swatch__tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 50%;
  transform: translateX(50%);
  background: var(--color-primary);
  color: var(--text-on-dark);
  font-size: var(--font-size-xs);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  pointer-events: none;
}
.color-swatch:hover .color-swatch__tooltip {
  opacity: 1;
  visibility: visible;
}

/* Volume/Sizes Badges */
.volume-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.volume-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  min-width: 70px;
  transition: all var(--transition-base);
  background: var(--bg-white);
}
.volume-badge:hover {
  border-color: var(--color-primary);
  background: var(--bg-hover);
}
.volume-badge.active {
  background: var(--color-primary);
  color: var(--text-on-dark);
  border-color: var(--color-primary);
}
.volume-badge.out-of-stock {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* --- Pricing & Cart Action Panel --- */
.product-pricing {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.product-pricing__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.product-pricing__current {
  font-size: var(--font-size-2xl);
  font-weight: 900;
  color: var(--text-primary);
}

.product-pricing__current .currency {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-muted);
  margin-right: var(--space-xs);
}

.product-pricing__old {
  font-size: var(--font-size-md);
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-pricing__discount {
  font-size: var(--font-size-xs);
  background: var(--color-alert-light);
  color: var(--color-alert);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.product-pricing__stock {
  margin-bottom: var(--space-md);
}

.stock-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.stock-status .dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
}

.stock-status.in-stock .dot {
  background: var(--color-success);
}
.stock-status.in-stock {
  color: var(--color-success);
}

.stock-status.out-of-stock .dot {
  background: var(--text-muted);
}
.stock-status.out-of-stock {
  color: var(--text-muted);
}

.stock-status.low-stock .dot {
  background: #F57F17;
}
.stock-status.low-stock {
  color: #F57F17;
}

.product-pricing__cart-row {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.quantity-selector button {
  width: 40px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-light);
  transition: background var(--transition-fast);
}
.quantity-selector button:hover {
  background: var(--bg-hover);
}

.quantity-selector input {
  width: 52px;
  height: 46px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  font-weight: 600;
  font-size: var(--font-size-md);
  outline: none;
}

/* Add-to-cart button */
.btn-add-to-cart {
  flex: 1;
  height: 52px;
  font-size: var(--font-size-lg);
  font-weight: 700;
  border-radius: var(--radius-lg);
  background: var(--color-primary);
  color: var(--text-on-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: all var(--transition-base);
}
.btn-add-to-cart:hover {
  background: var(--color-primary-hover);
}
.btn-add-to-cart.out-of-stock {
  background: #CCCCCC;
  color: #888888;
  cursor: not-allowed;
}

/* --- Product Gallery Column (left side in RTL) --- */
.product-gallery {
  position: sticky;
  top: calc(var(--header-utility-h) + var(--header-core-h) + var(--header-nav-h) + var(--space-lg));
}

.gallery-main {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-lg);
  transition: transform var(--transition-slow);
}

.gallery-main:hover img {
  transform: scale(1.05);
}

.gallery-thumbs {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: var(--space-xs);
}

.gallery-thumb {
  width: 72px;
  height: 72px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  background: var(--bg-light);
}

.gallery-thumb:hover {
  border-color: var(--color-secondary);
}

.gallery-thumb.active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(26,26,26,0.2);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

/* --------------------------------------------------------------------------
   12. Tabbed Content Panel
   -------------------------------------------------------------------------- */
.product-tabs-section {
  margin-top: var(--space-3xl);
}

.tabs-nav {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  padding: 14px 24px;
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all var(--transition-fast);
  cursor: pointer;
  background: none;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-light);
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-content {
  display: none;
  padding: var(--space-xl) 0;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

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

/* Tab content typography */
.tab-content h3 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.tab-content p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-loose);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.tab-content ul {
  list-style: disc;
  padding-right: var(--space-lg);
  margin-bottom: var(--space-md);
}

.tab-content ul li {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  line-height: var(--line-height-loose);
  margin-bottom: var(--space-xs);
}

/* Specification table */
.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table tr {
  border-bottom: 1px solid var(--border-light);
}

.spec-table tr:last-child {
  border-bottom: none;
}

.spec-table td {
  padding: 12px var(--space-md);
  font-size: var(--font-size-sm);
}

.spec-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
  width: 30%;
  background: var(--bg-light);
}

.spec-table td:last-child {
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   13. Q&A Section
   -------------------------------------------------------------------------- */
.qa-section {
  max-width: 800px;
}

.qa-item {
  margin-bottom: var(--space-lg);
}

/* User Question Card */
.qa-question {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.qa-question__header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.qa-question__avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-secondary);
  color: var(--text-on-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-md);
  font-weight: 700;
}

.qa-question__meta {
  flex: 1;
}

.qa-question__name {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.qa-question__date {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.qa-question__text {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  line-height: var(--line-height-loose);
}

/* Official Consultant Response Card */
.qa-answer {
  margin-top: var(--space-sm);
  margin-right: 40px;
  border-right: 4px solid var(--color-secondary);
  padding-right: var(--space-md);
  background: var(--bg-white);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.qa-answer__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
}

.qa-answer__badge::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--color-secondary);
  color: var(--text-on-dark);
  border-radius: var(--radius-full);
  font-size: 10px;
}

.qa-answer__text {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  line-height: var(--line-height-loose);
}

.qa-answer__author {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--space-sm);
  font-weight: 500;
}

/* Q&A submission form */
.qa-form {
  margin-top: var(--space-2xl);
  padding: var(--space-lg);
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.qa-form h4 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.qa-form textarea {
  width: 100%;
  min-height: 120px;
  padding: var(--space-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-fast);
}
.qa-form textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(26,26,26,0.1);
}

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-primary);
  color: var(--text-on-dark);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: var(--space-3xl);
}

.site-footer a {
  color: rgba(255,255,255,0.7);
}
.site-footer a:hover {
  color: var(--color-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-col h4 {
  font-size: var(--font-size-md);
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text-on-dark);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-col ul a {
  font-size: var(--font-size-sm);
}

.footer-about p {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-loose);
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-md);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-sm);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  color: rgba(255,255,255,0.4);
}

.footer-namad {
  display: flex;
  gap: var(--space-md);
}

.footer-namad img {
  width: 72px;
  height: 72px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 8px;
}

/* --------------------------------------------------------------------------
   15. Mobile Bottom Purchase Bar
   -------------------------------------------------------------------------- */
.mobile-purchase-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-top: 1px solid var(--border-color);
  padding: var(--space-sm) var(--space-md);
  z-index: var(--z-mobile-bar);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.mobile-purchase-bar__inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.mobile-purchase-bar__price {
  flex-shrink: 0;
}

.mobile-purchase-bar__price .current {
  font-size: var(--font-size-md);
  font-weight: 800;
  color: var(--text-primary);
}

.mobile-purchase-bar__price .old {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-decoration: line-through;
}

/* --------------------------------------------------------------------------
   16. Hamburger Menu (Mobile)
   -------------------------------------------------------------------------- */
.hamburger-btn {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: var(--radius-md);
}

.hamburger-btn span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.hamburger-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Off-canvas menu */
.offcanvas-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}
.offcanvas-overlay.active {
  opacity: 1;
  visibility: visible;
}

.offcanvas-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-white);
  z-index: var(--z-modal);
  transform: translateX(100%);
  transition: transform var(--transition-base);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.offcanvas-menu.active {
  transform: translateX(0);
}

.offcanvas-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

.offcanvas-menu__close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-muted);
}
.offcanvas-menu__close:hover {
  background: var(--bg-hover);
}

.offcanvas-menu__body {
  flex: 1;
  padding: var(--space-md);
}

.offcanvas-nav a {
  display: block;
  padding: 12px var(--space-md);
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
.offcanvas-nav a:hover {
  background: var(--bg-light);
  color: var(--text-primary);
}

.offcanvas-nav .submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.offcanvas-nav .submenu {
  padding-right: var(--space-md);
  display: none;
}
.offcanvas-nav .submenu.open {
  display: block;
}

/* --------------------------------------------------------------------------
   17. Utilities
   -------------------------------------------------------------------------- */
.text-center   { text-align: center; }
.text-left      { text-align: left; }
.text-right     { text-align: right; }

.d-none         { display: none; }
.d-flex         { display: flex; }
.d-grid         { display: grid; }
.d-block        { display: block; }

.align-center   { align-items: center; }
.justify-between{ justify-content: space-between; }
.justify-center { justify-content: center; }

.gap-sm         { gap: var(--space-sm); }
.gap-md         { gap: var(--space-md); }
.gap-lg         { gap: var(--space-lg); }

.mt-sm          { margin-top: var(--space-sm); }
.mt-md          { margin-top: var(--space-md); }
.mt-lg          { margin-top: var(--space-lg); }
.mt-xl          { margin-top: var(--space-xl); }
.mb-sm          { margin-bottom: var(--space-sm); }
.mb-md          { margin-bottom: var(--space-md); }
.mb-lg          { margin-bottom: var(--space-lg); }
.mb-xl          { margin-bottom: var(--space-xl); }

.w-full         { width: 100%; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* --------------------------------------------------------------------------
   18. Skeleton Loading (for AJAX states)
   -------------------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-section) 25%, var(--bg-light) 50%, var(--bg-section) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

/* --------------------------------------------------------------------------
   19. Responsive Breakpoints
   -------------------------------------------------------------------------- */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  :root {
    --font-size-2xl: 24px;
    --font-size-3xl: 30px;
  }

  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .mega-menu {
    min-width: 500px;
    grid-template-columns: repeat(2, 1fr);
  }

  .header-core__search {
    max-width: 400px;
  }

  .header-utility__links a:last-child,
  .header-utility__links a:nth-last-child(2) {
    display: none;
  }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
  :root {
    --font-size-base: 14px;
    --font-size-2xl: 20px;
    --font-size-3xl: 26px;
    --header-core-h: 64px;
    --grid-gap: 16px;
  }

  .container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  /* Header mobile */
  .header-utility {
    display: none;
  }

  .header-core .container {
    gap: var(--space-sm);
  }

  .header-core__search {
    max-width: none;
    flex: 1;
  }

  .header-core__actions .header-action-btn span {
    display: none;
  }

  .header-logo {
    font-size: var(--font-size-md);
  }

  .header-nav {
    display: none;
  }

  .hamburger-btn {
    display: flex;
  }

  /* Product page: single column */
  .product-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* Gallery first on mobile (after title and before info) */
  /* Since the DOM has gallery second, we use order in the layout */
  .product-gallery {
    position: static;
    order: -1;
  }

  .product-pricing__cart-row {
    flex-direction: column;
  }

  .btn-add-to-cart {
    width: 100%;
  }

  /* Tabs scrollable */
  .tabs-nav {
    gap: 0;
  }

  .tab-btn {
    padding: 12px 16px;
    font-size: var(--font-size-sm);
  }

  /* Q&A indentation reduced */
  .qa-answer {
    margin-right: 20px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  /* Mobile purchase bar */
  .mobile-purchase-bar {
    display: block;
  }

  /* Gallery thumbs smaller */
  .gallery-thumb {
    width: 56px;
    height: 56px;
  }

  /* Product pricing stacked */
  .product-pricing {
    padding: var(--space-md);
  }

  /* Search dropdown full width */
  .search-dropdown {
    position: fixed;
    top: var(--header-core-h);
    right: 0;
    left: 0;
    width: 100%;
    border-radius: 0;
    max-height: calc(100vh - var(--header-core-h));
  }

  .search-dropdown__results {
    max-height: calc(100vh - var(--header-core-h) - 120px);
  }
}

/* Small mobile (< 480px) */
@media (max-width: 480px) {
  .product-pricing__header {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .color-swatch {
    width: 40px;
    height: 40px;
  }

  .color-swatch__inner {
    width: 28px;
    height: 28px;
  }

  .volume-badge {
    padding: 10px 16px;
  }

  .gallery-thumbs {
    gap: 6px;
  }
}

/* ==========================================================================
   20. Animations & Visual Richness
   ========================================================================== */

/* Scroll-triggered entrance reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Floating animation for badges & decorative elements */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%      { transform: translateY(-8px); }
}
.float-anim {
  animation: float 3s ease-in-out infinite;
}

/* Pulsing glow for discount badges */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.5); }
  50%      { box-shadow: 0 0 0 12px rgba(230, 57, 70, 0); }
}
.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Shimmer loading placeholder */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer-bg {
  background: linear-gradient(90deg, var(--bg-section) 25%, #e8e8e8 50%, var(--bg-section) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
}

/* Subtle scale on hover for image cards */
.hover-lift {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* Image zoom on hover */
.img-zoom {
  overflow: hidden;
}
.img-zoom img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.img-zoom:hover img {
  transform: scale(1.08);
}

/* Gradient overlay for banners */
.gradient-overlay {
  position: relative;
}
.gradient-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.gradient-overlay--dark::after {
  background: linear-gradient(135deg, rgba(26,26,26,0.75) 0%, rgba(44,62,80,0.45) 100%);
}
.gradient-overlay--light::after {
  background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(250,250,250,0.2) 100%);
}

/* Bounce-in for toast / notification */
@keyframes bounce-in {
  0%   { transform: translateX(-50%) scale(0.3); opacity: 0; }
  50%  { transform: translateX(-50%) scale(1.05); }
  70%  { transform: translateX(-50%) scale(0.95); }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* Fade-in-up for page sections */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stat counter animation */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Parallax subtle */
.parallax-slow {
  will-change: transform;
}

/* Glass morphism card */
.glass-card {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.5);
}

/* Tilt effect on hover */
.tilt-hover {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.tilt-hover:hover {
  transform: perspective(800px) rotateY(-3deg) rotateX(2deg) translateY(-4px);
}

/* Background pan on hover for banners */
.bg-pan {
  background-size: 110%;
  background-position: center;
  transition: background-size 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              background-position 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.bg-pan:hover {
  background-size: 118%;
  background-position: 48% 48%;
}

/* Counter animation */
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.count-up {
  animation: countUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Badge rotate entrance */
@keyframes badgePop {
  0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
  60%  { transform: scale(1.2) rotate(3deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.badge-pop {
  animation: badgePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Soft glow pulse */
@keyframes softGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(212,163,115,0.3); }
  50%      { box-shadow: 0 0 20px rgba(212,163,115,0.6); }
}
.glow-pulse {
  animation: softGlow 2.5s ease-in-out infinite;
}

/* Slide in from right */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}
.slide-in-right {
  animation: slideInRight 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger children entrance */
.stagger-children > * {
  opacity: 0;
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.stagger-children > *:nth-child(1)  { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2)  { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3)  { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4)  { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5)  { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6)  { animation-delay: 0.3s; }
.stagger-children > *:nth-child(7)  { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8)  { animation-delay: 0.4s; }
.stagger-children > *:nth-child(9)  { animation-delay: 0.45s; }
.stagger-children > *:nth-child(10) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(11) { animation-delay: 0.55s; }
.stagger-children > *:nth-child(12) { animation-delay: 0.6s; }

/* Skeleton pulse for loading states */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.skeleton-pulse {
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
