.section-description {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 32px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.ribbon-description {
  position: relative;
  padding: 18px 50px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.12), rgba(16, 185, 129, 0.12));
  border-radius: 999px;
  display: inline-flex;
  justify-content: center;
  width: 100%;
  border: 1px solid rgba(99, 102, 241, 0.15);
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
}

.ribbon-description span {
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
}

/* ========================
   E-COMMERCE STYLES
   Light Mode Primary, Dark Mode Optional
   ======================== */

/* ========================
   CSS VARIABLES
   ======================== */
:root {
  /* Spacing & Layout */
  --gutter: 20px;
  --radius: 18px;
  --container-max: 1200px;
  --columns: 12;

  /* Light Mode Colors (Primary) */
  --primary: #6366F1;
  --accent: #10B981;
  --text: #0B1220;
  --muted: #5B6475;
  --bg: #F7F8FC;
  --card: #FFFFFF;
  --border: #E6E8EF;
  --surface: #FFFFFF;
  --shadow: 0 4px 12px rgba(11, 18, 32, 0.08);
  --soft-shadow: 0 2px 8px rgba(11, 18, 32, 0.06);
  --hover-shadow: 0 8px 24px rgba(11, 18, 32, 0.12);
}

/* Dark Mode Colors (Optional) */
html[data-theme="dark"] {
  --primary: #818CF8;
  --accent: #34D399;
  --text: #E9EFF7;
  --muted: #9AA3B2;
  --bg: #0D1220;
  --card: #151821;
  --border: rgba(255, 255, 255, 0.1);
  --surface: #1A1D29;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --soft-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --hover-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] body {
  background: radial-gradient(circle at center, #1c2546f5 0%, #010103f5 55%, #05070ffc 100%);
  color: var(--text);
}

/* Dark mode: Keep blue shapes, no gradients */
html[data-theme="dark"] .section-bg-1::before,
html[data-theme="dark"] .section-bg-1::after,
html[data-theme="dark"] .section-bg-1 .container::before,
html[data-theme="dark"] .section-bg-1 .container::after {
  background: rgba(129, 140, 248, 0.15);
}

html[data-theme="dark"] .section-bg-2::before,
html[data-theme="dark"] .section-bg-2::after,
html[data-theme="dark"] .section-bg-2 .container::before,
html[data-theme="dark"] .section-bg-2 .container::after {
  background: rgba(129, 140, 248, 0.15);
}

html[data-theme="dark"] .section-bg-3::before,
html[data-theme="dark"] .section-bg-3::after,
html[data-theme="dark"] .section-bg-3 .container::before,
html[data-theme="dark"] .section-bg-3 .container::after {
  background: rgba(129, 140, 248, 0.15);
}

/* Responsive Gutters */
@media (max-width: 1200px) {
  :root {
    --gutter: 18px;
  }
}

@media (max-width: 768px) {
  :root {
    --gutter: 16px;
  }
}

@media (max-width: 480px) {
  :root {
    --gutter: 14px;
  }
}

/* ========================
   RESET & BASE
   ======================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  scroll-behavior: smooth;
  width: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Cairo", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  position: relative;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

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

/* ========================
   SKIP TO CONTENT
   ======================== */
.skip-to-content {
  position: absolute;
  top: -100px;
  right: 0;
  background: var(--primary);
  color: white;
  padding: 12px 20px;
  z-index: 100;
  border-radius: 0 0 8px 8px;
}

.skip-to-content:focus {
  top: 0;
}

/* ========================
   CONTAINER & GRID
   ======================== */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  column-gap: var(--gutter);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Container for sections with margins (all except hero) */
.section>.container {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (max-width: 768px) {
  .container {
    padding-inline: var(--gutter);
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: var(--gutter);
  }
}

.section {
  padding-block: 40px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: 1fr minmax(0, var(--container-max)) 1fr;
  gap: 0;
  position: relative;
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.8s ease;
}

/* Reveal animations */
.section.reveal-vertical {
  transform: translateY(50px);
}

.section.reveal-horizontal-left {
  transform: translateX(-50px);
}

.section.reveal-horizontal-right {
  transform: translateX(50px);
}

/* RTL support for horizontal reveals */
[dir="rtl"] .section.reveal-horizontal-left {
  transform: translateX(50px);
}

[dir="rtl"] .section.reveal-horizontal-right {
  transform: translateX(-50px);
}

/* Disable horizontal reveal animation on mobile for categories and best sellers */
@media (max-width: 768px) {

  .section:has(#categories-container).reveal-horizontal-left,
  .section:has(#categories-container).reveal-horizontal-right,
  .section:has(#bestsellers-carousel).reveal-horizontal-left,
  .section:has(#bestsellers-carousel).reveal-horizontal-right {
    transform: none;
  }
}

/* After reveal, return to original position (no translate) - must override all transform rules */
.section.revealed {
  opacity: 1;
  transform: translate(0, 0) !important;
}

/* Ensure revealed state overrides RTL rules */
[dir="rtl"] .section.revealed.reveal-horizontal-left,
[dir="rtl"] .section.revealed.reveal-horizontal-right,
.section.revealed.reveal-vertical,
.section.revealed.reveal-horizontal-left,
.section.revealed.reveal-horizontal-right {
  transform: translate(0, 0) !important;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .section {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* Different background shapes for each section - no gradients, blue shapes behind content */
.section-bg-1 {
  position: relative;
  overflow: hidden;
}

.section-bg-1::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.section-bg-1::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 250px;
  height: 250px;
  background: rgba(99, 102, 241, 0.10);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  pointer-events: none;
  z-index: 0;
}

/* Additional shapes for section-bg-1 using container */
.section-bg-1 .container {
  position: relative;
  z-index: 1;
}

.section-bg-1 .container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  width: 150px;
  height: 150px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 50%;
  pointer-events: none;
  transform: translateY(-50%);
  z-index: 0;
}

.section-bg-1 .container::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 15%;
  width: 120px;
  height: 120px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 20% 80% 80% 20% / 20% 20% 80% 80%;
  pointer-events: none;
  z-index: 0;
}

.section-bg-2 {
  position: relative;
  overflow: hidden;
}

.section-bg-2 .container {
  position: relative;
  z-index: 1;
}

.section-bg-2::before {
  content: '';
  position: absolute;
  top: -80px;
  left: -80px;
  width: 280px;
  height: 280px;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  pointer-events: none;
  z-index: 0;
}

.section-bg-2::after {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 320px;
  height: 320px;
  background: rgba(99, 102, 241, 0.10);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* Additional shapes for section-bg-2 */
.section-bg-2 .container::before {
  content: '';
  position: absolute;
  top: 30%;
  right: 20%;
  width: 180px;
  height: 180px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.section-bg-2 .container::after {
  content: '';
  position: absolute;
  bottom: 15%;
  left: 12%;
  width: 140px;
  height: 140px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
  pointer-events: none;
  z-index: 0;
}

.section-bg-3 {
  position: relative;
  overflow: hidden;
}

.section-bg-3 .container {
  position: relative;
  z-index: 1;
}

.section-bg-3::before {
  content: '';
  position: absolute;
  top: -90px;
  right: -90px;
  width: 290px;
  height: 290px;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.section-bg-3::after {
  content: '';
  position: absolute;
  bottom: -70px;
  left: -70px;
  width: 240px;
  height: 240px;
  background: rgba(99, 102, 241, 0.10);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  pointer-events: none;
  z-index: 0;
}

/* Additional shapes for section-bg-3 */
.section-bg-3 .container::before {
  content: '';
  position: absolute;
  top: 60%;
  right: 25%;
  width: 160px;
  height: 160px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.section-bg-3 .container::after {
  content: '';
  position: absolute;
  top: 10%;
  left: 18%;
  width: 130px;
  height: 130px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 25% 75% 75% 25% / 25% 25% 75% 75%;
  pointer-events: none;
  z-index: 0;
}


/* Hero section should be full-width (no side margins) */
.section:has(.hero) {
  grid-template-columns: 1fr;
  padding-inline: 0;
}

/* Hero container breaks out of grid */
.section:has(.hero)>.container {
  grid-column: 1 / -1;
  padding-inline: 0;
}

/* All other sections use grid margins */
.section:not(:has(.hero))>.container {
  grid-column: 2;
  padding-inline: var(--gutter);
}

@media (max-width: 1200px) {
  .section:not(:has(.hero)) {
    grid-template-columns: var(--gutter) 1fr var(--gutter);
  }

  .section:not(:has(.hero))>.container {
    grid-column: 2;
    padding-inline: var(--gutter);
  }
}

@media (max-width: 768px) {
  .section {
    padding-block: 28px;
  }

  .section:not(:has(.hero)) {
    grid-template-columns: var(--gutter) 1fr var(--gutter);
  }
}

@media (max-width: 480px) {
  .section {
    padding-block: 24px;
  }

  .section:not(:has(.hero)) {
    grid-template-columns: var(--gutter) 1fr var(--gutter);
  }
}

.section-title {
  grid-column: 1 / -1;
  font-weight: 700;
  font-size: clamp(22px, 2.5vw, 32px);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
  text-align: center;
  width: 100%;
}

.section-title::before,
.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to left, transparent, var(--primary), transparent);
  max-width: 200px;
}

.section-title::before {
  background: linear-gradient(to right, transparent, var(--primary), transparent);
}

.section-title .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.section-title .section-icon {
  font-size: 28px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .section-title {
    gap: 12px;
  }

  .section-title::before,
  .section-title::after {
    max-width: 100px;
  }

  .section-title .section-icon {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .section-title {
    gap: 8px;
  }

  .section-title::before,
  .section-title::after {
    max-width: 60px;
  }

  .section-title .section-icon {
    font-size: 20px;
  }
}

/* ========================
   HEADER / NAVBAR
   ======================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(247, 248, 252, 0.9);
  border-bottom: 1px solid var(--border);
}

html[data-theme="dark"] .header {
  background: rgba(15, 17, 21, 0.9);
}

.header .container {
  align-items: center;
  padding-block: 16px;
  min-height: 70px;
}

.logo {
  grid-column: 1 / span 3;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 22px;
  color: var(--text);
}

.logo img {
  width: 100px;
  height: 100px;
}

.search {
  grid-column: 4 / span 6;
}

@media (max-width: 900px) {
  .search {
    grid-column: 1 / -1;
    order: 1;
    margin-top: 12px;
  }
}

@media (max-width: 600px) {
  .search input {
    height: 40px;
    font-size: 14px;
    padding-inline: 14px;
  }
}

.search input {
  width: 100%;
  height: 44px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding-inline: 18px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.header-actions {
  grid-column: 10 / -1;
  justify-self: end;
  display: flex;
  gap: 12px;
  align-items: center;
}

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  transition: all 0.2s ease;
}

.cart-link:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.cart-badge {
  position: absolute;
  top: -6px;
  left: -6px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
  display: none;
}

.cart-badge.has-items {
  display: block;
}

.account-link {
  padding: 8px 16px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  transition: all 0.2s ease;
}

.account-link:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 24px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

@media (max-width: 900px) {
  .logo {
    grid-column: 1 / span 5;
    font-size: 18px;
  }

  .search {
    grid-column: 1 / -1;
    order: 1;
    margin-top: 12px;
  }

  .header-actions {
    grid-column: auto;
    gap: 8px;
  }

  .theme-toggle {
    padding: 6px 10px;
    font-size: 12px;
  }

  .cart-link,
  .account-link {
    padding: 6px 12px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .header .container {
    padding-block: 12px;
    min-height: 60px;
    gap: 8px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
  }

  .logo {
    grid-column: 1 / span 5;
    font-size: 18px;
  }

  .logo img {
    width: 32px;
    height: 32px;
  }

  .header-actions {
    grid-column: 6 / -1;
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
  }

  .theme-toggle {
    padding: 6px 10px;
    font-size: 12px;
  }

  .theme-toggle .theme-text {
    display: none;
  }

  .cart-link {
    padding: 6px;
    font-size: 18px;
  }

  .cart-link span:not(.cart-badge):not(.sr-only) {
    display: none;
  }

  .account-link {
    padding: 6px 12px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .header .container {
    padding-block: 10px;
    min-height: 56px;
    gap: 6px;
  }

  .logo {
    grid-column: 1 / span 4;
    font-size: 16px;
  }

  .logo img {
    width: 28px;
    height: 28px;
  }

  .header-actions {
    grid-column: 5 / -1;
    gap: 4px;
  }

  .theme-toggle {
    padding: 5px 8px;
    font-size: 11px;
  }

  .theme-toggle span:not(:first-child) {
    display: none;
  }

  .cart-link {
    padding: 5px;
    font-size: 16px;
  }

  .account-link {
    padding: 5px 10px;
    font-size: 11px;
  }
}

/* ========================
   BUTTONS
   ======================== */
.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.btn[style*="width: 100%"] {
  width: 100% !important;
  max-width: 100% !important;
}

.btn.primary:hover {
  background: #4F46E5;
  border-color: #4F46E5;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn.secondary {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn.secondary:hover {
  background: rgba(99, 102, 241, 0.1);
}

.btn-transparent {
  background: transparent !important;
  border: 2px solid var(--primary) !important;
  color: var(--primary) !important;
  font-weight: 600;
}

.btn-transparent:hover {
  background: var(--primary) !important;
  color: white !important;
}

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

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-lg {
  padding: 16px 28px;
  font-size: 17px;
}

/* ========================
   CARDS
   ======================== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--soft-shadow);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hover-shadow);
}

/* ========================
   PRODUCT CARDS
   ======================== */
.product-card,
.product-card-hover {
  display: grid;
  grid-template-rows: 220px auto;
  cursor: pointer;
}

.product-card .thumb {
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .thumb img {
  transform: scale(1.05);
}

.discount-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent);
  color: white;
  font-weight: 900;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  z-index: 2;
}

.bestseller-badge {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  z-index: 2;
  white-space: nowrap;
}

.wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  /* Changed from left to right */
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wishlist-btn svg {
  width: 20px;
  height: 20px;
  stroke: #333;
  stroke-width: 2;
  fill: none;
  transition: all 0.3s ease;
}

.wishlist-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wishlist-btn:hover svg {
  stroke: #EF4444;
}

.wishlist-btn.active svg {
  fill: #EF4444;
  stroke: #EF4444;
}

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

.product-card .info {
  padding: 16px;
  display: grid;
  gap: 8px;
}

.product-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-description {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.stars {
  color: #FBBF24;
  font-size: 14px;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 4px;
}

.product-card .thumb .discount-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  right: auto;
  width: auto;
  background: var(--error, #ff3b30);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Ensure wishlist button is on the right */
.wishlist-btn {
  top: 12px;
  right: 12px;
  left: auto;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-weight: 700;
  color: var(--primary);
}

.product-price .price-current {
  font-size: 1.1em;
}

.product-price .price-old {
  text-decoration: line-through;
  color: var(--text-secondary, #888);
  font-size: 0.9em;
  font-weight: 400;
}

.product-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* Product card description - single line with ellipsis */
.product-description-card {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 4px;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ========================
   CATEGORY CARDS
   ======================== */
.category-card {
  aspect-ratio: auto;
  position: relative;
  overflow: visible;
  cursor: pointer;
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  min-width: 160px;
  width: 160px;
  box-shadow: var(--soft-shadow);
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--hover-shadow);
  border-color: var(--primary);
}

.category-image-wrapper {
  width: 100%;
  height: 140px;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  position: relative;
  background: var(--surface);
}

.category-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card:hover .category-image {
  transform: scale(1.1);
}

.category-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  flex: 1;
  justify-content: center;
}

.category-name {
  position: static;
  background: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: center;
}

.category-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 18px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.category-card:hover .category-arrow {
  opacity: 1;
  transform: translateY(0);
}

/* ========================
   SWIPER CUSTOM STYLES
   ======================== */
.categories-swiper {
  width: 100%;
  padding: 20px 10px 40px 10px;
  /* Bottom padding for pagination */
  overflow: hidden;
  /* Ensure no scrollbars */
}

.categories-swiper .swiper-slide {
  height: auto;
  display: flex;
  justify-content: center;
}

.related-products-swiper {
  padding-bottom: 50px;
  width: 100%;
  overflow: hidden;
}

.related-products-swiper .swiper-wrapper {
  display: flex;
  align-items: stretch;
}

.related-products-swiper .swiper-slide {
  height: auto;
  display: flex;
  justify-content: center;
  width: auto;
}

.related-products-swiper .swiper-slide .product-card {
  width: 100%;
  height: 100%;
}

.related-products-swiper .swiper-button-next,
.related-products-swiper .swiper-button-prev {
  color: var(--primary);
  background: var(--card);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.related-products-swiper .swiper-button-next:hover,
.related-products-swiper .swiper-button-prev:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

.related-products-swiper .swiper-button-next::after,
.related-products-swiper .swiper-button-prev::after {
  font-size: 18px;
  font-weight: 900;
}

.related-products-swiper .swiper-pagination {
  bottom: 0;
}

.related-products-swiper .swiper-pagination-bullet {
  background: var(--primary);
  opacity: 0.3;
}

.related-products-swiper .swiper-pagination-bullet-active {
  opacity: 1;
}

@media (max-width: 768px) {
  .related-products-swiper {
    padding-bottom: 40px;
  }
  
  .related-products-swiper .swiper-button-next,
  .related-products-swiper .swiper-button-prev {
    width: 36px;
    height: 36px;
  }
  
  .related-products-swiper .swiper-button-next::after,
  .related-products-swiper .swiper-button-prev::after {
    font-size: 16px;
  }
}

.categories-swiper .category-card {
  width: 100%;
  margin: 0;
}

/* Navigation Buttons */
.categories-swiper .swiper-button-next,
.categories-swiper .swiper-button-prev {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.9);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

.categories-swiper .swiper-button-next:after,
.categories-swiper .swiper-button-prev:after {
  font-size: 18px;
  font-weight: bold;
}

.categories-swiper .swiper-button-next:hover,
.categories-swiper .swiper-button-prev:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

/* Pagination Dots */
.categories-swiper .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: var(--text-secondary);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.categories-swiper .swiper-pagination-bullet-active {
  width: 24px;
  border-radius: 4px;
  background: var(--primary-color);
  opacity: 1;
}

/* Center categories on mobile when there are few items */
@media (max-width: 768px) {
  .categories-scroll {
    gap: 16px;
  }
}



.categories-center {
  /* max-width: 1000px; */
  /* Removed to show all category items */
  margin-inline: auto;
  width: 100%;
}

/* Best Sellers Swiper - Same style as Categories Swiper */
.bestsellers-swiper {
  width: 100%;
  padding: 20px 10px 40px 10px;
  overflow: hidden;
}

.bestsellers-swiper .swiper-slide {
  height: auto;
  display: flex;
  justify-content: center;
}

.bestsellers-swiper .swiper-slide .product-card {
  width: 100%;
  height: 100%;
}

/* Navigation Buttons */
.bestsellers-swiper .swiper-button-next,
.bestsellers-swiper .swiper-button-prev {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.9);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

.bestsellers-swiper .swiper-button-next:after,
.bestsellers-swiper .swiper-button-prev:after {
  font-size: 18px;
  font-weight: bold;
}

.bestsellers-swiper .swiper-button-next:hover,
.bestsellers-swiper .swiper-button-prev:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

/* Pagination Dots */
.bestsellers-swiper .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: var(--text-secondary);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.bestsellers-swiper .swiper-pagination-bullet-active {
  width: 24px;
  border-radius: 4px;
  background: var(--primary-color);
  opacity: 1;
}

/* ========================
   FORMS
   ======================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  max-width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

@media (max-width: 768px) {
  .form-group {
    margin-bottom: 16px;
  }

  .form-input,
  .form-select,
  .form-textarea {
    padding: 10px 14px;
    font-size: 14px;
  }

  .form-label {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .form-group {
    margin-bottom: 14px;
  }

  .form-input,
  .form-select,
  .form-textarea {
    padding: 10px 12px;
    font-size: 16px;
    /* Prevent zoom on iOS */
  }
}

.form-error {
  margin-top: 6px;
  font-size: 13px;
  color: #EF4444;
  display: none;
}

.form-group.has-error .form-error {
  display: block;
}

.form-group.has-error .form-input,
.form-group.has-error .form-select,
.form-group.has-error .form-textarea {
  border-color: #EF4444;
}

.form-help {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-item:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.radio-item input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.radio-item input[type="radio"]:checked+label {
  color: var(--primary);
  font-weight: 700;
}

/* ========================
   OTP INPUT
   ======================== */
.otp-container {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 24px 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.otp-input {
  width: 60px;
  height: 60px;
  max-width: calc(25% - 9px);
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.otp-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

@media (max-width: 480px) {
  .otp-input {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .otp-container {
    gap: 8px;
  }
}

/* ========================
   QUANTITY STEPPER
   ======================== */
.quantity-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  background: var(--surface);
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .quantity-stepper {
    width: 100%;
    justify-content: center;
  }
}

.quantity-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  background: rgba(99, 102, 241, 0.1);
}

.quantity-input {
  width: 50px;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  padding: 0;
}

.quantity-input:focus {
  outline: none;
}

/* ========================
   CAROUSEL / SLIDER
   ======================== */
.carousel-container {
  position: relative;
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
  /* Changed from hidden to show all items */
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  transition: all 0.3s ease;
}

.carousel-container:hover {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .carousel-container {
    margin-inline: 0;
    padding-inline: var(--gutter);
    overflow: visible;
  }
}

.carousel-wrapper {
  overflow: hidden;
  /* Hidden on large screens for slider controls */
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: var(--radius);
}

@media (max-width: 768px) {

  /* Enable scrolling on mobile */
  .carousel-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-inline: 0;
  }

  /* Hide scrollbar */
  .carousel-wrapper::-webkit-scrollbar {
    display: none;
  }

  .carousel-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
}

.carousel-track {
  display: flex;
  gap: var(--gutter);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  direction: ltr;
  /* Force LTR for carousel track to work correctly */
  box-sizing: border-box;
}

[dir="rtl"] .carousel-track {
  direction: rtl;
  /* Use RTL for proper RTL scrolling */
  /* Start from right side in RTL */
  justify-content: flex-start;
}

[dir="rtl"] .carousel-wrapper {
  direction: rtl;
}

@media (max-width: 768px) {
  .carousel-wrapper {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
    padding-inline: 0;
  }

  .carousel-wrapper::-webkit-scrollbar {
    display: none;
  }

  .carousel-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .carousel-track {
    transition: none !important;
    /* Disable transform transition on mobile for smooth scrolling */
    width: auto;
    min-width: 100%;
    transform: none !important;
    /* Remove any transform on mobile */
    padding-inline: 0;
  }
}

.carousel-item {
  flex: 0 0 auto;
  min-width: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.carousel-item:hover {
  transform: translateY(-4px);
}

@media (max-width: 1024px) {
  .carousel-item {
    min-width: calc(33.333% - 14px);
  }
}

@media (max-width: 768px) {
  .carousel-item {
    min-width: calc(50% - calc(var(--gutter) / 2));
    flex: 0 0 calc(50% - calc(var(--gutter) / 2));
    scroll-snap-align: start;
    flex-shrink: 0;
  }

  /* Add padding to first and last items using pseudo-elements */
  .carousel-track::before {
    content: '';
    flex: 0 0 var(--gutter);
    min-width: var(--gutter);
  }

  .carousel-track::after {
    content: '';
    flex: 0 0 var(--gutter);
    min-width: var(--gutter);
  }
}

@media (max-width: 480px) {
  .carousel-item {
    min-width: calc(100% - var(--gutter));
    flex: 0 0 calc(100% - var(--gutter));
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}

/* Modern Carousel Buttons - Below Cards Design */
.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding: 0;
}

.carousel-btn {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
}

.carousel-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--primary);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
  z-index: 0;
}

.carousel-btn:hover::before {
  width: 100%;
  height: 100%;
}

.carousel-btn:hover {
  border-color: var(--primary);
  color: white;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.carousel-btn:active {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.carousel-btn>* {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.carousel-btn:hover>* {
  transform: scale(1.1);
}

.carousel-btn.prev {
  order: 1;
}

.carousel-btn.next {
  order: 2;
}

/* RTL support for carousel buttons */
[dir="rtl"] .carousel-btn.prev {
  order: 2;
}

[dir="rtl"] .carousel-btn.next {
  order: 1;
}

.carousel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

/* Ensure buttons are clickable when not disabled */
.carousel-btn:not(:disabled) {
  pointer-events: all;
  cursor: pointer;
}

.carousel-btn:disabled::before {
  display: none;
}

/* Dark mode support for carousel buttons */
[data-theme="dark"] .carousel-btn {
  background: rgba(30, 30, 40, 0.95);
  color: var(--text);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .carousel-btn:hover {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
}

/* Carousel Dots Indicator */
.carousel-dots {
  display: none;
  /* Hidden on large screens */
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  padding: 0;
}

.carousel-dot:hover {
  background: var(--primary);
  transform: scale(1.2);
}

.carousel-dot.active {
  width: 24px;
  height: 8px;
  border-radius: 4px;
  background: var(--primary);
  transform: scale(1);
}

@media (max-width: 768px) {

  /* Show dots on mobile */
  .carousel-dots {
    display: flex;
  }

  .carousel-controls {
    display: none;
  }

  .carousel-btn {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  .carousel-container:hover {
    transform: none;
  }
}

/* Horizontal scroll categories */
.categories-scroll {
  display: flex;
  gap: var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  direction: rtl;
  /* Start from right in RTL */
  justify-content: center;
}

[dir="rtl"] .categories-scroll {
  direction: rtl;
}

@media (max-width: 768px) {
  .categories-scroll {
    padding-inline: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    margin-inline: 0;
  }

  .categories-scroll::-webkit-scrollbar {
    display: none;
  }

  .categories-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  /* First and last category cards should have padding */
  .categories-scroll::before,
  .categories-scroll::after {
    content: '';
    flex: 0 0 var(--gutter);
  }
}

/* Scrollbar already hidden in main .categories-scroll rule above */

.categories-scroll .category-card {
  flex: 0 0 160px;
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: hidden;
}

.category-card {
  border-radius: var(--radius);
  overflow: hidden;
}

@media (max-width: 768px) {
  .categories-scroll {
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
  }

  .categories-scroll .category-card {
    flex: 0 0 calc(100% - var(--gutter) * 2);
    min-width: calc(100% - var(--gutter) * 2);
    scroll-snap-align: center;
  }

  /* Add spacing before first and after last item to center them */
  .categories-scroll::before,
  .categories-scroll::after {
    content: '';
    flex: 0 0 var(--gutter);
    min-width: var(--gutter);
  }
}

/* ========================
   HERO BANNER
   ======================== */
.hero {
  grid-column: 1 / -1;
  position: relative;
  height: 500px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 768px) {
  .hero {
    border-radius: 0;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(292deg, rgb(20 20 23 / 96%), rgba(19, 28, 25, 0.442));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  color: white;
}

.hero h1 {
  font-weight: 900;
  font-size: clamp(28px, 4vw, 48px);
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero p {
  font-size: clamp(16px, 2vw, 20px);
  margin-bottom: 32px;
  opacity: 0.95;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 768px) {
  .hero {
    height: 300px;
  }

  .hero-content {
    padding: 24px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

/* ========================
   PROMO BANNER
   ======================== */
/* Promo Banner Carousel */
.promo-banner-carousel {
  grid-column: 1 / -1;
  position: relative;
  margin: 40px 0;
  overflow: hidden;
}

.promo-banner-carousel {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.promo-banner-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  gap: 0;
  width: 100%;
}

.promo-banner-item {
  flex: 0 0 100%;
  position: relative;
  width: 100%;
  height: 500px;
  /* Increased height */
  min-height: 350px;
  /* Increased min-height */
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}

.promo-banner-item a {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  text-decoration: none;
  position: relative;
}

.promo-banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.3s ease;
  z-index: 1;
  display: block;
}

.promo-banner-item:hover .promo-banner-bg {
  transform: scale(1.05);
}

.promo-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  background: transparent;
  /* Removed background */
  z-index: 2;
  display: block;
}

.promo-banner-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  color: white;
}

.promo-banner-content h2 {
  font-weight: 700;
  font-size: clamp(22px, 3vw, 32px);
  margin-bottom: 12px;
}

.promo-banner-content p {
  font-size: clamp(14px, 1.8vw, 18px);
  opacity: 0.95;
  margin-bottom: 20px;
}

/* Navigation Dots */
.promo-banner-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 0;
}

.promo-banner-dot {
  width: 24px;
  /* Reduced from 40px */
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  padding: 0;
}

.promo-banner-dot.active {
  background: var(--primary);
  width: 32px;
  /* Reduced from 50px */
}

.promo-banner-dot:hover {
  background: var(--primary);
  opacity: 0.7;
}

/* Mobile Header Fixes */
@media (max-width: 480px) {
  .header .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    height: auto;
    min-height: 60px;
  }

  .logo {
    font-size: 18px;
    flex: 1;
  }

  .logo img {
    width: 32px;
    height: 32px;
  }

  .header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .search {
    width: 100%;
    order: 3;
    margin-top: 10px;
  }
}

/* Hero Mobile Fixes */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 28px;
    line-height: 1.3;
  }

  .hero p {
    font-size: 16px;
    padding: 0 16px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    padding: 0 32px;
  }

  .hero-actions .btn {
    width: 100% !important;
  }
}

/* Banner Dots Mobile Fix */
@media (max-width: 768px) {
  .promo-banner-dots {
    gap: 4px;
    margin-top: 10px;
  }

  .promo-banner-dot {
    width: 6px !important;
    height: 3px !important;
    opacity: 0.5;
  }

  .promo-banner-dot.active {
    width: 16px !important;
    opacity: 1;
  }
}

/* Modern App Card Design */
.category-card {
  aspect-ratio: 3/4;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 28px;
  /* Softer corners */
  border: none;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Bouncy transition */
  min-width: 180px;
  width: 180px;
  display: block;
  background: var(--surface);
  isolation: isolate;
  /* Fix for Safari overflow */
}

.category-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

.category-image-wrapper {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

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

.category-card:hover .category-image {
  transform: scale(1.15) rotate(-2deg);
  /* Subtle rotation */
}

/* Gradient Overlay & Content Layout */
.category-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  /* Center content */
  gap: 12px;
  z-index: 1;
  transition: padding-bottom 0.3s ease;
}

.category-card:hover .category-content {
  padding-bottom: 28px;
  /* Lift content slightly */
}

.category-name {
  color: white;
  font-size: 19px;
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transform-origin: center bottom;
  /* Center transform origin */
  transition: transform 0.3s ease;
  flex: 1;
  text-align: center;
  /* Center text */
}

[dir="rtl"] .category-name {
  transform-origin: center bottom;
}

.category-card:hover .category-name {
  transform: scale(1.05);
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .category-card {
    min-width: 160px;
    width: 160px;
    border-radius: 22px;
  }

  .category-content {
    padding: 16px 14px;
  }

  .category-name {
    font-size: 16px;
  }
}

/* ========================
   PRODUCT GRID
   ======================== */
.products-grid {
  grid-column: 1 / -1;
  display: grid;
  gap: 24px;
  /* Increased gap for better spacing */
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
}

/* Large screens - 4 columns (2 rows of 4 cards) */
@media (min-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

@media (max-width: 1199px) and (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

@media (max-width: 1023px) and (min-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (max-width: 767px) and (min-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 479px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Removed: Limit products grid to 2 rows max (8 products) */
/* This was limiting products display. Now using pagination instead. */
/* .products-grid>*:nth-child(n+9) {
  display: none;
} */

/* Special button container with animations and shapes */
.show-all-container {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 48px;
  margin-bottom: 24px;
  position: relative;
  padding: 40px 20px;
}

.show-all-container::before,
.show-all-container::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--primary), transparent);
  top: 50%;
  transform: translateY(-50%);
}

.show-all-container::before {
  right: 0;
}

.show-all-container::after {
  left: 0;
  background: linear-gradient(to left, transparent, var(--primary), transparent);
}

.show-all-wrapper {
  position: relative;
  display: inline-block;
  padding: 20px 40px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(16, 185, 129, 0.1));
  border-radius: 50px;
  border: 2px solid var(--primary);
  overflow: hidden;
  transition: all 0.4s ease;
}

.show-all-wrapper::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(99, 102, 241, 0.1), transparent);
  transform: rotate(45deg);
  animation: shimmer 3s infinite;
}

.show-all-wrapper::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2), transparent);
  transition: width 0.6s ease, height 0.6s ease;
}

.show-all-wrapper:hover::after {
  width: 300px;
  height: 300px;
}

.show-all-wrapper:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.3);
  border-color: var(--accent);
}

.show-all-container .btn {
  position: relative;
  z-index: 2;
  padding: 16px 40px;
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  color: white;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.show-all-container .btn:hover {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
}

.show-all-container .btn::before {
  content: '✨';
  margin-left: 8px;
  display: inline-block;
  animation: sparkle 1.5s infinite;
}

.show-all-container .btn::after {
  content: '✨';
  margin-right: 8px;
  display: inline-block;
  animation: sparkle 1.5s infinite 0.75s;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }

  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
  }

  50% {
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.6);
  }
}

