/*
Theme Name: Valentine Gallery Child
Theme URI: https://example.com
Description: قالب فرزند گالری جواهری ولنتاین با پشتیبانی کامل RTL و فارسی
Author: Valentine Gallery
Author URI: https://example.com
Template: astra
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: valentine-child
*/

/* Import beautiful Google Fonts with optimized loading - Using Vazirmatn (best Persian font) and Lalezar */
@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700&family=Lalezar&display=swap");

/* Updated color palette to dark teal background throughout */
:root {
  /* Dark teal background - matching user's color preference */
  --background: 180 60% 15%; /* Dark teal background (#0d4d4d) */
  --foreground: 220 10% 95%;
  --primary: 340 80% 55%;
  --primary-foreground: 340 50% 98%;
  --secondary: 140 15% 85%; /* Silver/gray for product backgrounds */
  --secondary-foreground: 220 15% 15%;
  --accent: 350 85% 60%;
  --accent-foreground: 350 30% 98%;
  /* Updated muted colors to work with dark teal background */
  --muted: 180 50% 12%; /* Darker muted teal */
  --muted-foreground: 220 10% 70%;
  --border: 180 40% 20%; /* Teal border for visibility */
  --input: 180 40% 18%;
  --ring: 340 80% 60%;
  --radius: 0.5rem;

  /* Added Persian/Achaemenid design variables */
  --persian-gold: 45 100% 50%;
  --persian-turquoise: 180 60% 50%;

  /* Added product grid variable for mobile */
  --products-per-row-mobile: 3;
  --products-per-row-desktop: 6;
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Vazirmatn", "Inter", sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  direction: rtl;
  text-align: right;
  line-height: 1.6;
  /* Added Persian pattern background */
  background-image: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 35px,
      hsla(var(--persian-gold), 0.03) 35px,
      hsla(var(--persian-gold), 0.03) 70px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 35px,
      hsla(var(--persian-turquoise), 0.02) 35px,
      hsla(var(--persian-turquoise), 0.02) 70px
    );
  background-attachment: fixed;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Playfair Display", "Lalezar", serif;
  font-weight: 600;
  line-height: 1.2;
}

a {
  color: hsl(var(--primary));
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: hsl(var(--accent));
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  z-index: 50;
  width: 100%;
  height: 4rem;
  background-color: hsl(180, 60%, 15%); /* Dark teal to match body */
  backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
  box-shadow: 0 2px 0 hsla(var(--persian-gold), 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1rem;
}

.header-section {
  display: flex;
  align-items: center;
}

.header-left {
  flex: 1;
  justify-content: flex-start;
}

.header-right {
  flex: 0;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Updated site title styles - larger, bolder, with Lalezar font */
.site-title-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-title-text {
  font-family: "Lalezar", cursive;
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--primary));
  white-space: nowrap;
  transition: color 0.3s ease;
  text-shadow: 0 2px 8px hsla(var(--persian-gold), 0.4);
}

.site-title-link:hover .site-title-text {
  color: hsl(var(--accent));
  text-shadow: 0 2px 12px hsla(var(--persian-gold), 0.6);
}

/* Removed old site-logo styles as they're no longer needed */
.site-logo {
  display: none;
}

.site-logo svg {
  display: none;
}

.header-icon-btn {
  background: none;
  border: none;
  color: hsl(var(--foreground));
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.3s ease;
  position: relative;
}

.header-icon-btn:hover {
  color: hsl(var(--primary));
}

.header-icon-btn svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Added cart count badge styling */
.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background: hsl(var(--primary));
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 50%;
  min-width: 1.2rem;
  text-align: center;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background-color: hsl(180, 55%, 16%); /* Solid dark teal */
  transition: right 0.3s ease;
  z-index: 100;
  padding: 2rem;
  /* Added Persian pattern to mobile menu */
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    hsla(var(--persian-gold), 0.05) 20px,
    hsla(var(--persian-gold), 0.05) 40px
  );
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-close {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: none;
  border: none;
  color: hsl(var(--foreground));
  cursor: pointer;
  font-size: 1.5rem;
}

.mobile-menu nav ul {
  list-style: none;
  margin-top: 3rem;
}

.mobile-menu nav ul li {
  margin-bottom: 1.5rem;
}

.mobile-menu nav ul li a {
  color: hsl(var(--foreground));
  font-size: 1.125rem;
}

/* Ticker Bars */
.ticker-container {
  position: fixed;
  top: 4rem;
  z-index: 40;
  width: 100%;
}

.price-ticker {
  height: 2.5rem;
  background-color: hsl(180, 55%, 16%); /* Solid dark teal, no transparency */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  font-size: 0.875rem;
  border-bottom: 1px solid hsla(var(--persian-gold), 0.2);
}

.price-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s ease;
}

.price-item:hover {
  transform: scale(1.05);
}

.price-label {
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}

.price-value {
  color: hsl(var(--primary));
  font-weight: 700;
  font-family: "Inter", monospace;
}

.price-change {
  font-size: 0.75rem;
  margin-right: 0.25rem;
}

.price-change.up {
  color: #10b981;
}

.price-change.down {
  color: #ef4444;
}

.blog-ticker {
  height: 2rem;
  background-color: hsl(180, 55%, 14%); /* Solid dark teal, no transparency */
  overflow: hidden;
  display: flex;
  align-items: center;
  border-bottom: 1px solid hsla(var(--persian-turquoise), 0.2);
}

/* Restored blog ticker auto-scroll animation */
.blog-ticker-content {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: scroll-rtl 30s linear infinite;
}

.blog-ticker-item {
  padding: 0 2rem;
  color: hsl(var(--foreground));
  transition: color 0.3s ease;
}

.blog-ticker-item:hover {
  color: hsl(var(--primary));
}

