/**
 * Global Stylesheet for WizardXXX Store v3
 * أنماط عامة للمتجر
 * Enhanced with comprehensive animations and modern design system
 */

/* ==================== BASE STYLES ==================== */
body {
  @apply bg-gray-900 text-gray-200 font-sans antialiased;
  font-family: "Inter", sans-serif;
}
.hidden {
  display: none !important;
}
/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #1f2937;
}
::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 4px;
  transition: background 0.3s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: #01d676;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  @apply font-bold text-white;
}

/* Links */
a {
  @apply text-primary hover:text-primary/90 transition-all duration-200;
}

/* ==================== ANIMATION KEYFRAMES ==================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

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

@keyframes bounce-subtle {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* ==================== BUTTON STYLES ==================== */
/* Base button styles - applies to ALL buttons with .btn class */
.btn,
button.btn,
a.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1 !important;
  visibility: visible !important;
  position: relative;
  overflow: hidden;
  outline: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn::before,
button.btn::before,
a.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before,
button.btn:active::before,
a.btn:active::before {
  width: 300px;
  height: 300px;
}

/* Primary button - GRAY default, GREEN on hover (like filter buttons) */
/* *** NOTE: !important used here to override Tailwind utility classes applied dynamically *** */
.btn-primary,
button.btn-primary,
a.btn-primary,
.add-to-cart-button {
  background-color: #374151 !important;
  color: #ffffff !important;
  opacity: 1 !important;
  visibility: visible !important;
  box-shadow: none;
  transform: translateY(0) scale(1);
}

.btn-primary:hover,
button.btn-primary:hover,
a.btn-primary:hover,
.add-to-cart-button:hover {
  background-color: #01d676 !important;
  color: #111827 !important;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 15px -3px rgba(1, 214, 118, 0.4),
    0 4px 6px -2px rgba(1, 214, 118, 0.3);
}

.btn-primary:active,
button.btn-primary:active,
a.btn-primary:active,
.add-to-cart-button:active {
  transform: translateY(0) scale(1);
  background-color: #01d676 !important;
  color: #111827 !important;
}

/* Secondary button - GRAY (for Previous, Back, etc.) */
.btn-secondary,
button.btn-secondary,
a.btn-secondary {
  background-color: #374151 !important;
  color: #ffffff !important;
  opacity: 1 !important;
  visibility: visible !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover,
button.btn-secondary:hover,
a.btn-secondary:hover {
  background-color: #4b5563 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* Danger button - RED */
.btn-danger,
button.btn-danger,
a.btn-danger {
  background-color: #dc2626 !important;
  color: #ffffff !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.btn-danger:hover,
button.btn-danger:hover,
a.btn-danger:hover {
  background-color: #b91c1c !important;
  transform: translateY(-2px);
}

/* Disabled state */
.btn:disabled,
button.btn:disabled,
a.btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  transform: none !important;
  pointer-events: none;
}

/* Ensure focus states work */
.btn:focus,
button.btn:focus,
a.btn:focus {
  outline: 2px solid #01d676;
  outline-offset: 2px;
}

/* ==================== FORM STYLES ==================== */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="file"],
textarea,
select {
  @apply block w-full bg-gray-700 border border-gray-600 rounded-md px-4 py-2.5 text-white placeholder-gray-400 transition-all duration-200;
  @apply focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary focus:bg-gray-600;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="number"]:hover,
input[type="password"]:hover,
textarea:hover,
select:hover {
  @apply border-gray-500;
}

input::placeholder {
  @apply text-gray-400;
}

/* File input styling */
input[type="file"] {
  @apply py-2;
}

input[type="file"]::file-selector-button {
  @apply bg-gray-600 text-white px-4 py-2 rounded-md mr-4 border-0 cursor-pointer transition-all duration-200;
}

input[type="file"]::file-selector-button:hover {
  @apply bg-primary text-gray-900;
}

/* --- Splash Screen Styles --- */
#custom-splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw; /* Use viewport units */
  height: 100vh;
  background: #000000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000; /* Ensure it's on top */
  opacity: 1;
  transition: opacity 0.5s ease-out; /* Fade out effect */
}
#custom-splash.fade-out {
  opacity: 0;
  pointer-events: none; /* Allow clicks to pass through after fade */
}
#custom-splash video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Fill the screen */
}