@keyframes sparkle {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

/* Decorative shapes around button */
.show-all-shape {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  pointer-events: none;
  animation: float 4s ease-in-out infinite;
}

.show-all-shape:nth-child(1) {
  top: -20px;
  right: 20%;
  animation-delay: 0s;
}

.show-all-shape:nth-child(2) {
  bottom: -20px;
  left: 20%;
  animation-delay: 1s;
  background: rgba(16, 185, 129, 0.1);
}

.show-all-shape:nth-child(3) {
  top: 50%;
  right: -30px;
  transform: translateY(-50%);
  animation-delay: 2s;
  width: 40px;
  height: 40px;
  background: rgba(139, 92, 246, 0.1);
}

.show-all-shape:nth-child(4) {
  top: 50%;
  left: -30px;
  transform: translateY(-50%);
  animation-delay: 1.5s;
  width: 50px;
  height: 50px;
  background: rgba(99, 102, 241, 0.1);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) translateX(0);
  }

  50% {
    transform: translateY(-20px) translateX(10px);
  }
}

/* RTL support for floating shapes */
[dir="rtl"] .show-all-shape:nth-child(3) {
  right: auto;
  left: -30px;
}

[dir="rtl"] .show-all-shape:nth-child(4) {
  left: auto;
  right: -30px;
}