@keyframes scroll-rtl {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Main Content Spacing */
main {
  /* Adjusted padding to eliminate white space */
  padding-top: 6.5rem;
  margin-top: 0 !important;
}

/* Section Separator */
.section-separator {
  display: none !important;
}

/* Removed all story section styles since stories are completely removed */

/* Hero Section */
.hero-section {
  position: relative;
  height: 70vh;
  overflow: hidden;
  margin-bottom: 0 !important;
  margin-top: 0 !important;
  border-bottom: 3px solid hsla(var(--persian-gold), 0.3);
}

.hero-background {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* Added media queries to show desktop image on desktop and mobile image on mobile */
.hero-background-desktop {
  display: block;
}

.hero-background-mobile {
  display: none;
}

@media (max-width: 768px) {
  .hero-background-desktop {
    display: none;
  }

  .hero-background-mobile {
    display: block;
  }
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: puzzleReveal 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transform-origin: center;
}

@keyframes puzzleReveal {
  0% {
    clip-path: polygon(0% 0%, 25% 0%, 25% 25%, 0% 25%, 0% 0%, 25% 0%, 25% 25%, 0% 25%);
    opacity: 0;
    transform: scale(1.1);
  }
  25% {
    clip-path: polygon(0% 0%, 50% 0%, 50% 50%, 0% 50%, 0% 0%, 50% 0%, 50% 50%, 0% 50%);
    opacity: 0.5;
  }
  50% {
    clip-path: polygon(0% 0%, 75% 0%, 75% 75%, 0% 75%, 0% 0%, 75% 0%, 75% 75%, 0% 75%);
    opacity: 0.75;
  }
  100% {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .hero-background img {
    animation: fadeInScale 1.5s ease-out forwards;
  }

  @keyframes fadeInScale {
    0% {
      opacity: 0;
      transform: scale(1.05);
    }
    100% {
      opacity: 1;
      transform: scale(1);
    }
  }
}

.hero-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 2rem 2rem 4rem 2rem;
  animation: fadeInUp 1s ease-out 0.5s both;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
}

.hero-headline {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 4px 20px rgba(0, 0, 0, 0.6);
  font-weight: 700;
}

.hero-subheadline {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.btn-primary {
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 100%);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Products Section */
.products-section {
  padding: 1.5rem 0;
  background-color: hsl(180, 58%, 15%); /* Solid dark teal, no transparency */
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 50px,
    hsla(var(--persian-gold), 0.02) 50px,
    hsla(var(--persian-gold), 0.02) 51px
  );
}

/* Hide all swiper pagination globally for products section */
.products-section .swiper-pagination,
#productGrid .swiper-pagination,
.product-grid .swiper-pagination {
  display: none !important;
}

/* Force product-grid to ALWAYS be grid, override all Swiper CSS */
.product-grid,
#productGrid,
.product-grid.swiper,
#productGrid.swiper,
div.product-grid,
div#productGrid {
  display: grid !important;
  flex-direction: unset !important;
  flex-wrap: unset !important;
}

.product-grid .swiper-wrapper,
#productGrid .swiper-wrapper {
  display: contents !important;
}

.product-grid .swiper-slide,
#productGrid .swiper-slide {
  width: 100% !important;
  margin: 0 !important;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  color: hsl(var(--primary));
  text-shadow: 0 2px 10px hsla(var(--persian-gold), 0.3);
}

/* Improved category filter buttons - mobile: 4 buttons per row with horizontal scroll, desktop: horizontal rectangle with image left and title right */
.product-filters {
  display: flex !important;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: nowrap !important;
  padding: 1rem 0;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.product-filters::-webkit-scrollbar {
  height: 8px;
}

.product-filters::-webkit-scrollbar-track {
  background: hsla(180, 30%, 15%, 0.5);
  border-radius: 4px;
}

.product-filters::-webkit-scrollbar-thumb {
  background: hsl(var(--primary));
  border-radius: 4px;
}

.product-filters::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--accent));
}

/* Mobile: Vertical cards with image on top, title below - 4 per row */
.filter-btn,
.product-filters .filter-btn,
.products-section .filter-btn {
  background: linear-gradient(135deg, hsla(180, 40%, 18%, 0.95) 0%, hsla(180, 40%, 14%, 0.95) 100%);
  color: white;
  padding: 0 !important;
  border: 3px solid hsla(var(--persian-gold), 0.4);
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  min-width: calc((100vw - 3rem) / 4) !important;
  max-width: calc((100vw - 3rem) / 4) !important;
  flex-shrink: 0 !important;
  font-size: 0.85rem !important;
  line-height: 1.3;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 1px 0 hsla(var(--persian-gold), 0.2);
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(8px);
}

/* Persian pattern on button */
.filter-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 15px,
      hsla(var(--persian-gold), 0.05) 15px,
      hsla(var(--persian-gold), 0.05) 30px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 15px,
      hsla(var(--persian-turquoise), 0.03) 15px,
      hsla(var(--persian-turquoise), 0.03) 30px
    );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.filter-btn:hover::before {
  opacity: 1;
}

.filter-btn-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  /* Changed to relative positioning to contain absolute images */
  display: block;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, hsla(var(--persian-gold), 0.1) 0%, hsla(var(--persian-turquoise), 0.05) 100%);
  z-index: 1;
}