/* --- Global Loading Overlay --- */
#global-loading-overlay {
  /* Using Tailwind classes in HTML, but this is a fallback if needed */
  /* z-index: 9999; */
}

/* --- Loading Skeletons --- */
/* *** FIXED: Removed duplicate @keyframes pulse (already defined above at line 107) *** */
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.skeleton-box {
  @apply bg-gray-700 rounded-md animate-pulse;
}
.skeleton-text {
  @apply h-4 bg-gray-700 rounded-md animate-pulse;
}

/* ==================== PRODUCT CARD STYLES ==================== */
.product-card {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.4s ease-out;
  animation: fadeIn 0.5s ease-out;
}

/* Hide price toggle button on desktop - only show on mobile */
.price-toggle-btn {
  display: none !important;
}

.product-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.25),
    0 6px 8px -3px rgba(0, 0, 0, 0.15);
}

.product-card:hover .add-to-cart-button {
  animation: bounce-subtle 0.6s ease-in-out;
}

.product-card img {
  transition: transform 0.5s ease, opacity 0.3s ease;
}

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

/* ==================== CART MODAL STYLES ==================== */
.cart-modal {
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease-out;
}

.cart-modal-content {
  animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-item-dynamic {
  animation: slideInLeft 0.3s ease-out;
}

/* Cart Remove Button */
.cart-remove-item {
  transition: all 0.2s ease;
}

.cart-remove-item:hover {
  transform: scale(1.1);
}

/* ==================== CATEGORY FILTER BUTTONS ==================== */
.category-filter-button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.category-filter-button::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #01d676;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.category-filter-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.category-filter-button.active {
  background-color: #01d676 !important;
  color: #111827 !important;
  box-shadow: 0 4px 12px rgba(1, 214, 118, 0.4);
}

.category-filter-button.active::after {
  width: 100%;
}

/* ==================== LANGUAGE SWITCHER STYLES ==================== */
.lang-btn {
  @apply px-3 py-1.5 rounded-md text-sm font-medium transition-all duration-200 border border-transparent flex items-center gap-1.5;
}

.lang-btn .flag {
  font-size: 1.1em;
  transition: transform 0.2s ease;
}

.lang-btn:hover .flag {
  transform: scale(1.2);
}

.lang-btn:not(.active) {
  @apply bg-gray-700 text-gray-300;
}

.lang-btn:not(.active):hover {
  @apply bg-gray-600 border-gray-500;
  transform: translateY(-2px);
}

.lang-btn.active {
  @apply bg-primary text-gray-900 font-bold border-primary cursor-default;
  box-shadow: 0 4px 8px rgba(1, 214, 118, 0.3);
}

/* ==================== CHECKOUT STEPPER STYLES ==================== */
.checkout-step {
  position: relative;
  transition: all 0.3s ease;
}

.checkout-step .step-circle {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkout-step .step-title {
  transition: all 0.3s ease;
  color: #9ca3af !important;
}

.checkout-step.active .step-circle {
  background-color: #01d676 !important;
  color: #111827 !important;
  border-color: #01d676 !important;
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(1, 214, 118, 0.2);
}

.checkout-step.active .step-title {
  color: #01d676 !important;
  font-weight: 600;
}

.checkout-step.completed .step-circle {
  background-color: #01d676 !important;
  color: #111827 !important;
  border-color: #01d676 !important;
  cursor: pointer;
}

.checkout-step.completed .step-title {
  color: #ffffff !important;
}

.checkout-step.completed .step-circle:hover {
  transform: scale(1.1);
}

/* Line connecting steps */
.checkout-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.25rem;
  height: 2px;
  background-color: #4b5563;
  z-index: 1;
  transition: background-color 0.3s ease;
}