@media (max-width: 768px) {
  .show-all-container {
    padding: 30px 15px;
    margin-top: 32px;
  }

  .show-all-wrapper {
    padding: 16px 32px;
  }

  .show-all-container .btn {
    padding: 14px 32px;
    font-size: 16px;
  }

  .show-all-container::before,
  .show-all-container::after {
    width: 60px;
  }

  .show-all-shape {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .show-all-container {
    padding: 24px 10px;
    margin-top: 24px;
  }

  .show-all-wrapper {
    padding: 12px 24px;
  }

  .show-all-container .btn {
    padding: 12px 24px;
    font-size: 15px;
  }

  .show-all-container::before,
  .show-all-container::after {
    width: 40px;
  }
}

/* ========================
   FILTERS BAR
   ======================== */
.filters-bar {
  grid-column: 1 / -1;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .filters-bar {
    padding: 16px;
    gap: 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .filter-group label {
    font-size: 13px;
  }

  .filter-group select,
  .filter-group input {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .filters-bar {
    padding: 12px;
    gap: 10px;
  }
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
}

.filter-group select,
.filter-group input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}

.filter-group input {
  width: 100px;
}

/* ========================
   PAGINATION
   ======================== */
.pagination {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.pagination-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========================
   PRODUCT DETAIL PAGE
   ======================== */
.product-detail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 900px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .product-detail {
    gap: 24px;
  }

  .product-info {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .product-detail {
    gap: 20px;
    margin-bottom: 24px;
  }

  .product-info {
    gap: 14px;
  }
}

.product-gallery {
  position: relative;
}

.product-gallery-main {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 16px;
  position: relative;
}

.product-gallery-main img {
  width: 100%;
  height: 100%;
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: zoom-in;
}

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

.product-gallery-thumbs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.product-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.product-gallery-grid-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--surface);
}

.product-gallery-grid-item:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

.product-gallery-grid-item.active {
  border-color: var(--primary);
  border-width: 3px;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.product-gallery-grid-item img {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 768px) {
  .product-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .product-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
  }
}

.product-gallery-thumb {
  flex: 0 0 80px;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.product-gallery-thumb:hover,
.product-gallery-thumb.active {
  border-color: var(--primary);
}

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

.product-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-detail-title {
  font-weight: 900;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--text);
  display: block;
}

@media (max-width: 768px) {
  .product-detail-title {
    font-size: clamp(20px, 4vw, 28px);
  }
}

@media (max-width: 480px) {
  .product-detail-title {
    font-size: clamp(18px, 5vw, 24px);
  }
}

.product-detail-rating {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-detail-price {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.product-detail-price .price-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.product-detail-price .price-current {
  font-weight: 900;
  font-size: 32px;
  color: var(--text);
}

.product-detail-price .price-old {
  font-size: 20px;
  color: var(--muted);
  text-decoration: line-through;
}

.product-detail-price .discount-badge {
  background: #dc2626;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  position: static;
  display: inline-block;
  vertical-align: middle;
}

.product-description-section {
  margin-bottom: 32px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.product-video-section {
  margin-top: 32px;
  margin-bottom: 32px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.product-video-container {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.product-video-container video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  background: #000;
  max-height: 600px;
}

@media (max-width: 768px) {
  .product-video-section {
    padding: 20px;
    margin-top: 24px;
    margin-bottom: 24px;
  }
}

@media (max-width: 480px) {
  .product-video-section {
    padding: 16px;
    margin-top: 20px;
    margin-bottom: 20px;
  }
}

.product-section-title {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--primary);
  border-radius: 2px;
}

.product-description {
  color: var(--text);
  line-height: 1.8;
  font-size: 16px;
  display: block;
  text-align: right;
  direction: rtl;
}

.product-description p {
  margin-bottom: 12px;
  color: var(--muted);
}

.product-description p:last-child {
  margin-bottom: 0;
}

.description-feature {
  padding: 8px 0;
  padding-right: 20px;
  color: var(--text);
  position: relative;
}

.description-feature::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 768px) {
  .product-description-section {
    padding: 20px;
    margin-bottom: 24px;
  }

  .product-section-title {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .product-description {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .product-description-section {
    padding: 16px;
    margin-bottom: 20px;
  }

  .product-section-title {
    font-size: 15px;
  }

  .product-description {
    font-size: 14px;
  }
}

/* Product Variations */
.product-variations {
  margin-bottom: 32px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.variations-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.variations-header-accent {
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--primary), rgba(99, 102, 241, 0.6));
  border-radius: 2px;
  flex-shrink: 0;
}

.variations-title {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  margin: 0;
  flex: 1;
}

.variations-content {
  padding: 24px;
}

.variation-group {
  margin-bottom: 24px;
}

.variation-group:last-child {
  margin-bottom: 0;
}

.variation-label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 14px;
  color: var(--text);
  letter-spacing: 0.3px;
}

.variation-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.variation-option {
  padding: 10px 20px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 60px;
  text-align: center;
}

.variation-option:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.variation-option.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

/* Color option styles - circular with hex color */
.variation-option.color-option {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--border);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  background-size: cover;
  position: relative;
  min-width: 48px;
  min-height: 48px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.variation-option.color-option:hover {
  transform: scale(1.15);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.variation-option.color-option.active {
  border-color: var(--primary);
  border-width: 4px;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 4px 16px rgba(99, 102, 241, 0.4);
  transform: scale(1.15);
  background: inherit; /* Keep the hex color background */
}

/* Text option styles */
.variation-option.text-option {
  padding: 10px 20px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  font-size: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.variation-option.text-option:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2);
}

.variation-option.text-option.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Wishlist button */
.product-wishlist {
  margin-bottom: 16px;
}

.product-wishlist .btn-outline {
  border: 2px solid var(--border);
  background: transparent;
  color: var(--text);
}

.product-wishlist .btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Wishlist button on main image */
.wishlist-btn-main {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wishlist-btn-main:hover {
  background: white;
  border-color: var(--primary);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wishlist-btn-main.active {
  background: rgba(220, 38, 38, 0.1);
  border-color: #dc2626;
}

.wishlist-btn-main #wishlistIconMain {
  font-size: 24px;
  line-height: 1;
  transition: color 0.2s ease;
}

.wishlist-btn-main.active #wishlistIconMain {
  color: #dc2626;
}

/* Image Modal */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: pointer;
}

.image-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10000;
}

.image-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.image-modal img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  cursor: default;
}