.filter-btn-image img {
  /* Made images fill container completely with absolute positioning */
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn-image svg {
  /* Kept SVG icons centered with absolute positioning */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2.5rem !important;
  height: 2.5rem !important;
  color: hsl(var(--persian-gold));
  filter: drop-shadow(0 2px 8px hsla(var(--persian-gold), 0.5));
  transition: all 0.4s ease;
}

.filter-btn-title {
  padding: 0.75rem 0.5rem;
  font-family: "Vazirmatn", "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.85rem !important;
  text-align: center;
  background: linear-gradient(180deg, hsla(180, 40%, 12%, 0.8) 0%, hsla(180, 40%, 10%, 0.9) 100%);
  border-top: 2px solid hsla(var(--persian-gold), 0.3);
  position: relative;
  z-index: 1;
  line-height: 1.4;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-btn:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: hsla(var(--persian-gold), 0.7);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 40px hsla(var(--persian-gold), 0.3);
}

.filter-btn:hover .filter-btn-image img {
  transform: scale(1.1);
}

.filter-btn:hover .filter-btn-image svg {
  transform: scale(1.15) rotate(5deg);
  filter: drop-shadow(0 4px 12px hsla(var(--persian-gold), 0.7));
}

.filter-btn:hover .filter-btn-title {
  color: hsl(var(--persian-gold));
  text-shadow: 0 2px 8px hsla(var(--persian-gold), 0.6);
}

.filter-btn.active {
  border-color: hsla(var(--persian-turquoise), 0.8);
  background: linear-gradient(135deg, hsla(180, 60%, 25%, 0.95) 0%, hsla(180, 60%, 20%, 0.95) 100%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 30px hsla(var(--persian-turquoise), 0.5);
  transform: translateY(-3px);
}

.filter-btn.active .filter-btn-title {
  color: hsl(var(--persian-turquoise));
  text-shadow: 0 2px 8px hsla(var(--persian-turquoise), 0.6);
  background: linear-gradient(180deg, hsla(180, 60%, 18%, 0.9) 0%, hsla(180, 60%, 15%, 0.95) 100%);
  border-top-color: hsla(var(--persian-turquoise), 0.5);
}

.filter-btn.active .filter-btn-image svg {
  color: hsl(var(--persian-turquoise));
  filter: drop-shadow(0 2px 8px hsla(var(--persian-turquoise), 0.6));
}

/* Desktop and TV: Vertical card design with circular image on top, title below (like the provided image) */
@media (min-width: 769px) {
  .product-filters {
    justify-content: center;
    flex-wrap: wrap !important;
    overflow-x: visible !important;
  }

  /* Doubled button size to 880px for desktop */
  .filter-btn,
  .product-filters .filter-btn,
  .products-section .filter-btn {
    flex-direction: column !important;
    min-width: 880px !important;
    max-width: 880px !important;
    padding: 0 !important;
    gap: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .filter-btn::before {
    display: none !important;
  }

  .filter-btn-image {
    width: 100% !important;
    height: auto !important;
    min-width: auto !important;
    aspect-ratio: 1 / 1 !important;
    /* Added rounded corners to image */
    border-radius: 1.5rem !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    position: relative !important;
    background: linear-gradient(135deg, hsla(var(--persian-gold), 0.1) 0%, hsla(var(--persian-turquoise), 0.05) 100%) !important;
    border: 3px solid hsla(var(--persian-gold), 0.4) !important;
    overflow: hidden !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .filter-btn-image svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6rem !important;
    height: 6rem !important;
    color: hsl(var(--persian-gold)) !important;
    filter: drop-shadow(0 2px 8px hsla(var(--persian-gold), 0.5)) !important;
  }

  .filter-btn-image img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    border-radius: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
  }

  .filter-btn-title {
    flex: none;
    padding: 1rem 0.75rem !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: white !important;
    background: transparent !important;
    border: none !important;
    min-height: auto;
    text-align: center;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  }

  .filter-btn:hover .filter-btn-image {
    transform: translateY(-5px) !important;
    border-color: hsla(var(--persian-gold), 0.7) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 40px hsla(var(--persian-gold), 0.3) !important;
  }

  .filter-btn:hover .filter-btn-image img {
    transform: scale(1.1) !important;
  }

  .filter-btn:hover .filter-btn-image svg {
    transform: translate(-50%, -50%) scale(1.15) rotate(5deg) !important;
    filter: drop-shadow(0 4px 12px hsla(var(--persian-gold), 0.7)) !important;
  }

  .filter-btn:hover .filter-btn-title {
    color: hsl(var(--persian-gold)) !important;
    text-shadow: 0 2px 8px hsla(var(--persian-gold), 0.6), 0 2px 8px rgba(0, 0, 0, 0.8) !important;
  }

  .filter-btn.active .filter-btn-image {
    border-color: hsla(var(--persian-turquoise), 0.8) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 30px hsla(var(--persian-turquoise), 0.5) !important;
  }

  .filter-btn.active .filter-btn-image svg {
    color: hsl(var(--persian-turquoise)) !important;
    filter: drop-shadow(0 2px 8px hsla(var(--persian-turquoise), 0.6)) !important;
  }

  .filter-btn.active .filter-btn-title {
    color: hsl(var(--persian-turquoise)) !important;
    text-shadow: 0 2px 8px hsla(var(--persian-turquoise), 0.6), 0 2px 8px rgba(0, 0, 0, 0.8) !important;
  }
}

@media (min-width: 1200px) {
  /* Doubled button size to 1040px for TV */
  .filter-btn,
  .product-filters .filter-btn,
  .products-section .filter-btn {
    min-width: 1040px !important;
    max-width: 1040px !important;
  }

  .filter-btn-image {
    border-radius: 1.75rem !important;
  }

  .filter-btn-image svg {
    width: 7rem !important;
    height: 7rem !important;
  }

  .filter-btn-title {
    font-size: 0.85rem !important;
    padding: 1.1rem 0.85rem !important;
  }
}

@media (min-width: 1600px) {
  /* Doubled button size to 1200px for extra large displays */
  .filter-btn,
  .product-filters .filter-btn,
  .products-section .filter-btn {
    min-width: 1200px !important;
    max-width: 1200px !important;
  }

  .filter-btn-image {
    border-radius: 2rem !important;
  }

  .filter-btn-image svg {
    width: 8rem !important;
    height: 8rem !important;
  }

  .filter-btn-title {
    font-size: 0.9rem !important;
    padding: 1.2rem 1rem !important;
  }
}

/* Reduced gap from 1rem to 0.5rem for mobile to make product cards bigger */
.product-grid,
#productGrid {
  display: grid !important;
  grid-template-columns: repeat(var(--products-per-row-mobile, 3), 1fr) !important;
  gap: 0.5rem !important;
  padding: 1rem 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  position: relative !important;
  overflow: visible !important;
  grid-auto-rows: auto !important;
  transform: none !important;
  transition: none !important;
  flex-direction: unset !important;
  flex-wrap: unset !important;
}

/* Removed horizontal scroll styles */
.product-grid::-webkit-scrollbar,
#productGrid::-webkit-scrollbar {
  display: none;
}

.product-card,
.product-grid .product-card,
.products-section .product-card,
#productGrid .product-card {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  /* Remove any flex or transform from Swiper */
  flex-shrink: unset !important;
  flex-grow: unset !important;
  flex-basis: unset !important;
  transform: none !important;
  background-color: transparent;
  border-radius: 0;
  overflow: visible;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: none;
}

.product-image {
  aspect-ratio: 3 / 4 !important;
  width: 100% !important;
  height: auto !important;
  overflow: hidden;
  position: relative;
  background-color: hsl(var(--secondary));
  /* Added rounded corners to product images */
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Added price badge styles for top-right corner */
.product-price-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  right: auto;
  background: none;
  color: #ffd700; /* Changed color from white to gold */
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0;
  border-radius: 0;
  z-index: 10;
  backdrop-filter: none;
  letter-spacing: 0.02em;
  transform: rotate(-15deg);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8), -1px -1px 3px rgba(0, 0, 0, 0.8);
}

@media (min-width: 768px) {
  .product-price-badge {
    font-size: 0.85rem;
    padding: 0;
  }
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
  display: block;
}

/* Added overlay for product name inside image */
.product-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
  padding: 1.5rem 1rem 1rem;
  transition: all 0.3s ease;
}

.product-name-overlay {
  font-family: "Vazirmatn", "Inter", sans-serif !important;
  /* Smaller font size for mobile */
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: white !important;
  line-height: 1.3;
  text-align: center !important;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  transition: all 0.3s ease;
}

.product-card:hover .product-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 60%, transparent 100%);
}

.product-card:hover .product-name-overlay {
  color: hsl(var(--primary));
  text-shadow: 0 2px 12px hsla(var(--persian-gold), 0.6);
}

.product-card:hover .product-image {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

/* Removed old product-info and product-footer styles */
.product-info,
.product-footer {
  display: none;
}

/* Removed old product-name and product-view-btn styles */
.product-name,
.product-card .product-name,
.product-view-btn {
  display: none;
}

/* Removed old product title and price styles */
.product-title,
.product-card .product-title,
.product-info h3,
.product-info .product-title a {
  display: none;
}

.product-price,
.product-card .product-price,
.product-info .product-price {
  display: none;
}

/* Added small "دیدن" button inside product image on the right side */
.product-view-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: linear-gradient(135deg, hsla(45, 100%, 50%, 0.95) 0%, hsla(45, 100%, 60%, 0.95) 100%);
  color: hsl(180, 40%, 20%);
  padding: 0.35rem 0.55rem;
  border-radius: 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: "Vazirmatn", "Inter", sans-serif;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 10;
  border: 2px solid hsla(45, 100%, 70%, 0.5);
  backdrop-filter: blur(4px);
}