[dir="rtl"] .checkout-step:not(:last-child)::after {
  right: calc(50% + 1.25rem);
  width: calc(100% - 2.5rem);
  transform: none;
}

[dir="ltr"] .checkout-step:not(:last-child)::after {
  left: calc(50% + 1.25rem);
  width: calc(100% - 2.5rem);
  transform: none;
}

.checkout-step.completed::after {
  background-color: #01d676;
}

.checkout-step.active::after {
  /* تم التعديل: الاتجاه الافتراضي (LTR) يجب أن يكون إلى اليمين */
  background: linear-gradient(to right, #01d676, #4b5563);
}

[dir="rtl"] .checkout-step.active::after {
  /* تم التعديل: اتجاه RTL يجب أن يكون إلى اليسار */
  background: linear-gradient(to left, #01d676, #4b5563);
}

/* ==================== PAYMENT METHOD STYLES ==================== */
.payment-method-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  border: 2px solid transparent;
}

.payment-method-item:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  border-color: #4b5563;
}

.payment-method-item.selected {
  border-color: #01d676 !important;
  background-color: rgba(1, 214, 118, 0.1);
  box-shadow: 0 0 0 3px rgba(1, 214, 118, 0.2);
}

.payment-method-item img {
  transition: transform 0.3s ease;
}

.payment-method-item:hover img {
  transform: scale(1.1);
}

/* Tooltip Styles */
.tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 8px 12px;
  background: #1f2937;
  color: white;
  font-size: 0.875rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1f2937;
}

.payment-method-item:hover .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-12px);
}

/* ==================== UTILITIES ==================== */
.scrollbar-thin {
  scrollbar-width: thin;
  scrollbar-color: #4b5563 #1f2937;
}

.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

.slide-in-up {
  animation: slideInUp 0.5s ease-out forwards;
}

.slide-in-left {
  animation: slideInLeft 0.5s ease-out forwards;
}

.slide-in-right {
  animation: slideInRight 0.5s ease-out forwards;
}

.scale-in {
  animation: scaleIn 0.3s ease-out forwards;
}

/* Page Load Animation */
main {
  animation: fadeIn 0.6s ease-out;
}

/* Section Animation Classes */
section {
  animation: slideInUp 0.6s ease-out;
}

/* Stagger animation delays for grid items */
.product-card:nth-child(1) {
  animation-delay: 0.05s;
}
.product-card:nth-child(2) {
  animation-delay: 0.1s;
}
.product-card:nth-child(3) {
  animation-delay: 0.15s;
}
.product-card:nth-child(4) {
  animation-delay: 0.2s;
}
.product-card:nth-child(5) {
  animation-delay: 0.25s;
}
.product-card:nth-child(6) {
  animation-delay: 0.3s;
}
.product-card:nth-child(7) {
  animation-delay: 0.35s;
}
.product-card:nth-child(8) {
  animation-delay: 0.4s;
}

/* ==================== MOBILE MENU STYLES (NEW) ==================== */
.mobile-menu-panel {
  /* A panel that slides down from the header */
  max-height: 0;
  overflow: hidden;
  /* Use max-height for CSS transition */
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out,
    visibility 0.3s ease-out;
  opacity: 0;
  visibility: hidden;
  border-top: 1px solid #374151; /* gray-600 */
}

/* This class will be toggled by JS to show the menu */
.mobile-menu-panel.is-open {
  max-height: 50vh; /* Set a reasonable max height */
  opacity: 1;
  visibility: visible;
}

/* Style for the active link in the mobile menu */
.mobile-nav-link.active-nav-link {
  @apply bg-gray-700 text-primary font-semibold;
}

/* ==================== MOBILE-SPECIFIC STYLES ==================== */