@media (max-width: 768px) {
  .image-modal-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
  
  .image-modal img {
    max-width: 95%;
    max-height: 95%;
  }
}

/* Checkout Modal */
.checkout-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  overflow-y: auto;
}

.checkout-modal-content {
  background: var(--card);
  border-radius: var(--radius);
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
}

.checkout-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 10;
}

.checkout-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.checkout-modal-close {
  background: none;
  border: none;
  font-size: 32px;
  color: var(--muted);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.checkout-modal-close:hover {
  background: var(--surface);
  color: var(--text);
  transform: scale(1.1);
}

.checkout-modal-body {
  padding: 24px;
}

.checkout-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}

.checkout-modal-left {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.checkout-modal-middle {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.checkout-modal-right {
  display: flex;
  flex-direction: column;
}

@media (max-width: 1200px) {
  .checkout-modal-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  
  .checkout-modal-middle {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .checkout-modal-content {
    max-width: 95%;
  }
  
  .checkout-modal-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .checkout-modal-middle {
    grid-column: 1;
  }
}

.checkout-section-modal {
  margin-bottom: 32px;
}

.checkout-section-modal:last-child {
  margin-bottom: 0;
}

.checkout-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

/* Address Radio Group */
.addresses-radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.address-radio-item {
  display: flex;
  align-items: flex-start;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--surface);
}

.address-radio-item:hover {
  border-color: var(--primary);
  background: var(--card);
}

.address-radio-item input[type="radio"] {
  margin-left: 12px;
  margin-top: 4px;
  cursor: pointer;
}

.address-radio-item input[type="radio"]:checked + .address-radio-content {
  color: var(--primary);
}

.address-radio-content {
  flex: 1;
}

.address-radio-name {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--text);
}

.address-radio-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.address-radio-item input[type="radio"]:checked ~ .address-radio-content .address-radio-name,
.address-radio-item:has(input[type="radio"]:checked) .address-radio-name {
  color: var(--primary);
}

.address-radio-item:has(input[type="radio"]:checked) {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

/* Coupon Input Group */
.coupon-input-group {
  display: flex;
  gap: 12px;
}

.coupon-input-group .form-input {
  flex: 1;
}

.coupon-input-group .btn {
  white-space: nowrap;
}

/* Checkout Price Summary */
.checkout-price-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius);
}