.product-view-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 20px hsla(45, 100%, 50%, 0.6);
  background: linear-gradient(135deg, hsla(45, 100%, 60%, 1) 0%, hsla(45, 100%, 70%, 1) 100%);
  border-color: hsla(45, 100%, 80%, 0.8);
}

@media (min-width: 768px) {
  .filter-btn,
  .product-filters .filter-btn,
  .products-section .filter-btn {
    min-width: 90px !important;
    max-width: 90px !important;
    padding: 0.75rem 0.6rem !important;
    font-size: 0.85rem !important;
    gap: 0.4rem;
    min-height: 75px !important;
  }

  .filter-btn svg,
  .filter-btn img {
    width: 1.75rem !important;
    height: 1.75rem !important;
  }

  /* Tablet uses desktop grid layout */
  .product-grid,
  #productGrid {
    grid-template-columns: repeat(var(--products-per-row-desktop, 6), 1fr) !important;
    gap: 1.5rem !important;
  }

  .product-name-overlay {
    font-size: 0.9rem !important;
  }

  .product-view-btn {
    padding: 0.45rem 0.7rem;
    font-size: 0.7rem;
    top: 0.6rem;
    right: 0.6rem;
  }

  /* Removed old fixed width styles */
  .view-more-btn {
    width: auto !important;
    min-width: auto !important;
    max-width: 300px !important;
    margin: 2rem auto 0 !important;
  }
}

@media (min-width: 1200px) {
  .filter-btn-image {
    border-radius: 1.75rem !important;
  }

  .filter-btn-image svg {
    width: 7rem !important;
    height: 7rem !important;
  }

  .filter-btn-title {
    font-size: 0.85rem !important;
    padding: 1.1rem 0.85rem !important;
  }

  /* Desktop uses configurable grid */
  .product-grid,
  #productGrid {
    grid-template-columns: repeat(var(--products-per-row-desktop, 6), 1fr) !important;
    gap: 1.5rem !important;
  }

  .product-name-overlay {
    font-size: 1rem !important;
  }

  .product-view-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.75rem;
    top: 0.75rem;
    right: 0.75rem;
  }
}

.youtube-section {
  padding: 4rem 0;
  background-color: hsl(180, 56%, 16%);
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 60px,
    hsla(var(--persian-turquoise), 0.03) 60px,
    hsla(var(--persian-turquoise), 0.03) 61px
  );
}

/* Updated youtube carousel to have horizontal auto-scroll like products */
.youtube-carousel {
  display: flex !important;
  gap: 1.5rem !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  flex-wrap: nowrap !important;
  padding: 2rem 0 !important;
  scrollbar-width: thin !important;
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch;
  will-change: scroll-position;
}

.youtube-carousel::-webkit-scrollbar {
  height: 10px;
}

.youtube-carousel::-webkit-scrollbar-track {
  background: hsla(180, 30%, 15%, 0.5);
  border-radius: 5px;
}

.youtube-carousel::-webkit-scrollbar-thumb {
  background: hsl(var(--primary));
  border-radius: 5px;
}

.youtube-carousel::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--accent));
}

.youtube-item {
  flex-shrink: 0 !important;
  width: 400px !important;
  min-width: 400px !important;
  max-width: 400px !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.youtube-item:hover {
  transform: translateY(-5px);
}

.youtube-embed {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 2px solid hsla(var(--persian-gold), 0.3);
  transition: all 0.3s ease;
}

.youtube-item:hover .youtube-embed {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 30px hsla(var(--persian-gold), 0.4);
  border-color: hsla(var(--persian-gold), 0.6);
}

.youtube-embed iframe {
  width: 100%;
  height: 100%;
}

.youtube-title {
  margin-top: 1rem;
  text-align: center;
  font-family: "Vazirmatn", "Inter", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  transition: color 0.3s ease;
}

.youtube-item:hover .youtube-title {
  color: hsl(var(--primary));
}

@media (max-width: 768px) {
  .youtube-item {
    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
  }
}

.blog-section {
  padding: 3rem 0;
  background-color: hsl(180, 57%, 14%);
}

.blog-carousel {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding: 2rem 0;
}

.blog-card {
  flex-shrink: 0;
  width: 350px;
  background-color: hsl(var(--secondary));
  border-radius: var(--radius);
  overflow: hidden;
}

.blog-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-content {
  padding: 1.5rem;
}

.blog-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.blog-excerpt {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.about-section {
  padding: 4rem 0;
  text-align: center;
  background-color: hsl(180, 56%, 13%);
  background-image: radial-gradient(circle at 20% 50%, hsla(var(--persian-gold), 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, hsla(var(--persian-turquoise), 0.05) 0%, transparent 50%);
}

.about-icon {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 2rem;
  color: hsl(var(--persian-gold));
  filter: drop-shadow(0 0 15px hsla(var(--persian-gold), 0.6));
}

.about-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: hsl(var(--foreground));
}

.about-description {
  max-width: 800px;
  margin: 0 auto 2rem;
  font-size: 1.125rem;
  line-height: 1.8;
  color: hsl(var(--foreground));
}

.site-footer {
  background-color: hsl(180, 55%, 11%);
  padding: 4rem 0 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 40px,
    hsla(var(--persian-gold), 0.04) 40px,
    hsla(var(--persian-gold), 0.04) 80px
  );
  border-top: 2px solid hsla(var(--persian-gold), 0.3);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-column h3 {
  margin-bottom: 1rem;
  color: hsl(var(--primary));
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 0.75rem;
}

.footer-socials {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: hsl(var(--primary));
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.social-icon:hover {
  background-color: hsl(var(--accent));
}

.footer-copyright {
  border-top: 1px solid hsl(var(--border));
  padding: 2rem 0;
  text-align: center;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.gender-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 150;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.gender-modal.active {
  display: flex !important;
}

.gender-modal-content {
  background: transparent;
  border-radius: 1rem;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  position: relative;
  z-index: 151;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.gender-options {
  display: flex !important;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  visibility: visible !important;
  opacity: 1 !important;
}

.gender-option {
  flex: 1;
  min-width: 150px;
  padding: 2.5rem 2rem !important;
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 100%) !important;
  color: white !important;
  border: 3px solid hsl(var(--persian-gold)) !important;
  border-radius: 1rem !important;
  cursor: pointer !important;
  font-size: 1.5rem !important;
  font-family: "Playfair Display", "Lalezar", serif !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 1rem !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 30px hsla(var(--persian-gold), 0.4) !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 152 !important;
}

.gender-option:hover {
  transform: translateY(-8px) scale(1.05) !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 50px hsla(var(--persian-gold), 0.7) !important;
  border-color: hsl(var(--persian-turquoise)) !important;
}

.gender-option svg {
  width: 4rem !important;
  height: 4rem !important;
  filter: drop-shadow(0 4px 8px hsla(var(--persian-gold), 0.5)) !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.gender-option span {
  font-weight: 700 !important;
  font-size: 1.5rem !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
}

@media (max-width: 768px) {
  .gender-option {
    min-width: 130px !important;
    padding: 2rem 1.5rem !important;
    font-size: 1.25rem !important;
  }

  .gender-option svg {
    width: 3rem !important;
    height: 3rem !important;
  }

  .gender-option span {
    font-size: 1.25rem !important;
  }
}

.gender-modal-close {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
}

.gender-filter-buttons,
.product-filters .gender-btn {
}

@keyframes featuredProductsScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-100% + 100vw));
  }
}

.featured-products-scroll {
  animation: featuredProductsScroll 60s linear infinite;
  animation-play-state: running;
}

.featured-products-scroll:hover {
  animation-play-state: paused;
}

.product-grid,
#productGrid {
  display: flex !important;
  gap: 1rem !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  flex-wrap: nowrap !important;
  padding: 1rem 0 !important;
  scrollbar-width: thin !important;
  scroll-behavior: smooth !important;
  width: 100% !important;
  max-width: 100% !important;
  position: relative !important;
}