/* Mobile: Hide hero thumbnails and adjust hero section */
@media (max-width: 1023px) {
  /* Hide the thumbnails column on mobile */
  .hero-thumbnails-vertical {
    display: none !important;
  }

  /* Make hero main content full width with better vertical space */
  .hero-main-content {
    width: 100% !important;
    aspect-ratio: 3 / 4 !important; /* Taller aspect ratio for mobile */
    min-height: 500px; /* Ensure minimum height */
  }

  /* Make hero section vertically clear */
  .hero-layout-container {
    flex-direction: column !important;
    gap: 0 !important;
  }

  /* Adjust overlay padding to ensure button is visible */
  .hero-overlay {
    padding: 1.5rem 1rem 2rem 1rem !important;
    justify-content: flex-end !important;
  }

  /* Make sure the button is fully visible and clear */
  #hero-overlay-button {
    margin-top: 0.5rem;
    width: 100%;
    max-width: 200px;
  }

  /* Adjust text sizes for mobile */
  #hero-overlay-title {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
  }

  #hero-overlay-desc {
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.75rem !important;
  }

  #hero-overlay-logo {
    width: 4rem !important;
    margin-bottom: 0.5rem !important;
  }
}

/* Mobile: Show only 2 products at a time in carousels */
@media (max-width: 767px) {
  .carousel {
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }

  .carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }

  .product-card {
    scroll-snap-align: start;
    width: calc(50% - 10px) !important;
    min-width: calc(50% - 10px) !important;
    flex-shrink: 0;
  }
}