.checkout-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
}

.checkout-price-row span:first-child {
  color: var(--muted);
}

.checkout-price-row span:last-child {
  font-weight: 600;
  color: var(--text);
}

.checkout-total {
  padding-top: 12px;
  border-top: 2px solid var(--border);
  font-size: 20px;
  font-weight: 700;
}

.checkout-total span:last-child {
  font-size: 24px;
  color: var(--primary);
}

@media (max-width: 768px) {
  .checkout-modal {
    padding: 10px;
  }
  
  .checkout-modal-content {
    max-height: 95vh;
  }
  
  .checkout-modal-header {
    padding: 20px;
  }
  
  .checkout-modal-body {
    padding: 20px;
  }
  
  .coupon-input-group {
    flex-direction: column;
  }
  
  .coupon-input-group .btn {
    width: 100%;
  }
}

.size-option {
  min-width: 80px;
}

@media (max-width: 768px) {
  .variations-header {
    padding: 16px 20px;
  }
  
  .variations-title {
    font-size: 16px;
  }
  
  .variations-content {
    padding: 20px;
  }
  
  .variation-group {
    margin-bottom: 20px;
  }

  .variation-option.text-option {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .variation-option.color-option {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
}

  .product-detail-price .price-current {
    font-size: 28px;
  }

  .product-detail-price .price-old {
    font-size: 18px;
  }

  .product-description {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .product-detail-price .price-current {
    font-size: 24px;
  }

  .product-detail-price .price-old {
    font-size: 16px;
  }
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text);
}

.product-actions-detail {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .product-actions-detail {
    flex-direction: column;
    align-items: stretch;
  }

  .product-actions-detail .quantity-stepper {
    width: 100%;
    justify-content: center;
  }

  .product-actions-detail .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .product-actions-detail {
    gap: 12px;
  }
}


/* ========================
   CART PAGE
   ======================== */
.cart-items {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.cart-items::-webkit-scrollbar {
  width: 6px;
}

.cart-items::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
  background: var(--text);
}

@media (max-width: 768px) {
  .cart-items {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .cart-items {
    gap: 12px;
    margin-bottom: 16px;
  }
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 20px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .cart-item {
    grid-template-columns: 80px 1fr;
    gap: 16px;
    padding: 16px;
  }

  .cart-item-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 480px) {
  .cart-item {
    grid-template-columns: 70px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .cart-item-image {
    width: 70px;
    height: 70px;
  }

  .cart-item-title {
    font-size: 14px;
  }

  .cart-item-price {
    font-size: 16px;
  }

  .cart-item-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .quantity-stepper {
    width: 100%;
    justify-content: center;
  }
}

.cart-item-image {
  width: 100px;
  height: 100px;
  min-width: 100px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cart-item-image {
    width: 80px;
    height: 80px;
    min-width: 80px;
  }
}

@media (max-width: 480px) {
  .cart-item-image {
    width: 70px;
    height: 70px;
    min-width: 70px;
  }
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-item-title {
  font-weight: 700;
  font-size: 16px;
}

.cart-item-price {
  font-weight: 900;
  font-size: 18px;
  color: var(--primary);
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .cart-item-actions {
    align-items: stretch;
  }
}

.remove-item-btn {
  background: transparent;
  border: none;
  color: #EF4444;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.remove-item-btn:hover {
  background: rgba(239, 68, 68, 0.1);
}

.cart-summary {
  grid-column: 1 / -1;
  max-width: 400px;
  margin-left: auto;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .cart-summary {
    max-width: 100%;
    margin-left: 0;
    margin-top: 24px;
  }
}

@media (max-width: 480px) {
  .cart-summary {
    padding: 20px;
  }
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cart-summary {
    order: -1;
    position: sticky;
    top: 80px;
    z-index: 10;
  }
}

@media (max-width: 768px) {
  .cart-layout {
    gap: 20px;
    display: flex;
    flex-direction: column;
  }

  .cart-summary {
    order: -1;
    position: static;
    width: 100%;
    max-width: 100%;
    padding: 20px;
  }

  .cart-summary h2 {
    font-size: 18px;
  }

  .cart-summary-row {
    font-size: 14px;
  }

  .cart-summary-row:last-child {
    font-size: 18px;
  }

  .cart-items {
    width: 100%;
    max-width: 100%;
    overflow-x: visible;
  }
}

@media (max-width: 480px) {
  .cart-layout {
    gap: 16px;
  }

  .cart-summary {
    padding: 16px;
  }

  .cart-summary h2 {
    font-size: 16px;
    margin-bottom: 16px;
  }

  .cart-summary-row {
    padding: 10px 0;
    font-size: 13px;
  }

  .cart-summary-row:last-child {
    font-size: 16px;
  }

  .cart-summary-actions {
    margin-top: 16px;
    gap: 10px;
  }

  .cart-summary-actions .btn {
    padding: 10px 16px;
    font-size: 14px;
  }
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-summary-row:last-child {
  border-bottom: none;
  font-weight: 900;
  font-size: 20px;
  margin-top: 8px;
}

.cart-summary-actions {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 768px) {
  .cart-item {
    grid-template-columns: 80px 1fr;
  }

  .cart-item-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* ========================
   CHECKOUT PAGE
   ======================== */
.checkout-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
}

@media (max-width: 1024px) {
  .checkout-grid {
    grid-template-columns: 1fr 350px;
    gap: 32px;
  }
}

@media (max-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .order-summary {
    position: static !important;
  }
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.checkout-section {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}

@media (max-width: 768px) {
  .checkout-section {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .checkout-section {
    padding: 16px;
  }
}

.checkout-section-title {
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.order-summary {
  position: sticky;
  top: 90px;
  height: fit-content;
}

.order-summary-items {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.order-summary-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.order-summary-item-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.order-summary-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-summary-item-info {
  flex: 1;
}

.order-summary-item-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.order-summary-item-meta {
  font-size: 12px;
  color: var(--muted);
}

.order-summary-totals {
  border-top: 2px solid var(--border);
  padding-top: 16px;
  margin-top: 16px;
}

.order-summary-total-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 15px;
}

.order-summary-total-row.grand-total {
  font-weight: 900;
  font-size: 20px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

@media (max-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .order-summary {
    position: static;
  }
}

/* ========================
   ORDERS PAGE
   ======================== */
.orders-list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.order-card {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.order-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

@media (max-width: 1200px) {
  .orders-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (max-width: 900px) {
  .orders-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .order-card {
    padding: 20px;
  }

  .order-meta {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .order-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 600px) {
  .orders-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .order-card {
    padding: 16px;
  }

  .order-number {
    font-size: 16px;
  }

  .order-meta-value {
    font-size: 14px;
  }
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.order-number {
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
}

.order-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

.order-status.processing {
  background: #FEF3C7;
  color: #92400E;
}

.order-status.shipping {
  background: #DBEAFE;
  color: #1E40AF;
}

.order-status.delivering {
  background: #FCE7F3;
  color: #9F1239;
}

.order-status.completed {
  background: #D1FAE5;
  color: #065F46;
}

.order-status.cancelled {
  background: #FEE2E2;
  color: #991B1B;
}

.order-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.order-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-meta-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.order-meta-value {
  font-weight: 700;
  font-size: 16px;
}

.order-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ========================
   ORDER DETAIL PAGE
   ======================== */
.order-detail-header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.order-detail-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.order-items-card {
  grid-column: 2;
}

.order-items-container {
  max-height: 500px;
  overflow-y: auto;
}

@media (max-width: 1400px) {
  .order-detail-grid {
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
  }
  
  .order-items-card {
    grid-column: 2;
  }
}

@media (max-width: 1200px) {
  .order-detail-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  
  .order-items-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1200px) {
  .order-detail-info {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .order-detail-info {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.order-detail-card {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

@media (max-width: 768px) {
  .order-detail-card {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .order-detail-card {
    padding: 16px;
  }
}

.order-detail-card-title {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.order-detail-items {
  grid-column: 1 / -1;
  margin-bottom: 32px;
}

.order-items-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.order-items-table thead {
  background: var(--surface);
}

.order-items-table th {
  padding: 16px;
  text-align: right;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  border-bottom: 2px solid var(--border);
}

.order-items-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.order-items-table tbody tr:last-child td {
  border-bottom: none;
}

.order-item-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.order-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-totals {
  grid-column: 1 / -1;
  max-width: 500px;
  margin-left: auto;
}

.order-totals-table {
  width: 100%;
  border-collapse: collapse;
}

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

.order-totals-table td {
  padding: 12px 0;
  font-size: 16px;
}

.order-totals-table td:first-child {
  color: var(--muted);
}

.order-totals-table td:last-child {
  text-align: left;
  font-weight: 700;
}

.order-totals-table tfoot tr {
  border-top: 2px solid var(--border);
  border-bottom: none;
}

.order-totals-table tfoot td {
  padding-top: 16px;
  font-size: 20px;
  font-weight: 900;
}


@media (max-width: 768px) {
  .order-items-table {
    font-size: 13px;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .order-items-table thead th {
    padding: 12px 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .order-items-table td {
    padding: 12px 8px;
    white-space: nowrap;
  }

  .order-item-image {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .order-items-table td {
    font-size: 13px;
  }
}

/* ========================
   FOOTER
   ======================== */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding-top: 40px;
  background: var(--surface);
  background-image: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(16, 185, 129, 0.03) 100%);
}

html[data-theme="dark"] .footer {
  background: var(--card);
  background-image: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.footer .container {
  padding-bottom: 40px;
}

.footer-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 22px;
}

.footer-logo img {
  width: 100px;
  height: 100px;
}

.footer-desc {
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

.footer-section h3 {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--muted);
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-contact {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.footer-contact a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer-contact a:hover {
  color: var(--primary);
}

.app-badges {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.app-badge {
  display: block;
  height: 40px;
  width: auto;
}

.app-badge img {
  height: 100%;
  width: auto;
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 18px;
}

.social-link i {
  font-size: 18px;
}

.social-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.footer-copyright {
  grid-column: 1 / -1;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================
   EMPTY STATES
   ======================== */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 40px;
  text-align: center;
  color: var(--muted);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-title {
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--text);
}

.empty-state-text {
  font-size: 15px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .empty-state {
    min-height: 250px;
    padding: 32px 20px;
  }

  .empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
  }

  .empty-state-title {
    font-size: 18px;
  }

  .empty-state-text {
    font-size: 14px;
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .empty-state {
    min-height: 200px;
    padding: 24px 16px;
  }

  .empty-state-icon {
    font-size: 40px;
    margin-bottom: 10px;
  }

  .empty-state-title {
    font-size: 16px;
  }

  .empty-state-text {
    font-size: 13px;
    margin-bottom: 16px;
  }
}

/* ========================
   TOAST / NOTIFICATION
   ======================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 0%;
  transform: translateX(-50%) translateY(100px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 24px;
  box-shadow: var(--hover-shadow);
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s ease;
}

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

.toast.success {
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.1);
}

.toast.error {
  border-color: #EF4444;
  background: rgba(239, 68, 68, 0.1);
}

/* ========================
   BREADCRUMB
   ======================== */
.breadcrumb {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb-separator {
  color: var(--border);
}

/* ========================
   LOADING STATES
   ======================== */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ========================
   FORM CONTAINERS (Login/Signup)
   ======================== */
.form-container {
  grid-column: 1 / -1;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

@media (max-width: 600px) {
  .form-container {
    max-width: 100%;
    padding: 0;
    width: 100%;
  }

  .checkout-section {
    width: 100%;
    max-width: 100%;
  }
}

/* ========================
   UTILITY CLASSES
   ======================== */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--muted);
}

.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mt-4 {
  margin-top: 32px;
}

.mb-1 {
  margin-bottom: 8px;
}

.mb-2 {
  margin-bottom: 16px;
}

.mb-3 {
  margin-bottom: 24px;
}

.mb-4 {
  margin-bottom: 32px;
}

.hidden {
  display: none !important;
}

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

/* ========================
   ACCOUNT PAGE
   ======================== */
.account-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  margin-top: 24px;
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.account-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.account-profile {
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.account-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 16px;
}

.account-name {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
}

.account-email {
  color: var(--muted);
  font-size: 14px;
}

.account-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: right;
  cursor: pointer;
  font-size: 15px;
  font-family: inherit;
}

.account-nav-item:hover {
  background: var(--surface);
}

.account-nav-item.active {
  background: var(--primary);
  color: white;
}

.account-nav-item.logout-btn {
  color: var(--accent);
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.account-nav-item.logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
}

.account-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.account-tab {
  display: none;
}

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

.account-tab-title {
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 24px;
}

.account-form {
  max-width: 600px;
}

.addresses-list {
  display: grid;
  gap: 16px;
}

.address-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.address-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.address-header h3 {
  font-weight: 700;
  font-size: 18px;
}

.address-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--surface);
  border-color: var(--primary);
}

.address-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
}


.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 16px;
}

.order-date {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

.order-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-left: 12px;
}

.status-قيد-التجهيز {
  background: rgba(245, 158, 11, 0.1);
  color: #F59E0B;
}

.status-قيد-التوصيل {
  background: rgba(99, 102, 241, 0.1);
  color: #6366F1;
}

.status-تم-التسليم {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
}

.order-items {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.order-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.order-total {
  text-align: left;
  font-size: 18px;
  padding-top: 12px;
  border-top: 2px solid var(--border);
}

.settings-list {
  display: grid;
  gap: 20px;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.setting-item h3 {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}

.setting-item p {
  color: var(--muted);
  font-size: 14px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border);
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked+.toggle-slider {
  background-color: var(--primary);
}

.toggle-switch input:checked+.toggle-slider:before {
  transform: translateX(24px);
}

@media (max-width: 900px) {
  .account-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .account-sidebar {
    position: static;
    padding: 20px;
  }

  .account-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .account-nav-item {
    flex: 0 0 auto;
    white-space: nowrap;
    min-width: fit-content;
    scroll-snap-align: start;
  }

  .account-nav-item.logout-btn {
    margin-top: 0;
    border-top: none;
    padding-top: 12px;
    border-right: 1px solid var(--border);
    padding-right: 16px;
    margin-right: 8px;
  }

  .account-avatar {
    width: 60px;
    height: 60px;
    font-size: 28px;
  }

  .account-name {
    font-size: 16px;
  }

  .account-email {
    font-size: 13px;
  }

  .account-content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .account-layout {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
}

@media (max-width: 768px) {
  .account-content {
    padding: 20px;
  }

  .account-tab-title {
    font-size: 20px;
  }

  .order-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .address-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .address-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .account-sidebar {
    padding: 16px;
  }

  .account-content {
    padding: 16px;
  }

  .account-avatar {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .account-name {
    font-size: 15px;
  }

  .account-email {
    font-size: 12px;
  }

  .account-nav-item {
    padding: 10px 12px;
    font-size: 14px;
  }

  .account-tab-title {
    font-size: 18px;
  }

  .form-group {
    margin-bottom: 16px;
  }
}

/* ========================
   ADVANCED ANIMATIONS & EFFECTS
   ======================== */

/* 1. IMPROVED Add-to-Cart Animation */
.cart-animation-icon {
  position: fixed;
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
  animation: flyToCartImproved 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  border: 3px solid white;
}

.cart-animation-icon::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-ring 1s ease-out forwards;
}

.cart-animation-particles {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  z-index: 10000;
  pointer-events: none;
  animation: particle-explode 0.8s ease-out forwards;
}

.cart-animation-preview {
  position: fixed;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  overflow: hidden;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border: 2px solid white;
  animation: flyToCartPreview 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

@keyframes flyToCartImproved {
  0% {
    transform: scale(0.8) translate(0, 0) rotate(0deg);
    opacity: 1;
  }

  30% {
    transform: scale(1.3) translate(calc(var(--cart-x, 0) * 0.3), calc(var(--cart-y, 0) * 0.3)) rotate(180deg);
    opacity: 1;
  }

  70% {
    transform: scale(1.1) translate(calc(var(--cart-x, 0) * 0.7), calc(var(--cart-y, 0) * 0.7)) rotate(360deg);
    opacity: 1;
  }

  100% {
    transform: scale(0.2) translate(var(--cart-x, 0), var(--cart-y, 0)) rotate(540deg);
    opacity: 0;
  }
}

@keyframes flyToCartPreview {
  0% {
    transform: scale(1) translate(0, 0) rotate(0deg);
    opacity: 1;
  }

  50% {
    transform: scale(0.8) translate(calc(var(--cart-x, 0) * 0.5), calc(var(--cart-y, 0) * 0.5)) rotate(180deg);
    opacity: 0.8;
  }

  100% {
    transform: scale(0.3) translate(var(--cart-x, 0), var(--cart-y, 0)) rotate(360deg);
    opacity: 0;
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(2);
    opacity: 0;
  }
}

@keyframes particle-explode {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }

  100% {
    transform: translate(var(--particle-x, 0), var(--particle-y, 0)) scale(0);
    opacity: 0;
  }
}

/* 2. IMPROVED Loading Skeletons */
.skeleton {
  background: linear-gradient(90deg,
      var(--border) 0%,
      rgba(255, 255, 255, 0.8) 25%,
      rgba(255, 255, 255, 0.9) 50%,
      rgba(255, 255, 255, 0.8) 75%,
      var(--border) 100%);
  background-size: 200% 100%;
  animation: skeleton-loading-improved 1.8s ease-in-out infinite;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.6),
      transparent);
  animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

@keyframes skeleton-loading-improved {
  0% {
    background-position: 200% 0;
    opacity: 1;
  }

  50% {
    opacity: 0.8;
  }

  100% {
    background-position: -200% 0;
    opacity: 1;
  }
}

@keyframes skeleton-shimmer {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

.skeleton-product-card {
  height: 400px;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: skeleton-fade-in 0.3s ease-out;
}

@keyframes skeleton-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.skeleton-image {
  width: 100%;
  height: 200px;
  margin-bottom: 16px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 12px;
  border-radius: 8px;
  animation-delay: 0.1s;
}

.skeleton-text:nth-child(2) {
  animation-delay: 0.2s;
}

.skeleton-text:nth-child(3) {
  animation-delay: 0.3s;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-text.medium {
  width: 80%;
}

.skeleton-text.long {
  width: 100%;
}

.skeleton-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-button {
  height: 40px;
  width: 120px;
  border-radius: 8px;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gutter);
  margin-top: 24px;
}

.skeleton-card-variant {
  height: 350px;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-card-variant .skeleton-image {
  height: 180px;
  margin-bottom: 0;
  border-radius: var(--radius);
}

/* 3. IMPROVED Toast Notifications */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: min(420px, calc(100vw - 48px));
  width: auto;
  pointer-events: none;
  overflow: visible;
}

.toast {
  background: var(--card);
  color: var(--text);
  padding: 16px 20px;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 280px;
  max-width: min(400px, calc(100vw - 48px));
  width: auto;
  transform: translateX(450px) scale(0.9);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-right: 4px solid var(--primary);
  pointer-events: all;
  position: relative;
  overflow: visible;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.toast.show {
  transform: translateX(0) scale(1);
  opacity: 1;
}

.toast.success {
  border-right-color: var(--accent);
  background: linear-gradient(135deg, var(--card) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.toast.error {
  border-right-color: #EF4444;
  background: linear-gradient(135deg, var(--card) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.toast.warning {
  border-right-color: #F59E0B;
  background: linear-gradient(135deg, var(--card) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.toast.info {
  border-right-color: var(--primary);
  background: linear-gradient(135deg, var(--card) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.toast-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  animation: toast-icon-bounce 0.5s ease-out;
}

.toast.success .toast-icon {
  background: rgba(16, 185, 129, 0.1);
}

.toast.error .toast-icon {
  background: rgba(239, 68, 68, 0.1);
}

.toast.warning .toast-icon {
  background: rgba(245, 158, 11, 0.1);
}

.toast.info .toast-icon {
  background: rgba(99, 102, 241, 0.1);
}

@keyframes toast-icon-bounce {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 15px;
  color: var(--text);
}

.toast-message {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.toast-close {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.toast-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  width: 100%;
  transform-origin: left;
  animation: toast-progress linear forwards;
}

.toast.success .toast-progress {
  background: var(--accent);
}

.toast.error .toast-progress {
  background: #EF4444;
}

.toast.warning .toast-progress {
  background: #F59E0B;
}

@keyframes toast-progress {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

.toast-action {
  margin-top: 8px;
  padding: 6px 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toast-action:hover {
  background: #4F46E5;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .toast-container {
    right: 16px;
    top: 16px;
    left: 16px;
    width: auto;
    max-width: calc(100vw - 32px);
    overflow: visible;
  }

  .toast {
    min-width: auto;
    max-width: calc(100vw - 32px);
    width: 100%;
    transform: translateX(100%) scale(0.9);
  }

  .toast.show {
    transform: translateX(0) scale(1);
  }
}

/* 4. Page Transition Animations */
.page-transition {
  animation: pageFadeIn 0.4s ease-out;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 5. Loading Spinners */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
  margin: 0;
}

.spinner-lg {
  width: 60px;
  height: 60px;
  border-width: 6px;
}

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

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

/* 6. Success Checkmark Animation */
.checkmark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: block;
  stroke-width: 3;
  stroke: var(--accent);
  stroke-miterlimit: 10;
  margin: 0 auto;
  box-shadow: inset 0px 0px 0px var(--accent);
  animation: checkmark-fill 0.4s ease-in-out 0.4s forwards,
    checkmark-scale 0.3s ease-in-out 0.9s both;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 3;
  stroke-miterlimit: 10;
  stroke: var(--accent);
  fill: none;
  animation: checkmark-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: checkmark-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes checkmark-stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes checkmark-fill {
  100% {
    box-shadow: inset 0px 0px 0px 30px var(--accent);
  }
}

@keyframes checkmark-scale {

  0%,
  100% {
    transform: none;
  }

  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

/* 7. Mobile Gestures - Swipe Indicators */
.swipe-indicator {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  opacity: 0.6;
}

.swipe-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: swipe-pulse 1.5s ease-in-out infinite;
}

.swipe-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.swipe-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes swipe-pulse {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* 8. Touch-Friendly Buttons */
@media (max-width: 768px) {

  .btn,
  .carousel-btn,
  button:not(.promo-banner-dot) {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }

  .btn:active,
  button:active {
    transform: scale(0.95);
    transition: transform 0.1s;
  }
}

/* 9. Pull-to-Refresh */
.pull-to-refresh {
  position: fixed;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 1000;
  transition: top 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
}

.pull-to-refresh.active {
  top: 0;
}

.pull-to-refresh-icon {
  animation: spin 1s linear infinite;
}

/* 10. Bottom Sheet Modal */
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 90vh;
  overflow-y: auto;
}

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

.bottom-sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto;
}

.bottom-sheet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.bottom-sheet-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* 11. Confetti Animation */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10001;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--primary);
  animation: confetti-fall linear forwards;
}

.confetti:nth-child(odd) {
  background: var(--accent);
}

.confetti:nth-child(3n) {
  background: #F59E0B;
}

.confetti:nth-child(4n) {
  background: #EF4444;
}

.confetti:nth-child(5n) {
  background: #8B5CF6;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* 12. Gradient Animations */
.animated-gradient {
  background: linear-gradient(-45deg,
      var(--primary),
      var(--accent),
      #8B5CF6,
      var(--primary));
  background-size: 400% 400%;
  animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.gradient-text {
  background: linear-gradient(135deg,
      var(--primary),
      var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-text-shift 3s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradient-text-shift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* 13. Glassmorphism Effects */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .glass {
  background: rgba(21, 24, 33, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-modal {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .glass-modal {
  background: rgba(21, 24, 33, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Ripple Effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
  width: 300px;
  height: 300px;
}

/* Button Hover Lift Effect */
.btn-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--hover-shadow);
}

.btn-lift:active {
  transform: translateY(0);
}

/* Product Card Hover Effects */
.product-card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card-hover:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--hover-shadow);
}