/* Added search modal styles */
.search-modal {
  /* Ensured modal is completely hidden by default */
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.search-modal.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.search-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.search-modal-content {
  position: relative;
  z-index: 201;
  background: linear-gradient(135deg, hsl(180, 40%, 17%) 0%, hsl(180, 40%, 13%) 100%);
  border-radius: 1rem;
  padding: 2.5rem;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px hsla(var(--persian-gold), 0.3);
  border: 2px solid hsla(var(--persian-gold), 0.4);
  animation: modalSlideDown 0.3s ease-out;
}

@keyframes modalSlideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-modal-close {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: hsla(0, 0%, 0%, 0.3);
  border: 1px solid hsla(var(--persian-gold), 0.3);
  color: hsl(var(--foreground));
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.search-modal-close:hover {
  background: hsla(0, 0%, 0%, 0.5);
  border-color: hsl(var(--primary));
  transform: rotate(90deg);
}

.search-modal-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.search-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.search-modal-title {
  font-family: "Lalezar", cursive;
  font-size: 1.75rem;
  color: hsl(var(--primary));
  text-align: center;
  margin: 0;
  text-shadow: 0 2px 10px hsla(var(--persian-gold), 0.4);
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-input {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
  font-family: "Inter", "Vazirmatn", sans-serif;
  background: hsla(180, 35%, 10%, 0.8);
  border: 2px solid hsla(var(--persian-gold), 0.3);
  border-radius: 0.75rem;
  color: hsl(var(--foreground));
  transition: all 0.3s ease;
  outline: none;
}

.search-input::placeholder {
  color: hsl(var(--muted-foreground));
}

.search-input:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsla(var(--primary), 0.2);
  background: hsla(180, 35%, 10%, 1);
}

.search-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: "Inter", "Vazirmatn", sans-serif;
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 100%);
  color: white;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.search-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 30px hsla(var(--persian-gold), 0.4);
}

.search-submit svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Removed mobile back to home button styles completely */

/* Show back button on mobile for non-home pages */
@media (max-width: 768px) {
  body:not(.home):not(.page-template-default) .mobile-back-home,
  body.single .mobile-back-home,
  body.single-product .mobile-back-home,
  body.archive .mobile-back-home,
  body.search .mobile-back-home {
    display: block;
  }

  /* Adjust main padding when back button is visible */
  body:not(.home):not(.page-template-default) main,
  body.single main,
  body.single-product main,
  body.archive main,
  body.search main {
    padding-top: 7.5rem !important;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  /* Adjusted site title size for mobile */
  .site-title-text {
    font-size: 1.1rem;
  }

  /* Adjusted header right gap for mobile */
  .header-right {
    gap: 0.5rem;
  }

  /* Fixed white space on mobile by adjusting main padding and removing all spacing */
  main {
    /* Reduced padding for mobile to eliminate white space */
    padding-top: 6.5rem !important;
    margin-top: 0 !important;
  }

  /* Ensured story section has no spacing on mobile */
  .story-section {
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    min-height: 0 !important;
  }

  body.admin-bar .story-section {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    visibility: hidden !important;
  }

  .story-grid {
    padding: 0.5rem 0 !important;
    margin: 0 !important;
  }

  /* Ensured hero section has no top margin on mobile */
  .hero-section {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
  }

  /* Added mobile-specific search modal fixes */
  .search-modal {
    /* Ensured modal is hidden on mobile by default */
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    padding-top: 5vh;
  }

  .search-modal.active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Adjusted search modal for mobile */
  .search-modal-content {
    padding: 2rem 1.5rem;
  }

  .search-modal-title {
    font-size: 1.5rem;
  }

  .search-input {
    font-size: 1rem;
    padding: 0.875rem 1rem;
  }

  .search-submit {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
  }
}

/* Expandable Categories Section */
.expandable-categories-section {
  padding: 3rem 0;
  background: linear-gradient(180deg, hsl(180, 58%, 15%) 0%, hsl(180, 56%, 13%) 100%);
  position: relative;
  overflow: hidden;
}

/* Persian pattern overlay */
.expandable-categories-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 35px,
      hsla(var(--persian-gold), 0.04) 35px,
      hsla(var(--persian-gold), 0.04) 70px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 35px,
      hsla(var(--persian-turquoise), 0.03) 35px,
      hsla(var(--persian-turquoise), 0.03) 70px
    );
  pointer-events: none;
  z-index: 0;
}

.expandable-categories-section .container {
  position: relative;
  z-index: 1;
}

.expandable-categories-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.expandable-category-item {
  width: 100%;
}

/* Category trigger button - Persian/Achaemenid inspired design */
.expandable-category-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: linear-gradient(
    135deg,
    hsla(45, 100%, 50%, 0.15) 0%,
    hsla(180, 60%, 50%, 0.1) 50%,
    hsla(45, 100%, 50%, 0.15) 100%
  );
  border: 2px solid hsla(var(--persian-gold), 0.4);
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 1px 0 hsla(var(--persian-gold), 0.2);
}

/* Achaemenid pattern on button */
.expandable-category-trigger::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: repeating-linear-gradient(
      90deg,
      transparent,
      transparent 20px,
      hsla(var(--persian-gold), 0.05) 20px,
      hsla(var(--persian-gold), 0.05) 21px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 20px,
      hsla(var(--persian-turquoise), 0.03) 20px,
      hsla(var(--persian-turquoise), 0.03) 21px
    );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.expandable-category-trigger:hover::before {
  opacity: 1;
}

.expandable-category-trigger:hover {
  transform: translateY(-3px);
  border-color: hsla(var(--persian-gold), 0.7);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 40px hsla(var(--persian-gold), 0.3), inset 0 1px 0
    hsla(var(--persian-gold), 0.4);
  background: linear-gradient(
    135deg,
    hsla(45, 100%, 50%, 0.25) 0%,
    hsla(180, 60%, 50%, 0.15) 50%,
    hsla(45, 100%, 50%, 0.25) 100%
  );
}