/* Mobile: Product card redesign - Creative & Attractive */
@media (max-width: 767px) {
  #related-products-grid .product-card {
    width: 100% !important;
  }
  .product-card {
    position: relative;
    border-radius: 1rem !important;
    overflow: visible !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  /* Image container with rounded top */
  .product-card > a {
    border-radius: 1rem 1rem 0 0 !important;
    overflow: hidden;
  }

  /* Content container styling */
  .product-card .p-4 {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.875rem 0.75rem 1rem 0.75rem !important;
    background: linear-gradient(to bottom, #1f2937, #111827);
  }

  /* Product title - smaller and elegant, above button */
  .product-card h4 {
    order: 1;
    width: 100%;
    text-align: center !important;
    margin-bottom: 0.875rem !important; /* More spacing below title */
    font-size: 0.8125rem !important; /* ~13px */
    font-weight: 600 !important;
    line-height: 1.3 !important;
    max-height: 2.6rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  /* Hide subtitle on mobile */
  .product-card .text-xs.text-gray-400 {
    display: none;
  }

  /* Hide default price display */
  .product-card .flex.justify-between {
    width: 100%;
    justify-content: center !important;
    position: relative;
    order: 2;
  }

  .product-card .text-lg.font-bold.text-primary {
    display: none;
  }

  /* Add to Cart button - floating pill style */
  .product-card .add-to-cart-button {
    order: 3;
    width: 90%;
    text-align: center;
    margin-top: 0.75rem !important; /* More spacing above button */
    padding: 0.5rem 1rem !important;
    font-size: 0.75rem !important; /* ~12px */
    font-weight: 700 !important;
    border-radius: 1.5rem !important;
    box-shadow: 0 2px 8px rgba(1, 214, 118, 0.3);
    transition: all 0.2s ease;
  }

  .product-card .add-to-cart-button:active {
    transform: scale(0.95);
  }

  /* Price overlay - elegant blur with animation */
  .product-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: none;
    border-radius: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .product-card.show-price::after {
    display: flex;
    animation: fadeInPrice 0.2s ease forwards;
  }

  @keyframes fadeInPrice {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  /* Price display styling - prominent and clear (using a data attribute approach) */
  .product-card.show-price .price-display {
    content: attr(data-price);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #01d676;
    font-size: 1.75rem;
    font-weight: 900;
    z-index: 11;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(1, 214, 118, 0.5);
    letter-spacing: 0.02em;
    display: block;
  }

  /* Create price display element */
  .product-card::before {
    content: attr(data-price);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #01d676;
    font-size: 1.4rem;
    font-weight: 700;
    z-index: 11;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(1, 214, 118, 0.5);
    letter-spacing: 0.02em;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .product-card.show-price::before {
    opacity: 1;
  }

  /* Price toggle button styling for mobile */
  .price-toggle-btn {
    display: flex !important; /* Show on mobile */
    animation: fadeIn 0.3s ease-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  .price-toggle-btn:active {
    transform: scale(0.9);
    background-color: rgba(17, 24, 39, 0.95) !important;
  }

  /* Semi-transparent when price is showing */
  .product-card.show-price .price-toggle-btn {
    opacity: 0.5;
    background-color: rgba(1, 214, 118, 0.3) !important;
    border-color: rgb(1, 214, 118) !important;
  }
}

/* Global mobile font size adjustments */
@media (max-width: 767px) {
  /* Base body text */
  body {
    font-size: 14px !important;
  }

  /* Headings */
  h1 {
    font-size: 1.5rem !important;
  }

  h2 {
    font-size: 1.25rem !important;
  }

  h3 {
    font-size: 1.125rem !important;
  }

  h4 {
    font-size: 1rem !important;
  }

  /* Navigation */
  .nav-link {
    font-size: 0.875rem !important;
  }

  /* Buttons */
  .btn {
    font-size: 0.875rem !important;
    padding: 0.625rem 1.25rem !important;
  }

  /* Category filters */
  .category-filter-button {
    font-size: 0.75rem !important;
    padding: 0.5rem 0.875rem !important;
  }

  /* Cart modal */
  .cart-item-dynamic p {
    font-size: 0.8125rem !important;
  }

  .cart-item-dynamic .text-xs {
    font-size: 0.6875rem !important;
  }

  /* Carousel section titles */
  .carousel-section h3 {
    font-size: 1.125rem !important;
  }

  /* View All link */
  .carousel-section a[href*="products"] {
    font-size: 0.75rem !important;
  }

  /* Carousel navigation buttons - Hidden on mobile, touch only */
  .carousel-nav {
    display: none !important;
  }

  .carousel-nav svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
  }

  /* Header elements */
  header .text-xl {
    font-size: 1.125rem !important;
  }

  /* Footer text */
  footer {
    font-size: 0.75rem !important;
  }

  /* Form inputs */
  input,
  textarea,
  select {
    font-size: 0.875rem !important;
  }

  /* Product grid on products page - 2 columns vertical grid */
  #products-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
    overflow-x: visible !important;
    padding-bottom: 1rem;
  }

  #carousel-courses .product-card {
    min-width: calc(50% - 0.5rem) !important;
    max-width: calc(50% - 0.5rem) !important;
    scroll-snap-align: start;
    flex-shrink: 0;
  }

  #products-grid .product-card {
    width: 100% !important;
    min-width: unset !important;
    max-width: unset !important;
  }

  #products-grid .product-card h4 {
    font-size: 0.8125rem !important;
  }

  /* Hide skeleton loaders on mobile after content loads */
  #products-grid .product-card-skeleton {
    display: none !important;
  }

  /* Products page section styling to match homepage */
  #products-page-title {
    font-size: 1.125rem !important;
    margin-bottom: 1rem !important;
  }

  /* Category filters section on products page */
  section .mb-8 {
    margin-bottom: 1.5rem !important;
  }

  section h2 {
    font-size: 1rem !important;
    margin-bottom: 0.75rem !important;
  }

  /* Category filters on products page */
  #categories-filter-container {
    margin-bottom: 1.5rem !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
  }

  #categories-filter-container::-webkit-scrollbar {
    display: none;
  }

  #categories-filter-container .category-filter-button {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Remove the skeleton loader wrapper on mobile */
  #categories-filter-container .animate-pulse {
    display: none !important;
  }

  /* Checkout page */
  .checkout-step .step-title {
    font-size: 0.75rem !important;
  }

  /* Price displays */
  [data-i18n-currency] {
    font-size: inherit !important;
  }

  /* Make containers more compact on mobile */
  .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  main {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
}

/* Touch scrolling for carousels */
.carousel-container {
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

/* Enable touch scrolling globally */
* {
  -webkit-overflow-scrolling: touch;
}