.expandable-category-trigger.active {
  border-color: hsla(var(--persian-turquoise), 0.6);
  background: linear-gradient(
    135deg,
    hsla(180, 60%, 25%, 0.2) 0%,
    hsla(45, 100%, 50%, 0.15) 50%,
    hsla(180, 60%, 25%, 0.2) 100%
  );
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 30px hsla(var(--persian-turquoise), 0.4);
}

.expandable-category-trigger.active .category-arrow {
  transform: rotate(180deg);
  color: hsl(var(--persian-turquoise));
}

.category-icon {
  width: 3rem;
  height: 3rem;
  color: hsl(var(--persian-gold));
  filter: drop-shadow(0 2px 8px hsla(var(--persian-gold), 0.5));
  transition: all 0.3s ease;
  margin-top: -0.5rem;
}

.expandable-category-trigger:hover .category-icon {
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(0 4px 12px hsla(var(--persian-gold), 0.7));
}

.category-name {
  flex: 1;
  font-family: "Lalezar", cursive;
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.expandable-category-trigger:hover .category-name {
  color: hsl(var(--persian-gold));
  text-shadow: 0 2px 12px hsla(var(--persian-gold), 0.6);
}

.expandable-category-trigger.active .category-name {
  color: hsl(var(--persian-turquoise));
}

.category-arrow {
  width: 2rem;
  height: 2rem;
  color: hsl(var(--foreground));
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Expandable panel */
.expandable-category-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0;
  opacity: 0;
}

.expandable-category-panel.active {
  max-height: 600px;
  margin-top: 1rem;
  opacity: 1;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease 0.2s;
}

.expandable-category-products {
  display: flex !important;
  flex-direction: row !important; /* Ensure horizontal scroll */
  gap: 1rem !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  flex-wrap: nowrap !important;
  padding: 1rem 0 !important;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on touch devices */
}

/* Adding larger gap for desktop view to prevent products from sticking together */
@media (min-width: 769px) {
  .product-grid,
  #productGrid,
  .expandable-category-products {
    gap: 1.5rem !important;
  }
}

/* Added extra spacing for very large screens (TV/4K displays) */
@media (min-width: 1920px) {
  .product-grid,
  #productGrid,
  .expandable-category-products {
    gap: 3rem !important;
  }
}

/* Added elegant shop page and search results styling */

/* Shop/Archive Page Styles */
.shop-page {
  padding: 2rem 0 4rem;
  background-color: hsl(180, 58%, 15%);
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 50px,
    hsla(var(--persian-gold), 0.02) 50px,
    hsla(var(--persian-gold), 0.02) 51px
  );
  min-height: 60vh;
}

.shop-page .page-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
  color: hsl(var(--primary));
  text-shadow: 0 2px 10px hsla(var(--persian-gold), 0.3);
  font-family: "Lalezar", cursive;
}

.shop-filters {
  display: flex !important;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: nowrap !important;
  padding: 1rem 0;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.shop-product-grid {
  display: grid !important;
  grid-template-columns: repeat(var(--products-per-row-mobile, 3), 1fr) !important;
  gap: 1rem !important;
  padding: 1rem 0 !important;
  width: 100% !important;
}

@media (min-width: 768px) {
  .shop-product-grid {
    grid-template-columns: repeat(var(--products-per-row-desktop, 6), 1fr) !important;
    gap: 1.5rem !important;
  }
}

.shop-product-grid .product-card {
  width: 100% !important;
  min-width: unset !important;
  max-width: 100% !important;
}

/* Pagination Styles */
.woocommerce-pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
}

.woocommerce-pagination ul {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.woocommerce-pagination li {
  margin: 0;
}

.woocommerce-pagination a,
.woocommerce-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, hsla(180, 40%, 18%, 0.95) 0%, hsla(180, 40%, 14%, 0.95) 100%);
  border: 2px solid hsla(var(--persian-gold), 0.4);
  border-radius: 0.5rem;
  color: hsl(var(--foreground));
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

.woocommerce-pagination a:hover {
  background: linear-gradient(135deg, hsla(45, 100%, 50%, 0.25) 0%, hsla(45, 100%, 60%, 0.25) 100%);
  border-color: hsla(var(--persian-gold), 0.7);
  color: hsl(var(--persian-gold));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.woocommerce-pagination span.current {
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 100%);
  border-color: hsl(var(--primary));
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* No Products Found */
.no-products-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  min-height: 40vh;
}

.no-products-found svg {
  color: hsl(var(--persian-gold));
  filter: drop-shadow(0 4px 12px hsla(var(--persian-gold), 0.4));
  margin-bottom: 1.5rem;
}

.no-products-found p {
  font-size: 1.25rem;
  color: hsl(var(--muted-foreground));
  font-family: "Vazirmatn", sans-serif;
}

/* Search Results Page Styles */
.search-results-page {
  padding: 2rem 0 4rem;
  background-color: hsl(180, 58%, 15%);
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 40px,
    hsla(var(--persian-turquoise), 0.03) 40px,
    hsla(var(--persian-turquoise), 0.03) 80px
  );
  min-height: 60vh;
}

.search-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, hsla(180, 40%, 18%, 0.6) 0%, hsla(180, 40%, 14%, 0.6) 100%);
  border-radius: 1rem;
  border: 2px solid hsla(var(--persian-gold), 0.3);
  backdrop-filter: blur(8px);
}

.search-header .page-title {
  font-size: 2rem;
  color: hsl(var(--foreground));
  margin-bottom: 1.5rem;
  font-family: "Lalezar", cursive;
}

.search-header .search-query {
  color: hsl(var(--primary));
  text-shadow: 0 2px 8px hsla(var(--persian-gold), 0.4);
}

/* Inline Search Form in Results */
.search-form-inline {
  display: flex;
  gap: 0.75rem;
  max-width: 600px;
  margin: 0 auto;
  align-items: stretch;
}

.search-form-inline .search-input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  font-family: "Vazirmatn", sans-serif;
  background: hsla(180, 35%, 10%, 0.8);
  border: 2px solid hsla(var(--persian-gold), 0.3);
  border-radius: 0.75rem;
  color: hsl(var(--foreground));
  transition: all 0.3s ease;
  outline: none;
}

.search-form-inline .search-input:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsla(var(--primary), 0.2);
  background: hsla(180, 35%, 10%, 1);
}

.search-form-inline .search-submit {
  padding: 0.875rem 1.25rem;
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 100%);
  border: none;
  border-radius: 0.75rem;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-form-inline .search-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.search-form-inline .search-submit svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Search Product Grid */
.search-product-grid {
  display: flex !important;
  gap: 1rem !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  flex-wrap: nowrap !important;
  padding: 1rem 0 !important;
  scrollbar-width: thin !important;
  scroll-behavior: smooth !important;
  margin-bottom: 2rem;
}

/* Non-Product Search Results (Blog Posts, Pages) */
.search-result-item {
  background: linear-gradient(135deg, hsla(180, 40%, 18%, 0.8) 0%, hsla(180, 40%, 14%, 0.8) 100%);
  border: 2px solid hsla(var(--persian-gold), 0.3);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.search-result-item:hover {
  border-color: hsla(var(--persian-gold), 0.6);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.result-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-family: "Lalezar", cursive;
}

.result-title a {
  color: hsl(var(--foreground));
  text-decoration: none;
  transition: color 0.3s ease;
}

.result-title a:hover {
  color: hsl(var(--primary));
}

.result-excerpt {
  color: hsl(var(--muted-foreground));
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.result-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: hsl(var(--primary));
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.result-link:hover {
  color: hsl(var(--accent));
  gap: 0.75rem;
}

/* No Results Found */
.no-results-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  min-height: 40vh;
}

.no-results-found svg {
  color: hsl(var(--persian-gold));
  filter: drop-shadow(0 4px 12px hsla(var(--persian-gold), 0.4));
  margin-bottom: 2rem;
}

.no-results-found h2 {
  font-size: 2rem;
  color: hsl(var(--foreground));
  margin-bottom: 1rem;
  font-family: "Lalezar", cursive;
}

.no-results-found p {
  font-size: 1.125rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 2rem;
  max-width: 600px;
  line-height: 1.8;
}

/* Large Search Form in No Results */
.search-form-large {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}

.search-form-large .search-input {
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
  font-family: "Vazirmatn", sans-serif;
  background: hsla(180, 35%, 10%, 0.8);
  border: 2px solid hsla(var(--persian-gold), 0.3);
  border-radius: 0.75rem;
  color: hsl(var(--foreground));
  transition: all 0.3s ease;
  outline: none;
}

.search-form-large .search-input:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsla(var(--primary), 0.2);
}

.search-form-large .search-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 100%);
  color: white;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-form-large .search-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .shop-page .page-title,
  .search-header .page-title {
    font-size: 1.75rem;
  }

  .search-form-inline {
    flex-direction: column;
  }

  .search-result-item {
    padding: 1.5rem;
  }

  .result-title {
    font-size: 1.25rem;
  }

  /* Increased mobile gap to 0.5rem for more spacing between products */
  .expandable-category-products,
  .product-grid,
  #productGrid {
    gap: 0.5rem !important;
    padding: 1rem 0 !important;
  }
}

/* Product descriptions - always black */
.woocommerce-product-details__short-description,
.woocommerce-product-details__short-description p,
.product-short-description,
.product-short-description p,
.woocommerce-Tabs-panel--description,
.woocommerce-Tabs-panel--description p,
.product-description,
.product-description p,
.product .entry-content,
.product .entry-content p,
.product-card-description,
.product-card-description p,
.result-excerpt,
.result-excerpt p,
.search-result-item .result-excerpt,
.search-result-item .result-excerpt p {
  color: #000000 !important;
  text-shadow: none !important;
}

/* Ensure readability on light backgrounds */
.woocommerce-product-details__short-description,
.product-short-description,
.woocommerce-Tabs-panel--description,
.product-description,
.product .entry-content {
  background-color: transparent;
}

/* Single Product Page Styles - Professional Layout */
.valentine-single-product {
  background: hsl(180, 58%, 15%);
  padding: 2rem 0;
}

.single-product-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* Adjusted grid layout to make image section wider in desktop */
@media (min-width: 769px) {
  .single-product-container {
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    padding: 0 2rem;
  }
}

@media (min-width: 1200px) {
  .single-product-container {
    grid-template-columns: 1.8fr 1fr;
    gap: 4rem;
    padding: 0 3rem;
  }
}

/* Product Images with Frame */
.single-product-images {
  position: relative;
}

.single-product-images .woocommerce-product-gallery {
  background: linear-gradient(135deg, hsla(180, 40%, 18%, 0.95) 0%, hsla(180, 40%, 14%, 0.95) 100%);
  border: 3px solid hsla(var(--persian-gold), 0.4);
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.single-product-images .woocommerce-product-gallery__wrapper {
  border-radius: 1rem;
  overflow: hidden;
}

.single-product-images .woocommerce-product-gallery__image {
  border-radius: 1rem;
  overflow: hidden;
}

.single-product-images .woocommerce-product-gallery__image img {
  border-radius: 1rem;
  width: 100%;
  height: auto;
  display: block;
}

/* Product Gallery Thumbnails */
.single-product-images .flex-control-thumbs {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.single-product-images .flex-control-thumbs li {
  flex: 0 0 calc(25% - 0.75rem);
  max-width: calc(25% - 0.75rem);
}

.single-product-images .flex-control-thumbs li img {
  border: 2px solid hsla(var(--persian-gold), 0.3);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.6;
}

.single-product-images .flex-control-thumbs li img:hover,
.single-product-images .flex-control-thumbs li.flex-active-slide img {
  border-color: hsla(var(--persian-gold), 0.8);
  opacity: 1;
  box-shadow: 0 4px 12px hsla(var(--persian-gold), 0.4);
}

/* Changed background to cream/beige and text to black */
/* Product Summary Section */
.single-product-summary {
  background: linear-gradient(135deg, hsl(40, 35%, 88%) 0%, hsl(40, 30%, 85%) 100%);
  border: 3px solid hsla(var(--persian-gold), 0.4);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.single-product-summary .product_title {
  font-family: "Vazirmatn", "Inter", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: hsl(var(--persian-gold));
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px hsla(var(--persian-gold), 0.3);
}

/* Changed price color to white */
.single-product-summary .price {
  font-size: 1.75rem;
  font-weight: 700;
  color: hsl(0, 0%, 100%);
  margin-bottom: 1.5rem;
  display: block;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Changed description text color to black */
.single-product-summary .woocommerce-product-details__short-description {
  color: hsl(0, 0%, 10%);
  line-height: 1.8;
  margin-bottom: 2rem;
  font-size: 1rem;
}

/* Add to Cart Button with Frame */
.single-product-summary .cart {
  margin-bottom: 2rem;
}

.single-product-summary .cart .quantity {
  margin-bottom: 1rem;
}

.single-product-summary .cart .quantity input {
  background: hsla(0, 0%, 100%, 0.9);
  border: 2px solid hsla(var(--persian-gold), 0.3);
  border-radius: 0.75rem;
  color: hsl(0, 0%, 10%);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  width: 100px;
  text-align: center;
}

.single-product-summary .cart .single_add_to_cart_button {
  background: linear-gradient(135deg, hsl(var(--persian-gold)) 0%, hsl(var(--accent)) 100%);
  color: hsl(180, 40%, 20%);
  border: 3px solid hsla(var(--persian-gold), 0.5);
  border-radius: 1rem;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 700;
  font-family: "Vazirmatn", "Inter", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  text-transform: none;
}

.single-product-summary .cart .single_add_to_cart_button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 30px hsla(var(--persian-gold), 0.4);
  border-color: hsla(var(--persian-gold), 0.8);
}

/* Product Meta */
.single-product-summary .product_meta {
  border-top: 2px solid hsla(var(--persian-gold), 0.3);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: hsl(0, 0%, 30%);
}

.single-product-summary .product_meta > span {
  display: block;
  margin-bottom: 0.5rem;
}

.single-product-summary .product_meta a {
  color: hsl(var(--persian-gold));
  text-decoration: none;
  transition: color 0.3s ease;
}

.single-product-summary .product_meta a:hover {
  color: hsl(var(--accent));
}

/* Product Tabs */
.woocommerce-tabs .tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 2px solid hsla(var(--persian-gold), 0.3);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.woocommerce-tabs .tabs li {
  list-style: none;
}

.woocommerce-tabs .tabs li a {
  display: block;
  padding: 1rem 1.5rem;
  /* تغییر رنگ متن به مشکی برای خوانایی بهتر */
  color: #333333;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0.75rem 0.75rem 0 0;
  transition: all 0.3s ease;
  /* تغییر بک‌گراند از سبز به کرم */
  background: hsla(40, 35%, 85%, 0.8);
}

.woocommerce-tabs .tabs li.active a,
.woocommerce-tabs .tabs li a:hover {
  /* رنگ متن تب فعال به نارنجی */
  color: hsl(var(--persian-gold));
  /* بک‌گراند تب فعال کرم روشن‌تر */
  background: hsla(40, 35%, 90%, 1);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.woocommerce-tabs .woocommerce-Tabs-panel {
  /* تغییر بک‌گراند محتوای تب از سبز به کرم */
  background: hsla(40, 35%, 92%, 0.95);
  border: 3px solid hsla(var(--persian-gold), 0.4);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  /* رنگ متن مشکی برای خوانایی */
  color: #000000;
  line-height: 1.8;
}

/* Related Products */
.related.products,
.upsells.products {
  max-width: 1400px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.related.products h2,
.upsells.products h2 {
  font-size: 2rem;
  color: hsl(var(--primary));
  text-align: center;
  margin-bottom: 2rem;
  text-shadow: 0 2px 10px hsla(var(--persian-gold), 0.3);
}

.related.products .products,
.upsells.products .products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
}

@media (min-width: 769px) {
  .related.products .products,
  .upsells.products .products {
    gap: 2.5rem;
  }
}

@media (min-width: 1200px) {
  .related.products .products,
  .upsells.products .products {
    gap: 3rem;
  }
}

/* Mobile Adjustments for Single Product */
@media (max-width: 768px) {
  .single-product-images .woocommerce-product-gallery {
    padding: 1rem;
    border-radius: 1rem;
  }

  .single-product-summary {
    padding: 1.5rem;
    border-radius: 1rem;
  }

  .single-product-summary .product_title {
    font-size: 1.5rem;
  }

  .single-product-summary .price {
    font-size: 1.5rem;
  }

  .woocommerce-tabs {
    padding: 0 0.5rem;
  }

  .woocommerce-tabs .woocommerce-Tabs-panel {
    padding: 1.5rem;
    border-radius: 1rem;
  }
}

.expandable-category-products {
  display: flex !important;
  gap: 1rem !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  flex-wrap: nowrap !important;
  padding: 1rem 0 !important;
}

/* Added larger gap for desktop view to prevent products from sticking together */
@media (min-width: 769px) {
  .product-grid,
  #productGrid,
  .expandable-category-products {
    gap: 1.5rem !important;
  }
}

/* Added extra spacing for very large screens (TV/4K displays) */
@media (min-width: 1920px) {
  .product-grid,
  #productGrid,
  .expandable-category-products {
    gap: 3rem !important;
  }
}

/* Added beautiful, small, centered view-more button styling */
.view-more-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  margin: 2rem auto 0 !important;
  padding: 0.65rem 1.5rem !important;
  background: linear-gradient(135deg, hsl(45, 100%, 50%) 0%, hsl(45, 100%, 60%) 100%) !important;
  color: hsl(180, 60%, 10%) !important;
  border: none !important;
  border-radius: 0.5rem !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
  max-width: 240px !important;
  width: 100% !important;
  font-family: "Vazirmatn", "Inter", sans-serif !important;
}

.view-more-btn svg {
  width: 1.1rem !important;
  height: 1.1rem !important;
  flex-shrink: 0 !important;
}

.view-more-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), 0 0 30px hsla(45, 100%, 50%, 0.4) !important;
  background: linear-gradient(135deg, hsl(45, 100%, 55%) 0%, hsl(45, 100%, 65%) 100%) !important;
}

.view-more-btn:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

@media (min-width: 768px) {
  /* Tablet uses desktop grid layout */
  .product-grid,
  #productGrid {
    grid-template-columns: repeat(var(--products-per-row-desktop, 6), 1fr) !important;
    gap: 1.5rem !important;
  }

  /* Adjusted view-more button for desktop */
  .view-more-btn {
    padding: 0.75rem 2rem !important;
    font-size: 0.9rem !important;
    max-width: 280px !important;
  }

  .view-more-btn svg {
    width: 1.2rem !important;
    height: 1.2rem !important;
  }
}

@media (min-width: 1200px) {
  .view-more-btn {
    padding: 0.85rem 2.25rem !important;
    font-size: 0.95rem !important;
    max-width: 300px !important;
  }

  .view-more-btn svg {
    width: 1.3rem !important;
    height: 1.3rem !important;
  }
}

/* Products Archive Page Styles */
.products-archive-page {
  padding: 2rem 0 4rem;
  background-color: hsl(180, 58%, 15%);
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 50px,
    hsla(var(--persian-gold), 0.02) 50px,
    hsla(var(--persian-gold), 0.02) 51px
  );
  min-height: 80vh;
}

.products-page-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  color: hsl(var(--primary));
  text-shadow: 0 2px 10px hsla(var(--persian-gold), 0.3);
  font-family: "Lalezar", cursive;
}

.products-page-grid {
  display: grid !important;
  grid-template-columns: repeat(var(--products-per-row-mobile, 2), 1fr) !important;
  gap: 1rem !important;
  padding: 1rem 0 !important;
  width: 100% !important;
}

.products-page-loading {
  display: none;
  text-align: center;
  padding: 2rem 0;
  color: #fff;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: hsl(var(--primary));
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.no-products-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: #fff;
  font-size: 1.2rem;
}

@media (min-width: 768px) {
  .products-page-grid {
    grid-template-columns: repeat(var(--products-per-row-desktop, 6), 1fr) !important;
    gap: 1.5rem !important;
  }

  .products-page-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
  }
}

/* Make view-more-btn an actual link */
.view-more-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  margin: 2rem auto 0 !important;
  padding: 0.65rem 1.5rem !important;
  background: linear-gradient(135deg, hsl(45, 100%, 50%) 0%, hsl(45, 100%, 60%) 100%) !important;
  color: hsl(180, 60%, 10%) !important;
  border: none !important;
  border-radius: 0.5rem !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
  max-width: 240px !important;
  width: 100% !important;
  font-family: "Vazirmatn", "Inter", sans-serif !important;
  text-decoration: none !important;
}
