/* ==================== FONTS ==================== */
@font-face {
  font-family: 'PeydaWeb';
  src: url('../fonts/PeydaWeb-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'PeydaWeb';
  src: url('../fonts/PeydaWeb-Bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
}

/* ==================== BASE STYLES ==================== */
:root {
  --header-height-mobile: 65px;
  --header-height-tablet: 70px;
  --header-height-desktop: 80px;
  --transition: 0.36s;
  --brand-gold: #a08c5b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: 'PeydaWeb', sans-serif;
  background-color: #fdfdfd;
  color: #333;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
  font-size: 16px;
  /* Base font size */
  overflow-x: hidden;
  /* Prevent horizontal scrolling */
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  /* Consistent padding */
}

/* Add overlay for background when mobile menu is open */
body.mobile-nav-active::before,
body.search-is-active::before,
body.modal-is-active::before,
body.filter-is-active::before { /* <-- ADD THIS */
  /* Add for modals */
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1250;
  /* Below modals/navs */
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
  -webkit-backdrop-filter: blur(4px);
  /* Optional blur */
  backdrop-filter: blur(4px);
}

body:not(.mobile-nav-active):not(.search-is-active):not(.modal-is-active)::before {
  opacity: 0;
  pointer-events: none;
}

/* Prevent body scroll when overlays are active */
body.mobile-nav-active,
body.modal-is-active,
body.filter-is-active {
  overflow: hidden; /* This works for nerkhname.html */
}

/* This new rule fixes the scroll on all OTHER pages */
html:has(body.mobile-nav-active),
html:has(body.modal-is-active),
html:has(body.filter-is-active) {
  overflow: hidden; /* This works for index.html, category.html, etc. */
}


/* ==================== BUTTONS ==================== */
.button {
  display: inline-block;
  background: var(--brand-gold);
  color: #fff;
  padding: 10px 18px;
  /* Slightly adjusted padding */
  border-radius: 6px;
  font-family: inherit;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  text-align: center;
  transition: background-color 0.2s, transform 0.1s;
}

.button:hover {
  background-color: #8a7a50;
  /* Darker gold on hover */
  transform: translateY(-1px);
}

/* ==================== GENERAL SECTION STYLES ==================== */
.section {
  padding: 3rem 0;
  /* Base padding */
}

.section__header {
  text-align: center;
  margin-bottom: 2rem;
}

.section__title {
  font-size: 1.8rem;
  /* Base title size */
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.section__view-all {
  font-size: 0.9rem;
  color: var(--brand-gold);
  font-weight: normal;
}


/* ==================== HEADER ==================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color var(--transition), box-shadow var(--transition), border-color var(--transition), height var(--transition);
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  height: var(--header-height-mobile);
}

.site-header.scrolled,
.site-header.menu-is-open {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: #eee;
  box-shadow: 0 4px 12px rgba(22, 22, 22, 0.05);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1600px;
  padding: 0 15px;
  /* Mobile padding */
  margin: 0 auto;
  /* Add this to center inner container on very wide screens */
  flex-wrap: nowrap;
  /* <-- ADD THIS LINE */
}

/* Sides */
.header-side {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 100%;
  flex-wrap: nowrap;
  /* <-- ADD THIS LINE */
}

.header-left {
  justify-content: flex-start;
  flex-shrink: 0;
}

.header-right {
  justify-content: flex-end;
  flex-shrink: 0;
}

.header-center {
  flex-grow: 1;
  /* Allow center to take available space */
  text-align: center;
  display: flex;
  /* Use flex for centering logo */
  justify-content: center;
  /* Center logo horizontally */
  align-items: center;
  /* Center logo vertically */
  height: 100%;
}

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  height: 100%;
  /* Make logo link fill vertical space */
  padding: 0 5px;
}

.logo-svg {
  /* Explicit large height for mobile */
  height: 100%;
  width: auto;
  /* Keep width auto */
  display: block;
  /* Revert to block */
  margin: auto 0;
  /* Vertical centering within flex container */
  /* Remove max-height */
  /* max-height: 75%; */
  flex-shrink: 0;
  /* Prevent shrinking */
}

/* Ensure path fill color is correct */
.logo-svg path {
  transition: fill var(--transition);
  fill: #ffffff;
  /* Default fill (for transparent header) */
}

.site-header.scrolled .logo-svg path,
.site-header.menu-is-open .logo-svg path {
  fill: #262626;
  /* Fill for scrolled/menu-open header */
}

/* Icons */
.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  font-size: 24px;
  /* Mobile icon size */
  display: inline-flex;
  align-items: center;
  color: #fff;
  transition: color .2s;
}

.header-icons {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  /* Ensures the icons themselves stay in a row */
}

.site-header.scrolled .icon-btn,
.site-header.menu-is-open .icon-btn {
  color: #222;
}

.burger-btn {
  position: relative;
  /* Add position context if needed */
  z-index: 1301;
  /* Ensure it's above potential overlaps */
  display: inline-flex;
}

/* Add !important temporarily if needed */
.desktop-nav {
  display: none;
}

/* Hidden by default */
.header-gold-price {
  display: none;
  /* Hidden by default (on mobile) */
}

/* Hidden by default */

/* Gold Price Display (for larger screens) */
.gold-price-link {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  font-size: 0.85rem;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

.gold-price-label {
  margin-left: 0.4rem;
  opacity: 0.8;
}

.gold-price-value {
  font-weight: 600;
  margin-left: 0.2rem;
}

.gold-price-icon {
  font-size: 0.9rem;
  opacity: 0.8;
}

.site-header:not(.scrolled) .gold-price-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.site-header.scrolled .gold-price-link,
.site-header.menu-is-open .gold-price-link {
  color: #333;
  background-color: rgba(0, 0, 0, 0.05);
}

.site-header.scrolled .gold-price-link:hover,
.site-header.menu-is-open .gold-price-link:hover {
  background-color: rgba(0, 0, 0, 0.1);
}


/* Desktop Navigation (Hidden on Mobile) */
.nav-list>.nav-item {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-link {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-weight: 600;
  padding: 8px 15px;
  transition: color .2s;
  position: relative;
  background-color: transparent;
  border: none;
  cursor: pointer;
  color: #fff;
  transition: color .2s;
  /* Ensure transition exists */
}

.site-header.scrolled .nav-link,
.site-header.menu-is-open .nav-link {
  color: #222;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--brand-gold);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-item:hover>.nav-link::after {
  width: 100%;
}

.nav-item:hover>.nav-link {
  color: var(--brand-gold) !important;
}

.site-header:not(.scrolled) .nav-item:hover>.nav-link {
  color: #fff;
}

/* Mega Menu (Hidden on Mobile) */
.mega-menu {
  position: absolute;
  /* Adjust top slightly to overlap the header bottom border */
  top: calc(var(--header-height-desktop) - 1px);
  left: 0;
  right: 0;
  width: auto;
  background-color: rgba(255, 255, 255, 0.99);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  /* Add a delay only when hiding */
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, visibility 0s linear 0.3s;
  /* Delay visibility change on hide */
  z-index: 999;
}

/* Show only the specific nav-item's mega-menu when it has .menu-is-open */
.nav-item.has-megamenu.menu-is-open>.mega-menu,
.nav-item.has-megamenu:focus-within>.mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s, 0s, 0s;
  /* make it show immediately */
}

.nav-item.has-megamenu:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  /* Remove the delay when showing */
  transition-delay: 0s, 0s, 0s;
}

.mega-menu__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  /* Adjust minmax */
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.mega-menu__title {
  font-size: 1rem;
  font-weight: bold;
  color: var(--brand-gold);
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.mega-menu__list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.mega-menu__list a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #333;
  transition: color 0.3s, padding-right 0.3s;
  font-size: 0.9rem;
}

.mega-menu__list a:hover {
  color: var(--brand-gold);
  padding-right: 5px;
}

.mega-menu__list i {
  font-size: 1.1rem;
  color: #666;
}

.mega-menu__column--media {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mega-menu__media-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.mega-menu__media-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.mega-menu__media-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.mega-menu__media-content h4 {
  font-weight: bold;
  margin-bottom: 0.2rem;
  color: #222;
  font-size: 0.9rem;
}

.mega-menu__media-content p {
  font-size: 0.8rem;
  color: #555;
}


/* ==================== HERO ==================== */
.hero {
  height: 90vh;
  /* Slightly less than full viewport */
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  padding-top: var(--header-height-mobile);
  /* Space for header */
}

/* Replace existing .hero__video rules with this */
.hero__video {
  position: absolute;
  inset: 0;
  /* top:0; right:0; bottom:0; left:0; */
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transform: none;
  /* remove translate-based centering */
  min-width: unset;
  min-height: unset;
  backface-visibility: hidden;
  will-change: transform;
  transform: translateZ(0);
  /* promote to its own layer */
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2;
  /* Slightly darker overlay */
}

.hero__content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 20px;
}

.hero__title {
  font-size: 2rem;
  /* Mobile title size */
  font-weight: 700;
  margin-bottom: 0.8rem;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.6);
  text-transform: uppercase;
}

.hero__description {
  font-size: 1rem;
  /* Mobile description size */
  margin-bottom: 1.5rem;
  line-height: 1.6;
  max-width: 500px;
  /* Limit width */
  margin-left: auto;
  margin-right: auto;
}

/* ==================== COLLECTION / PRODUCTS ==================== */
.collection__container {
  padding: 1rem 0;
}

.collection__container::-webkit-scrollbar {
  display: none;
}

.product-card {
  flex-shrink: 0;
  width: auto;
  /* Let Swiper handle width */
  text-align: center;
  height: auto;
  
  /* --- ADDED LINES --- */
  /* Add a border and subtle shadow to the card itself */
  border: 1px solid #f0f0f0;
  border-radius: 8px; /* Match the image wrapper */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  background-color: #fff; /* Ensure it has a background */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* --- END OF ADDED LINES --- */
}

/* Now we add the :hover effect */
.product-grid .product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  z-index: 10; /* Bring it in front of other cards */
  position: relative; /* Needed for z-index */
}

.product-card__image-wrapper {
  background-color: #f7f7f7;
  /* Round only the top corners */
  border-radius: 8px 8px 0 0; 
  margin-bottom: 0.5rem;
  overflow: hidden;
  position: relative;
  /* Remove the margin, as the card has its own */
  margin: 0; 
}

.product-card__image {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1.2;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease-in-out;
}

.product-card__body {
  /* Add more padding to space it from the card edges */
  padding: 0.5rem 0.8rem 1rem;
}

.product-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.15rem;
  /* Truncate long names */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card__price {
  font-size: 0.9rem;
  color: #555;
  font-weight: 600;
}

.product-card__overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 3px 7px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 0.75rem;
}

.product-card__image.product-card-hovered+.product-card__overlay {
  opacity: 1;
}

/* Swiper Nav Buttons Base */
.section .swiper-button-next,
.section .swiper-button-prev {
  display: none; /* Keep hidden on mobile */
  color: var(--brand-gold) !important;
  fill: var(--brand-gold) !important;
  position: absolute;
  top: 50%;
  width: 40px; /* Fixed width for better hit area */
  height: 40px;
  margin-top: -20px;
  z-index: 10;
  align-items: center;
  justify-content: center;
}

/* Fix 3: Simpler Icon Approach using Boxicons */
.section .swiper-button-next:after,
.section .swiper-button-prev:after {
  font-family: 'boxicons' !important;
  font-size: 1.8rem !important;
  font-weight: normal !important;
  display: inline-block;
  line-height: 1;
}

/* Fix 1: Direction for RTL (Persian) */
/* Next button (moves to left slide) -> Should point LEFT */
html[dir="rtl"] .section .swiper-button-next:after {
  content: '\eb33'; /* bx-left-arrow-alt */
  transform: none;
}

/* Prev button (moves to right slide) -> Should point RIGHT */
html[dir="rtl"] .section .swiper-button-prev:after {
  content: '\eb33'; /* bx-left-arrow-alt */
  transform: rotate(180deg); /* Flip to point right */
}

/* --- RTL (Persian) Arrow Positioning --- */
/* Next button goes to the LEFT */
html[dir="rtl"] .section .swiper-button-next {
  left: 10px;
  right: auto;
}
/* Prev button goes to the RIGHT */
html[dir="rtl"] .section .swiper-button-prev {
  right: 10px;
  left: auto;
}

/* --- Tablet Tweaks (769px+) --- */
@media (min-width: 769px) {
  .section .swiper-button-next,
  .section .swiper-button-prev {
    display: flex;
  }

  /* Pull arrows slightly outside the container */
  html[dir="rtl"] .section .swiper-button-next {
    margin-left: -18px; /* Pull left */
    margin-right: 0;
  }
  html[dir="rtl"] .section .swiper-button-prev {
    margin-right: -18px; /* Pull right */
    margin-left: 0;
  }
}

/* --- Desktop Tweaks (1025px+) --- */
@media (min-width: 1025px) {
  html[dir="rtl"] .section .swiper-button-next {
    margin-left: -30px; /* Pull further left */
  }
  html[dir="rtl"] .section .swiper-button-prev {
    margin-right: -30px; /* Pull further right */
  }
}

.section .swiper-button-next:after,
.section .swiper-button-prev:after {
  font-size: 1.5rem !important;
  /* Default icon size */
  font-weight: bold !important;
}

/* Default (LTR) positioning */
.section .swiper-button-next {
  right: 10px;
  left: auto;
}
.section .swiper-button-prev {
  left: 10px;
  right: auto;
}

/* RTL Override: Swap positions automatically */
html[dir="rtl"] .section .swiper-button-next {
  left: 10px;
  right: auto;
}
html[dir="rtl"] .section .swiper-button-prev {
  right: 10px;
  left: auto;
}

/* Position slightly inside */
.section>.container {
  position: relative;
}

/* Context for arrows */

/* ==================== ABOUT SECTION ==================== */
.about {
  background-color: #f9f9f9;
  overflow: hidden;
}

.about__container {
  display: grid;
  grid-template-columns: 1fr;
  /* Stack on mobile */
  gap: 2rem;
  position: relative;
}

.about__content {
  text-align: right;
  z-index: 5;
  position: relative;
}

.about__content .section__title {
  margin-bottom: 1rem;
}

.about__description {
  line-height: 1.7;
  color: #555;
  margin-bottom: 1.5rem;
  text-align: justify;
  font-size: 0.95rem;
}

.about__images {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  height: 300px;
  /* Mobile height */
  max-width: 90%;
  /* Limit width */
  margin: 0 auto;
  position: relative;
  order: -1;
  /* Images first on mobile */
}

.about__image-wrapper {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.about__image-wrapper--1 {
  grid-column: 1 / span 4;
  grid-row: 1 / span 4;
  z-index: 1;
}

.about__image-wrapper--2 {
  grid-column: 3 / span 4;
  grid-row: 3 / span 4;
  z-index: 2;
}

.about__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.about__image-wrapper:hover .about__image {
  transform: scale(1.03);
}

/* ==================== CATEGORIES SECTION ==================== */
.category__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* 2 columns on mobile */
  gap: 1rem;
}

.category-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1 / 1;
}

.category-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-card:hover .category-card__image {
  transform: scale(1.05);
}

.category-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

.category-card__title {
  color: #fff;
  font-size: 1.1rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  text-align: center;
}

/* ==================== GOLD PIGGY BANK SECTION ==================== */
.piggy-bank {
  background-image: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)), url('../assets/pics/pic6.webp');
  background-size: cover;
  background-position: center;
  padding: 4rem 0;
}

.piggy-bank__container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.piggy-bank__content {
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
  padding: 1.5rem;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

.piggy-bank__description {
  color: #444;
  line-height: 1.7;
  margin-top: 0.8rem;
  margin-bottom: 0;
  font-size: 0.95rem;
}

.piggy-bank__calculator {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: none;
}

.calculator__title {
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: #333;
}

.piggy-bank__live-price {
  font-size: 0.85rem;
  color: #666;
  text-align: center;
  margin-bottom: 1.5rem;
}

.piggy-bank__live-price .live-price-value {
  font-weight: 700;
  color: var(--brand-gold);
}

.calculator__tabs {
  display: flex;
  margin-bottom: 1.5rem;
  background-color: #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
}

.tab-button {
  flex: 1;
  padding: 0.8rem 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  color: #555;
  transition: background-color 0.3s, color 0.3s;
  font-weight: 500;
  text-align: center;
}

.tab-button:not(:last-child) {
  border-left: 1px solid #ddd;
}

.tab-button.active {
  background-color: var(--brand-gold);
  color: #fff;
  font-weight: 600;
}

.calculator__content {
  display: none;
}

.calculator__content.active {
  display: block;
}

.calculator__input-group {
  margin-bottom: 1rem;
}

.calculator__input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #444;
  font-size: 0.85rem;
  text-align: right;
}

.calculator__input-group input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  text-align: left;
  direction: ltr;
  background-color: #fdfdfd;
}

.calculator__input-group input[type="number"]:focus {
  outline: none;
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 2px rgba(160, 140, 91, 0.15);
}

.calculator__equivalent {
  display: block;
  text-align: center;
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: #444;
}

.calculator__equivalent span {
  font-weight: 700;
}

.calculator__button {
  width: 100%;
  padding: 12px 15px;
  font-size: 1rem;
  border-radius: 8px;
}

.calculator__button--sell {
  background-color: #a08c5b;
}

.calculator__button--sell:hover {
  background-color: #8a7a50;
}

/* ==================== MAGAZINE SECTION ==================== */
.magazine {
  background-color: #fff;
}

.magazine__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* Stack on mobile */
.blog-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.blog-card:hover {
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.blog-card__link {
  display: block;
}

.blog-card__image-wrapper {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.blog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card__image {
  transform: scale(1.05);
}

.blog-card__content {
  padding: 1rem 1.2rem;
  text-align: right;
}

.blog-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-card__excerpt {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 0.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-card__readmore {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-gold);
  display: inline-flex;
  align-items: center;
  transition: color 0.3s;
}

.blog-card__readmore i {
  margin-right: 0.2rem;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-card__readmore i {
  transform: translateX(-3px);
}

/* ==================== VALUES SECTION ==================== */
.values {
  background-color: #fff;
}

.values__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
}

/* Stack on mobile */
.value-item i {
  font-size: 2.2rem;
  color: var(--brand-gold);
  line-height: 1;
}

.value-item__title {
  font-size: 1.15rem;
  margin: 0.8rem 0 0.4rem;
}

.value-item__description {
  color: #555;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ==================== TESTIMONIALS SECTION ==================== */
.testimonials {
  background-color: #f9f9f9;
  overflow: hidden;
}

.testimonial-card {
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #eee;
  text-align: center;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.testimonial-card__stars {
  color: #ffc107;
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.testimonial-card__text {
  color: #333;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  font-style: italic;
  flex-grow: 1;
}

.testimonial-card__author {
  color: #555;
  font-weight: 600;
  font-size: 0.9rem;
}

.testimonial-pagination {
  position: static;
  margin-top: 1.5rem;
}

.testimonial-pagination .swiper-pagination-bullet {
  background-color: #ccc;
  opacity: 1;
  width: 8px;
  height: 8px;
  transition: background-color 0.3s, width 0.3s;
}

.testimonial-pagination .swiper-pagination-bullet-active {
  background-color: var(--brand-gold);
  width: 20px;
  border-radius: 4px;
}

/* ==================== INSTAGRAM SECTION ==================== */
.instagram {
  padding-bottom: 0;
}

.instagram__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.3rem;
}

/* 3 columns on mobile */
.instagram-post {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 15px;
  /* Adjust border radius */
}

.instagram-post img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  border-radius: inherit;
}

/* inherit radius */
.instagram-post:hover img {
  transform: scale(1.08);
}

.instagram-post__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.35);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.instagram-post:hover .instagram-post__overlay {
  opacity: 1;
}

/* ==================== FOOTER ==================== */
footer {
  background-color: #222;
  color: #ccc;
  padding-top: 3rem;
}

.footer__container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  text-align: center;
}

/* Stack and center */
.footer__title {
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
  margin-bottom: 1rem;
}

.footer__links,
.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer__link {
  color: #ccc;
  transition: color .3s;
  font-size: 0.9rem;
}

.footer__link:hover {
  color: var(--brand-gold);
}

.footer__contact li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.footer__contact i {
  font-size: 1.1rem;
  color: var(--brand-gold);
}

.footer__social {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
}

.footer__social-link i {
  font-size: 1.5rem;
  color: #ccc;
  transition: color .3s, transform .3s;
}

.footer__social-link:hover i {
  color: var(--brand-gold);
  transform: translateY(-2px);
}

.footer__certifications {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  /* padding-bottom: 1.5rem; */
  /* <-- DELETE THIS LINE */
  flex-wrap: wrap;
  margin-top: 1.5rem;
  /* <-- ADD THIS LINE */
}

.cert-logo img {
  max-height: 40px;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.cert-logo:hover img {
  opacity: 1;
}

.footer__copy {
  text-align: center;
  padding: 1.2rem 0;
  margin-top: 0;
  border-top: 1px solid #444;
  font-size: 0.8rem;
  color: #888;
}


/* ==================== MOBILE NAV ==================== */
.mobile-nav {
  position: fixed;
  top: 0;
  /* Use transform for potentially smoother animation & prevent layout shifts */
  right: 0;
  /* Align to the right edge */
  transform: translateX(100%);
  /* Start completely off-screen to the right */
  width: min(85%, 300px);
  height: 100dvh;
  background: #fff;
  z-index: 1300;
  padding: 15px;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  visibility: hidden;
  /* Start hidden */
  opacity: 0;
  /* Start faded out */
  /* Transition transform, opacity, and visibility */
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.3s ease-out,
    visibility 0s linear 0.35s;
  /* Hide visibility after transform finishes */
}

/* This rule is crucial for showing the menu */
body.mobile-nav-active .mobile-nav {
  transform: translateX(0);
  /* Slide in from the right */
  visibility: visible;
  /* Make visible */
  opacity: 1;
  /* Fade in */
  transition-delay: 0s, 0s, 0s;
  /* Remove delays when becoming active */
}

/* Ensure body overlay is below mobile nav */
body.mobile-nav-active::before {
  z-index: 1250;
  /* Below mobile nav (1300), above header (1000) */
  opacity: 1;
  visibility: visible;
  /* Ensure overlay is visible */
  transition: opacity 0.3s ease, visibility 0s linear;
}

body:not(.mobile-nav-active)::before {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
  /* Delay hiding */
}

/* Removed redundant [aria-hidden] rule */
/* Remove this rule if it exists, rely solely on the body class */
/* .mobile-nav[aria-hidden="false"] { right:0; } */
.mobile-nav[aria-hidden="false"] {
  right: 0;
}

.mobile-close {
  background: none;
  border: none;
  font-size: 22px;
  color: #666;
  cursor: pointer;
  align-self: flex-start;
  padding: 5px;
  margin-bottom: 0.8rem;
}

.mobile-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
}

.mobile-list a {
  padding: 10px 8px;
  display: block;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.95rem;
  color: #333;
}

.mobile-list a:hover {
  color: var(--brand-gold);
}

/* --- New Mobile Nav Submenu Styles --- */
.mobile-list {
  gap: 0;
  /* Remove gap for bordered items */
}

.mobile-item details {
  overflow: hidden;
}

.mobile-item .mobile-link {
  padding: 12px 8px;
  display: block;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.95rem;
  color: #333;
}

.mobile-list a.mobile-link:hover {
  color: var(--brand-gold);
}

.mobile-item summary.mobile-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.mobile-item summary.mobile-link:hover {
  color: var(--brand-gold);
}

.mobile-item summary.mobile-link::marker,
.mobile-item summary.mobile-link::-webkit-details-marker {
  display: none;
  /* Hide default disclosure triangle */
}

.mobile-item summary.mobile-link i {
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}

.mobile-item details[open]>summary.mobile-link i {
  transform: rotate(180deg);
}

/* This rule is for the <ul> itself (no animation) */
.mobile-submenu {
  padding: 0;
  margin: 5px 10px 5px 0;
  /* Apply margins to the ul */
  background-color: #fcfcfc;
  border-right: 2px solid var(--brand-gold);
  overflow: hidden;
  /* <-- ADD THIS LINE */
}

/* mobile submenu — JS-driven height animation (replace existing grid-based rules) */
.mobile-submenu__wrapper {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: height 320ms cubic-bezier(.22, .9, .31, 1),
    opacity 220ms ease,
    transform 280ms cubic-bezier(.22, .9, .31, 1);
  will-change: height, opacity, transform;
}

/* When the <details> is open we set aria-hidden via JS and the JS sets an explicit height.
   If JS is disabled we provide a fallback using grid trick you already had (keeps accessibility). */
.mobile-item details[open]>.mobile-submenu__wrapper {
  /* keep fallback styles for non-JS environments */
  opacity: 1;
  transform: translateY(0);
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .mobile-submenu__wrapper {
    transition: none !important;
    transform: none !important;
  }
}

.mobile-submenu li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  padding: 10px 12px;
  color: #444;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-submenu li:last-child a {
  border-bottom: none;
}

.mobile-submenu li a:hover {
  background-color: #f5f5f5;
  color: var(--brand-gold);
}

.mobile-submenu li a i {
  font-size: 1.1rem;
  color: #888;
}

.mobile-submenu li.submenu-divider a {
  border-top: 1px dashed #ddd;
  font-weight: bold;
  color: #222;
}

/* Add this near the other .mobile-submenu styles */

.mobile-group-title {
  padding: 12px 12px 4px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-gold);
  background-color: #fcfcfc;
  letter-spacing: 0.5px;
  border-bottom: none;
  display: block;
  pointer-events: none; /* Not clickable */
}

/* Add a subtle divider before group titles (except the first one) */
.mobile-group-title:not(:first-child) {
  margin-top: 8px;
  border-top: 1px dashed #e0e0e0;
}

/* --- End New Mobile Nav Styles --- */

/* ==================== SEARCH OVERLAY ==================== */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(34, 34, 34, 0.4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 1200;
  
  display: none; /* <-- START HIDDEN */
  opacity: 0;
  
  transition: opacity 0.3s ease-in-out;
  padding: 0;
  
  /* Use flex */
  align-items: flex-start;
  /* Align modal to top */
  justify-content: center;
  /* Center horizontally */
}

body.modal-is-active .search-overlay {
  display: flex; /* <-- This turns it ON */
  opacity: 1;
}

/* This just sets the size of the search modal */
.search-modal {
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  /* The animation is now handled by .modal-content */
}

/* Slide down */
.search-overlay__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  height: 60px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.search-overlay .logo-svg {
  height: 30px;
}

.search-overlay .logo-svg path,
.search-overlay .search-close i {
  fill: #222;
  color: #222;
}

.search-overlay .search-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
}

.search-overlay__content {
  padding: 1.5rem 1.5rem 1rem;
  text-align: center;
  flex-shrink: 0;
}

.search-form__input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid #ddd;
  border-radius: 0;
  font-size: 1.5rem;
  font-family: 'PeydaWeb', sans-serif;
  text-align: center;
  padding: 0.5rem 0;
  color: #222;
  font-weight: 400;
  transition: border-color 0.3s ease;
}

.search-form__input::placeholder {
  color: #ccc;
  font-weight: 300;
}

.search-form__input:focus {
  outline: none;
  border-bottom-color: var(--brand-gold);
}

.search-suggestions {
  margin-top: 1rem;
}

.search-suggestions__title {
  font-size: 0.75rem;
  color: #999;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.search-suggestions__list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
}

.search-suggestions__list a {
  padding: 0.4rem 0.8rem;
  border: 1px solid #ddd;
  border-radius: 15px;
  font-size: 0.85rem;
  transition: background-color 0.2s, border-color 0.2s;
}

.search-suggestions__list a:hover {
  background-color: #f7f7f7;
  border-color: #ccc;
}

/* --- ADD THIS NEW BLOCK --- */

/* This sets the "hidden" state for the animation */
.search-suggestions__list a {
  opacity: 0;
  transform: translateY(10px);
  transition: background-color 0.2s, border-color 0.2s, opacity 0.3s ease, transform 0.3s ease;
}

/* This makes the links visible when the MODAL is active */
body.modal-is-active .search-suggestions__list a {
  opacity: 1;
  transform: translateY(0);
}

/* This creates the staggered "one-by-one" delay */
body.modal-is-active .search-suggestions__list a:nth-child(1) { transition-delay: 0.20s; }
body.modal-is-active .search-suggestions__list a:nth-child(2) { transition-delay: 0.25s; }
body.modal-is-active .search-suggestions__list a:nth-child(3) { transition-delay: 0.30s; }
body.modal-is-active .search-suggestions__list a:nth-child(4) { transition-delay: 0.35s; }
body.modal-is-active .search-suggestions__list a:nth-child(5) { transition-delay: 0.40s; }

/* --- END OF NEW BLOCK --- */

.search-results {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem 1.5rem;
  display: none;
  max-height: calc(90vh - 180px);
  /* Adjust based on header/content height */
}

.search-results.is-active {
  display: block;
}

.search-results__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.search-results .product-card__name {
  font-size: 0.9rem;
}

.search-results .product-card__price {
  font-size: 0.85rem;
}


/* ==================== MODALS (Login & Cart) ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(34, 34, 34, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 10000;
  opacity: 0;
  /* Start hidden */
  visibility: hidden;
  /* Start hidden */
  transition: opacity 0.3s ease-in-out, visibility 0s 0.3s;
  /* Control visibility */
  padding: 5vh 1rem;
  /* Padding for centering */
  overflow-y: auto;
  display: flex;
  align-items: center;
  /* Center vertically - Applied globally now */
  justify-content: center;
}

body.modal-is-active .modal-overlay {
  opacity: 1;
  /* Fade in */
  visibility: visible;
  /* Make visible */
  transition-delay: 0s;
  /* Ensure visibility transition happens immediately */
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  /* Rounded corners globally */
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
  /* Center horizontally */
  width: auto;
  /* Allow auto width based on content */
  max-width: 90%;
  /* Max width for mobile */
  position: relative;
  overflow: hidden;
  opacity: 0;
  /* Start hidden */
  transform: translateY(-20px) scale(0.98);
  /* Initial animation state - Applied globally */
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  max-height: 90vh;
  /* Limit height */
  display: flex;
  flex-direction: column;
}

body.modal-is-active .modal-content {
  opacity: 1;
  /* Fade in content */
  transform: translateY(0) scale(1);
  /* Animate in - Applied globally */
}

.modal-close {
  position: absolute;
  top: 8px;
  left: 8px;
  background: none;
  border: none;
  font-size: 22px;
  color: #888;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  z-index: 10;
}

.modal-close:hover {
  color: #333;
}

.modal-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #eee;
  text-align: center;
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #333;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex-grow: 1;
}

/* Allow body to scroll */
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #eee;
  background-color: #f9f9f9;
  flex-shrink: 0;
}

.modal-button {
  width: 100%;
  padding: 12px 18px;
  font-size: 1rem;
}

/* Login Modal Specific */
.login-form .input-group {
  margin-bottom: 1rem;
}

.login-form label {
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.login-form input {
  padding: 10px 14px;
  font-size: 0.95rem;
  font-family: 'PeydaWeb', sans-serif;
}

.modal-note {
  font-size: 0.8rem;
  margin-top: 1rem;
}

/* Cart Modal Specific */
.cart-modal {
  max-width: 500px;
}

.cart-modal .modal-body {
  padding: 0;
}

/* Remove padding if using items */
.cart-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: #888;
}

.cart-empty i {
  font-size: 3rem;
  margin-bottom: 0.8rem;
}

.cart-empty p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.cart-total {
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.cart-item {
  display: flex; /* Added this */
  align-items: center; /* Added this */
  gap: 0.8rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f0f0f0; /* Moved border here from HTML */
}

/* Ensure the last item doesn't have a border */
.cart-item:last-child {
  border-bottom: none;
}

.cart-item__image {
  width: 60px;
  height: 60px;
}

.cart-item__name {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.cart-item__price {
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.cart-item__quantity button {
  width: 22px;
  height: 22px;
}

.cart-item__quantity span {
  padding: 0 0.6rem;
}

.cart-item__remove {
  font-size: 1.3rem;
}


/* ==================== TABLET & UP ==================== */
@media (min-width: 769px) {
  .container {
    padding: 0 24px;
  }

  :root {
    --header-height: var(--header-height-tablet);
  }

  .site-header {
    height: var(--header-height-tablet);
  }

  .header-inner {
    padding: 0 20px;
    /* Adjust tablet padding */
    /* display: flex; Already set */
    /* justify-content: space-between; Already set */
  }

  .header-side {
    /* Ensure sides have enough flexibility */
    flex-basis: 0;
    /* Allow shrinking/growing */
  }

  .header-left {
    flex-grow: 1;
    justify-content: flex-start;
    flex-shrink: 1;
    /* <-- ADD THIS LINE */
    min-width: 0;
    /* <-- ADD THIS LINE */
  }

  /* Allow left side to grow */
  .header-center {
    flex-grow: 0;
    flex-shrink: 0;
    /* Don't grow/shrink logo container */
  }

  .header-right {
    flex-grow: 1;
    justify-content: flex-end;
    flex-shrink: 1;
    min-width: 0;
  }

  .header-gold-price {
    display: block;
    /* Show on tablet and up */
  }

  /* Allow right side to grow */

  .burger-btn {
    display: none;
  }

  /* Removed !important */
  .desktop-nav {
    display: flex;
    align-items: center;
  }

  .nav-list {
    display: flex;
    /* Explicitly set flex */
    flex-direction: row;
    /* Ensure horizontal layout */
    align-items: center;
    /* Align items vertically */
    padding: 0;
    margin: 0;
    list-style: none;
    flex-wrap: nowrap;
    /* Prevent wrapping */
  }

  .nav-item {
    display: flex;
    /* Ensure items behave correctly */
    align-items: center;
  }

  .logo-svg {
    height: 70px;
    margin: auto 0;
  }

  /* INCREASED Tablet logo height */

  .mega-menu {
    top: var(--header-height-tablet);
    /* Align with tablet header height */
  }

  .icon-btn {
    font-size: 24px;
  }

  /* Slightly larger desktop icons */
  /* Ensure nav list items don't wrap unexpectedly */
  .nav-list {
    flex-wrap: nowrap;
    /* Prevent wrapping */
  }

  /* Show swiper arrows and adjust positioning */
  .section .swiper-button-next,
  .section .swiper-button-prev {
    display: flex;
    /* Show arrows */
    /* You can adjust size slightly if needed, but default might be fine */
    /* Example: Smaller arrows for tablet */
    /* width: 30px; */
    /* height: 30px; */
    /* margin-top: -15px; */
  }

  .section .swiper-button-next:after,
  .section .swiper-button-prev:after {
    font-size: 1rem !important;
    /* Smaller icons */
  }

  .section .swiper-button-next {
    margin-right: -13px;
    top: 55%;
  }

  /* Slightly more space */
  .section .swiper-button-prev {
    margin-left: -13px;
    top: 55%;
  }

  /* Slightly more space */
  .about__container {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
  }

  .about__content {
    text-align: right;
  }

  .about__images {
    order: 0;
    height: 350px;
    max-width: 500px;
  }

  /* Reset order, adjust height */

  .category__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }

  /* 4 columns */
  .category-card__title {
    font-size: 1.3rem;
  }

  .piggy-bank__container {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .piggy-bank {
    padding: 5rem 0;
  }

  .piggy-bank__content {
    text-align: right;
    padding: 2rem;
  }

  .piggy-bank__calculator {
    padding: 2rem;
  }

  .calculator__title {
    font-size: 1.5rem;
  }

  .tab-button {
    font-size: 0.9rem;
    padding: 0.9rem 1rem;
  }

  .magazine__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  /* 2 columns */

  .values__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  /* 2 columns */

  .instagram__grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
  }

  /* 6 columns */

  .footer__container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    text-align: right;
  }

  .footer__contact li {
    justify-content: flex-start;
  }

  .footer__social {
    justify-content: flex-start;
  }

  .footer__certifications img {
    max-height: 50px;
  }

  .footer__copy {
    font-size: 0.9rem;
  }

  /* Modals - Center Vertically */
  body.modal-is-active .modal-content {
    transform: translateY(0) scale(1);
  }

  .login-modal {
    max-width: 450px;
  }

  /* Keep specific max-widths */
  .cart-modal {
    max-width: 500px;
  }

  /* Search Modal - Keep top position but centered */
  .search-overlay {
    align-items: flex-start;
    padding-top: 8vh;
  }

  .search-modal {
    border-radius: 12px;
    transform: translateY(-100%);
    /* Keep slide down animation */
    max-width: 700px;
    margin: 0 auto;
    max-height: 80vh;
  }

  body.search-is-active .search-modal {
    transform: translateY(0);
  }

  .search-form__input {
    font-size: 1.8rem;
  }

  .search-results__grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .footer__content .footer__certifications {
    justify-content: flex-start;
    /* Aligns with the right-aligned column's start */
  }
}

/* ==================== DESKTOP & UP ==================== */
@media (min-width: 1025px) {
  :root {
    --header-height: var(--header-height-desktop);
  }

  .site-header {
    height: var(--header-height-desktop);
  }

  .header-inner {
    padding: 0 28px;
  }

  .logo-svg {
    height: 70px;
    margin: auto 0;
  }

  /* INCREASED Desktop logo height */
  .nav-link {
    padding: 8px 20px;
  }

  .mega-menu {
    top: var(--header-height-desktop);
  }

  /* Ensure swiper arrows aren't pushed out again */
  .section .swiper-button-next {
    margin-right: -25px;
    top: 55%;
  }

  /* Slightly more space */
  .section .swiper-button-prev {
    margin-left: -25px;
    top: 55%;
  }

  /* Slightly more space */
  .section .swiper-button-next,
  .section .swiper-button-prev {
    width: calc(var(--swiper-navigation-size) / 44 * 27);
    /* Restore default width */
    height: var(--swiper-navigation-size);
    margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
  }

  .section .swiper-button-next:after,
  .section .swiper-button-prev:after {
    font-size: 1.5rem !important;
    /* Restore default icon size */
  }

  .hero {
    height: 100vh;
  }

  .hero__title {
    font-size: 3.5rem;
  }

  .about__images {
    height: 400px;
  }

  .magazine__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* 3 columns */

  .values__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* 4 columns */

  .footer__certifications img {
    max-height: 60px;
  }
}

/* Add any other specific overrides for very large screens if needed */

/* --- Add this rule for the body overlay z-index --- */
body.mobile-nav-active::before,
body.search-is-active::before,
body.modal-is-active::before {
  /* ... keep existing styles ... */
  z-index: 1250;
  /* Ensure overlay is below mobile nav (1300) but above header (1000) */
}

/* allow browser to show scrollbar only when needed */
html {
  overflow-y: auto;
  /* was 'scroll' which forces a visible scrollbar at all times */
}

/* 1) Make a single header-height var that follows breakpoints (add to :root) */
:root {
  --header-height: var(--header-height-mobile);
  /* default for mobile */
}

/* 2) Ensure hero reserves the actual header height for all breakpoints */
.hero {
  /* replace existing padding-top: var(--header-height-mobile); */
  padding-top: var(--header-height);
}

/* 3) Constrain logo to the header height to avoid layout breakage */
.logo {
  display: inline-flex;
  align-items: center;
  height: var(--header-height);
  /* keep the logo container same height as header */
  padding: 0 8px;
}

.logo-svg {
  height: calc(var(--header-height) - 16px);
  /* small inner padding */
  width: auto;
  display: block;
  margin: 0;
  flex-shrink: 0;
  max-height: 100%;
}

/* 4) Remove debug outlines (if still present) */
/* DELETE or comment out any rule like:
   * { outline: 1px dashed rgba(255,0,0,0.06); }
   (leftover from debugging) 
*/

/* 5) Keep header above hero/video (just to be explicit) */
.site-header {
  z-index: 1000;
}

/* already present but safe to keep */
.hero__video {
  z-index: 1;
}

/* ensure video remains below header */

/* ==================== NERKHNAME PAGE ==================== */
.nerkhname-page {
  /* Add padding to push content below the fixed header */
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 3rem;
  min-height: 70vh;
  /* Ensure page isn't too short */
}

.nerkhname-page .section__title {
  font-size: 2rem;
}

.price-table {
  width: 100%;
  max-width: 800px;
  /* Limit table width */
  margin: 0 auto;
  border-collapse: collapse;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  border-radius: 8px;
  overflow: hidden;
  /* To respect border-radius */
  font-size: 0.95rem;
}

.price-table th,
.price-table td {
  padding: 1rem 1.5rem;
  text-align: right;
  border-bottom: 1px solid #eee;
}

.price-table th {
  background-color: #f9f9f9;
  font-weight: bold;
  color: var(--brand-gold);
  font-size: 1.05rem;
}

.price-table tbody tr:last-child td {
  border-bottom: none;
}

.price-table tbody tr:nth-child(even) {
  background-color: #fdfdfd;
}

.price-table tbody tr:hover {
  background-color: #f5f5f5;
}

.price-table td.price-value {
  text-align: left;
  font-weight: bold;
  color: #333;
  font-family: sans-serif;
  /* Use a standard font for numbers */
  direction: ltr;
}

@media (max-width: 768px) {
  .nerkhname-page {
    padding-top: calc(var(--header-height) + 2rem);
  }

  .price-table th,
  .price-table td {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }

  .price-table th {
    font-size: 0.95rem;
  }
}

/* ===== stick the live gold price out under the far-left of the header ===== */
/* Put this inside or after your existing @media (min-width: 769px) rules */
@media (min-width: 769px) {

  /* position the price relative to the fixed header */
  .site-header {
    /* ensure site-header is the positioned ancestor */
    position: fixed;
    /* already set in your file, kept here for clarity */
  }

  .header-gold-price {
    display: block;
    /* ensure visible on tablet+ */
    position: absolute;
    /* taken out of header flow */
    left: 16px;
    /* distance from the left edge of the header — tweak as needed */
    top: 100%;
    /* right under the header */
    transform: translateY(8px);
    /* small gap below header; tweak to taste */
    z-index: 1200;
    /* above hero, below modal overlays */
    pointer-events: auto;
    margin: 0;
    /* visual styling to match header look */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    overflow: visible;
    background: transparent;
    /* keep background transparent; gold-price-link provides visual */
  }

  /* tighten the link inside the pill and ensure proper padding / alignment */
  .header-gold-price .gold-price-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.38);
    /* dark translucent pill on hero */
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    font-size: 0.9rem;
  }

  /* If header gets scrolled/opened, change pill background so it still reads on light header */
  .site-header.scrolled .header-gold-price .gold-price-link,
  .site-header.menu-is-open .header-gold-price .gold-price-link {
    background-color: rgba(255, 255, 255, 0.95);
    color: #222;
  }

  /* Small tweak for very large screens if you want it closer to the outer edge */
  @media (min-width: 1400px) {
    .header-gold-price {
      left: 22px;
    }
  }
}

/* Live Gold Price (append to bottom of style.css) */
.header-gold-price {
  position: fixed;
  top: 70px;
  /* fallback if --header-height-desktop not set */
  left: 0;
  transform: translateX(-12%);
  z-index: 9999;
  background: rgba(12, 8, 6, 0.55);
  padding: 8px 12px;
  border-radius: 0 10px 10px 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transition: transform 260ms ease, opacity 260ms ease;
  display: inline-flex;
  align-items: center;
}

.header-gold-price .gold-price-link {
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
}

.header-gold-price .gold-price-icon {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* hidden state when scrolling down */
.header-gold-price.is-hidden {
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
}

/* mobile: keep visible under the mobile header */
@media (max-width: 768px) {
  .header-gold-price {
    top: 56px;
    /* fallback for mobile header height */
    transform: translateX(-6%);
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 0 8px 8px 0;
  }

  .gold-price-value {
    color: #ffffff;
  }
}

/* Make gold price value black on mobile */
@media (max-width: 768px) {
  .header-gold-price .gold-price-value {
    color: #ffffff !important;
  }
}

/* ==================== NERKHNAME PAGE RESPONSIVE STYLES ==================== */
.nerkhname-page {
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 2rem;
  min-height: 70vh;
  direction: rtl;
}

.nerkhname-page .section__title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

/* Price Pills Responsive */
.price-pills-container {
  max-width: 100%;
  margin: 0 auto;
}

.price-pills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.price-pill {
  background: linear-gradient(135deg, #ffffff 0%, #f8f6f0 100%);
  border: 1px solid #e8e3d5;
  border-radius: 16px;
  padding: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(160, 140, 91, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.price-pill::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(to bottom, var(--brand-gold), #d4af37);
  border-radius: 0 16px 16px 0;
}

.product-name {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
  flex: 1;
  margin-left: 0.5rem;
}

.price-value {
  background: linear-gradient(135deg, var(--brand-gold), #b89a3c);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: 0 2px 10px rgba(160, 140, 91, 0.3);
  min-width: 120px;
  text-align: center;
  white-space: nowrap;
}

/* Prediction Panel Responsive */
.prediction-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 900px) {
  .prediction-panel {
    grid-template-columns: 1fr 360px;
  }
}

#prediction-form {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  height: fit-content;
}

#prediction-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-align: right;
  color: #333;
}

#predict-item,
#predict-price,
#predict-week,
#predict-name,
#predict-mobile { /* Added this */
  width: 100%;
  padding: 12px;
  border: 1px solid #e8e3d5;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

#predict-price,
#predict-week {
  text-align: left;
  direction: ltr;
}

#predict-item:focus,
#predict-price:focus,
#predict-week:focus,
#predict-name:focus {
  outline: none;
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 3px rgba(160, 140, 91, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 480px) {
  .form-row {
    grid-template-columns: 1fr 140px;
  }
}

.form-buttons {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.form-buttons .button {
  flex: 1;
  min-width: 120px;
  white-space: nowrap; /* Prevents text wrapping */
  padding: 12px 10px; /* Adjust padding for better fit */
}

#clear-predictions {
  background: #f8f8f8;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px 18px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s ease;
}

#clear-predictions:hover {
  background: #eee;
}

/* Winners List */
/* Smooth winners-list hover (replace existing #winners-list li rules) */
#winners-list {
  margin: 0;
  padding-right: 1rem;
  list-style: decimal;
  transition: transform 200ms cubic-bezier(0.22, 0.9, 0.26, 1),
              background-color 180ms ease;
}

#winners-list li {
  margin-bottom: 0.8rem;
  padding: 0.8rem;
  background: #f8f8f8;
  border-radius: 8px;
  border-right: 3px solid var(--brand-gold);
  font-size: 0.9rem;

  /* Force GPU compositing and hint the browser for a smooth transform */
  will-change: transform, opacity;
  transform: translateZ(0);            /* avoid layout animation */
  backface-visibility: hidden;

  /* Only animate transform & background-color (no 'all') */
  transition: transform 200ms cubic-bezier(0.22, 0.9, 0.26, 1),
              background-color 180ms ease;
}

/* Hover uses translate3d (forces compositor, smoother) */
#winners-list li:hover {
  background: #f0f0f0;
  transform: translate3d(-6px, 0, 0);
  transition: transform 200ms cubic-bezier(0.22, 0.9, 0.26, 1),
              background-color 180ms ease;
}

/* Latest Articles Grid */
#latest-articles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* Section Header Improvements */
.nerkhname-page .section__header {
  text-align: center;
  margin-bottom: 2rem;
}

.nerkhname-page .section__header::after {
  display: none;
}

/* Control Buttons */
.control-buttons {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.control-buttons .button {
  min-width: 140px;
}

/* Timestamp */
#last-updated {
  display: block;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .nerkhname-page {
    padding-top: calc(var(--header-height) + 1rem);
    padding-bottom: 1rem;
  }
  
  .nerkhname-page .section__title {
    font-size: 1.5rem;
  }
  
  .price-pills-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  
  .price-pill {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
    gap: 0.8rem;
  }
  
  .product-name {
    margin-left: 0;
    font-size: 0.9rem;
  }
  
  .price-value {
    min-width: 100px;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }
  
  #prediction-form {
    padding: 1rem;
  }
  
  .form-buttons {
    flex-direction: column;
  }
  
  .form-buttons .button,
  #clear-predictions {
    width: 100%;
  }
  
  #latest-articles {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .nerkhname-page .section__title {
    font-size: 1.3rem;
  }
  
  .price-pill {
    padding: 0.8rem;
  }
  
  .control-buttons .button {
    min-width: 120px;
    font-size: 0.9rem;
    padding: 10px 15px;
  }
  
  #prediction-form {
    padding: 0.8rem;
  }
  
  #predict-item,
  #predict-price,
  #predict-week,
  #predict-name {
    padding: 10px;
    font-size: 0.9rem;
  }
}

/* Gold price value black on mobile */
@media (max-width: 768px) {
  .header-gold-price .gold-price-value {
    color: #fff !important;
  }
}

/* Force header visibility on nerkhname page */
.nerkhname-page .site-header {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid #eee !important;
  box-shadow: 0 4px 12px rgba(22, 22, 22, 0.05) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  backdrop-filter: blur(8px) !important;
}

.nerkhname-page .logo-svg path {
  fill: #262626 !important;
}

.nerkhname-page .icon-btn,
.nerkhname-page .nav-link {
  color: #222 !important;
}

.nerkhname-page .gold-price-link {
  color: #333 !important;
  background-color: rgba(0, 0, 0, 0.05) !important;
}

/* --- Add this to your css/style.css file --- */

/* Price flash animations */
.price-pill.price-up {
  /* Flashes green for a price increase */
  animation: flash-green 1.0s ease-out;
}

.price-pill.price-down {
  /* Flashes red for a price decrease */
  animation: flash-red 1.0s ease-out;
}

.price-pill.price-no-change {
  /* A subtle flash even if no change */
  animation: flash-gray 0.7s ease-out;
}

/* --- Find and replace your existing keyframes with these --- */

@keyframes flash-green {
  0% { 
    background-color: #c0f0c0; /* Brighter green */
    border-color: #8fbc8f; /* Keep border color change */
    transform: scale(1.05); /* Bigger pop */
    /* ADD: Inset shadow to act as a 2px thick border */
    box-shadow: 0 4px 20px rgba(160, 140, 91, 0.08), inset 0 0 0 2px #8fbc8f; 
  }
  50% {
    background-color: #dfffe0; /* Fade out color */
    transform: scale(1.02);
    /* FADE: Inset shadow back to 0px */
    box-shadow: 0 4px 20px rgba(160, 140, 91, 0.08), inset 0 0 0 0px #8fbc8f;
  }
  100% { 
    background-color: #ffffff; 
    border-color: #e8e3d5;
    transform: scale(1);
    /* Back to normal shadow */
    box-shadow: 0 4px 20px rgba(160, 140, 91, 0.08); 
  }
}

@keyframes flash-red {
  0% { 
    background-color: #ffc0c0; /* Brighter red */
    border-color: #c08080; /* Keep border color change */
    transform: scale(1.05); /* Bigger pop */
    /* ADD: Inset shadow to act as a 2px thick border */
    box-shadow: 0 4px 20px rgba(160, 140, 91, 0.08), inset 0 0 0 2px #c08080;
  }
  50% {
    background-color: #ffe0e0; /* Fade out color */
    transform: scale(1.02);
    /* FADE: Inset shadow back to 0px */
    box-shadow: 0 4px 20px rgba(160, 140, 91, 0.08), inset 0 0 0 0px #c08080;
  }
  100% { 
    background-color: #ffffff; 
    border-color: #e8e3d5;
    transform: scale(1);
    /* Back to normal shadow */
    box-shadow: 0 4px 20px rgba(160, 140, 91, 0.08); 
  }
}

@keyframes flash-gray {
  0% { background-color: #f0f0f0; }
  100% { background-color: #ffffff; }
}

/* --- Add this to your css/style.css file --- */

/* Prediction Form Button Animation */
.form-buttons .button {
  /* Ensure a smooth transition for background-color */
  transition: background-color 0.3s ease, transform 0.1s;
  position: relative;
  overflow: hidden;
}

.form-buttons .button span {
  /* This will be the original text, e.g., "ثبت پیش‌بینی" */
  display: inline-block;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.form-buttons .button::after {
  /* This will be the success message, e.g., "ثبت شد!" */
  content: 'ثبت شد! \2713'; /* \2713 is a checkmark */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  
  /* Start hidden */
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Success State */
.form-buttons .button.is-success {
  background-color: #28a745; /* Green */
  pointer-events: none; /* Disable button temporarily */
}

.form-buttons .button.is-success span {
  /* Hide original text */
  opacity: 0;
  transform: translateY(-100%);
}

.form-buttons .button.is-success::after {
  /* Show success text */
  opacity: 1;
  transform: translateY(0);
}

/* --- Add this to your css/style.css file --- */

/* Winner List Animation */
#winners-list li {
  /* Add transition to help smooth out changes */
transition: transform 200ms cubic-bezier(0.22, 0.9, 0.26, 1),
              background-color 180ms ease;
}

/* If you animate a 'new winner' flash, keep it brief and avoid layout-affecting props */
#winners-list li.winner-new {
  animation: flash-winner 1.2s ease-out;
  transition: transform 200ms cubic-bezier(0.22, 0.9, 0.26, 1),
              background-color 180ms ease;
}

@keyframes flash-winner {
  0% { background-color: #fff9c4; border-right-color: #fbc02d; opacity: 0.9; }
  30% { background-color: #fff6b3; opacity: 1; }
  100% { background-color: #f8f8f8; opacity: 1; }
}

/* --- End of CSS additions --- */

/* ==================== PRODUCT LISTING PAGE (PLP) ==================== */
.plp-page {
  /* Add padding to push content below the fixed header */
  padding-top: var(--header-height);
}

.plp-banner {
  position: relative;
  height: 30vh;
  min-height: 200px;
  max-height: 300px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.plp-banner__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%; /* Adjust as needed */
  position: absolute;
  z-index: 1;
}

.plp-banner__overlay {
  position: relative;
  z-index: 3;
  color: #fff;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.6);
}

.plp-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.plp-banner__title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.plp-banner__description {
  font-size: 1rem;
}

.plp-container {
  display: grid;
  grid-template-columns: 1fr; /* Mobile-first: single column */
  gap: 1.5rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* --- Filters Sidebar --- */
.filters-sidebar {
  background-color: #fcfcfc;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  padding: 1rem;
  height: fit-content;
  display: none; /* Hidden on mobile by default */
}

.filters-sidebar.active {
  display: block; /* Shown when mobile button is clicked */
}

.filter-group {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
}
.filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.filter-group__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--brand-gold);
}

.filter-group__list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.filter-group__list label {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  cursor: pointer;
}

.filter-group__list input[type="checkbox"] {
  margin-left: 0.6rem;
  /* Visual spacing */
  accent-color: var(--brand-gold);
}

/* --- Add this to your css/style.css file --- */

/* Filter Accordion Styles */
.filter-group__title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  /* Add a subtle hover effect */
  transition: color 0.2s ease;
}

.filter-group__title:hover {
  color: #8a7a50; /* Darker gold */
}

.filter-group__title i {
  font-size: 1.3rem;
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Content wrapper style */
.filter-group__content {
  overflow: hidden;
  opacity: 1;
  height: auto; /* Will be set by JS */
  transition: height 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), 
              opacity 0.3s ease-in-out,
              margin-top 0.3s ease;
}

/* Collapsed state */
.filter-group.collapsed .filter-group__title i {
  transform: rotate(-90deg);
}

.filter-group.collapsed .filter-group__content {
  opacity: 0;
  height: 0 !important; /* JS will set this, but !important helps override */
  margin-top: 0;
}

/* --- End of CSS additions --- */

.price-slider-placeholder .price-slider {
  width: 100%;
  margin-top: 0.5rem;
}

.price-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: #ddd;
  border-radius: 5px;
  outline: none;
  margin: 15px 0;
}

/* Slider Thumb (Handle) */
.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-gold);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: transform 0.1s;
}

.price-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.price-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-gold);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.price-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.3rem;
}

/* --- Product Grid --- */
.product-grid-container {
  width: 100%;
}

.plp-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

.mobile-filter-toggle {
  display: inline-flex; /* Show on mobile */
  align-items: center;
  gap: 0.4rem;
  background-color: #f7f7f7;
  color: #333;
  padding: 8px 12px;
  font-size: 0.9rem;
}
.mobile-filter-toggle i {
  font-size: 1.1rem;
}
.mobile-filter-toggle:hover {
  background-color: #eee;
}

.plp-sort {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.plp-sort select {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 0.9rem;
  background-color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
  gap: 1.5rem 1rem;
}

/* --- Add this to your css/style.css file --- */

/* Product Grid Loading State */
.product-grid-container {
  position: relative; /* Needed for the overlay */
}

/* This is the overlay */
.product-grid-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(2px);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* This is the spinner */
.product-grid-container::after {
  content: '';
  position: absolute;
  top: 120px; /* Position it down a bit, not at the very top */
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  border: 4px solid #e0e0e0;
  border-top-color: var(--brand-gold);
  border-radius: 50%;
  z-index: 11;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  animation: spin 1s linear infinite;
}

/* The loading animation */
@keyframes spin {
  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

/* This class activates the loading state */
.product-grid-container.is-loading::before,
.product-grid-container.is-loading::after {
  opacity: 1;
  pointer-events: auto;
}

.product-grid-container.is-loading .product-grid {
  opacity: 0.4; /* Fade out the products */
  pointer-events: none;
}

.product-grid {
  transition: opacity 0.3s ease; /* Ensure the grid fades smoothly */
}

/* --- End of CSS additions --- */

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}
.pagination ul {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pagination li a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: background-color 0.2s, color 0.2s;
  background-color: #f5f5f5;
  color: #555;
  min-width: 36px;
  text-align: center;
}
.pagination li a:hover {
  background-color: #eee;
}
.pagination li a.active {
  background-color: var(--brand-gold);
  color: #fff;
  font-weight: 600;
}


/* ==================== PLP TABLET & UP ==================== */
@media (min-width: 769px) {
  .plp-page {
    /* Ensure header is forced visible on this page too */
    padding-top: var(--header-height-tablet);
  }

  /* Force header visibility on PLP */
  .plp-page .site-header {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid #eee !important;
    box-shadow: 0 4px 12px rgba(22, 22, 22, 0.05) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
  }
  .plp-page .logo-svg path {
    fill: #262626 !important;
  }
  .plp-page .icon-btn,
  .plp-page .nav-link {
    color: #222 !important;
  }
  .plp-page .gold-price-link {
    color: #333 !important;
    background-color: rgba(0, 0, 0, 0.05) !important;
  }

  .plp-container {
    grid-template-columns: 260px 1fr; /* Sidebar + Main content */
    gap: 2rem;
  }

  .filters-sidebar {
    display: block; /* Always display sidebar on desktop */
    position: sticky;
    top: calc(var(--header-height-tablet) + 2rem); /* Stick below header */
    padding: 1.5rem;
  }

  .mobile-filter-toggle {
    display: none; /* Hide mobile-only button */
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 columns on tablet */
  }
}

/* ==================== PLP DESKTOP & UP ==================== */
@media (min-width: 1025px) {
  .plp-page {
    padding-top: var(--header-height-desktop);
  }

  .plp-container {
    grid-template-columns: 300px 1fr; /* Wider sidebar */
  }

  .filters-sidebar {
    top: calc(var(--header-height-desktop) + 2rem);
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop, can be 4 */
  }
}

/* --- New Filter Group Styles (for Size & Finish) --- */
.filter-group__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.filter-group__swatches span {
  display: block;
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.filter-group__swatches input[type="checkbox"] {
  display: none; /* Hide the actual checkbox */
}
.filter-group__swatches input[type="checkbox"]:checked + span {
  background-color: var(--brand-gold);
  color: #fff;
  border-color: var(--brand-gold);
}
.filter-group__swatches label:hover span {
  border-color: #aaa;
}

/* ==================== INTERNAL PAGE HEADER FIX ==================== */
/*
  This targets any page with <body class="internal-page">
  and forces the header to be solid and visible from the start.
*/
.internal-page .site-header {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid #eee !important;
  box-shadow: 0 4px 12px rgba(22, 22, 22, 0.05) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  backdrop-filter: blur(8px) !important;
  /* Make all header icons/text dark */
  color: #222 !important;
}

.internal-page .logo-svg path {
  fill: #262626 !important;
}

.internal-page .icon-btn,
.internal-page .nav-link {
  color: #222 !important;
}

/* Fix for hover on non-scrolled internal page */
.internal-page .site-header:not(.scrolled) .nav-item:hover > .nav-link {
  color: var(--brand-gold) !important;
}

/* ==================== PLP LINEAR SORTING ==================== */
.plp-sort {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
}

.plp-sort__label {
  color: #555;
}

.plp-sort-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.plp-sort-list li a {
  position: relative;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #333;
  transition: all 0.2s;
}

/* Add an underline animation */
.plp-sort-list li a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--brand-gold);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.plp-sort-list li a:hover::after,
.plp-sort-list li a.active::after {
  width: 80%;
}

.plp-sort-list li a:hover {
  background-color: #f0f0f0;
}

/* Remove background active state if you use underline, 
   OR keep background and add underline for extra flair */
.plp-sort-list li a.active {
  background-color: transparent; 
  color: var(--brand-gold);
  font-weight: 700;
}

.breadcrumbs {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: #888;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.breadcrumbs a:hover {
  color: var(--brand-gold);
}
.breadcrumbs .current {
  color: #333;
  font-weight: 600;
}
.breadcrumbs .separator {
  font-size: 0.8rem;
  color: #ccc;
}

/* Badges */
.product-badge {
  position: absolute;
  top: 10px;
  left: 10px; /* Left side for Persian RTL */
  background-color: #222;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  z-index: 5;
  text-transform: uppercase;
}
.product-badge.new { background-color: var(--brand-gold); }

/* Floating Actions */
.product-card__actions {
  position: absolute;
  top: 10px;
  right: 10px; /* Right side */
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 6;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}
.product-card:hover .product-card__actions {
  opacity: 1;
  transform: translateX(0);
}
.action-btn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #fff;
  border: none;
  color: #333;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.action-btn:hover {
  background: var(--brand-gold);
  color: #fff;
  transform: scale(1.1);
}

/* --- Add this to your css/style.css file --- */

/* Heartbeat animation */
.action-btn i.is-animating {
  animation: heartbeat 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  25% {
    transform: scale(1.4); /* Pop out */
    opacity: 0.8;
  }
  100% {
    transform: scale(1); /* Return to normal */
    opacity: 1;
  }
}

/* --- Add this to your css/style.css file --- */

/* Quick View button pop animation */
.action-btn i.is-popping {
  animation: quickview-pop 0.5s cubic-bezier(0.33, 1, 0.68, 1);
}

@keyframes quickview-pop {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  30% {
    transform: scale(1.3); /* Pop out */
  }
  100% {
    transform: scale(1); /* Return to normal */
  }
}

/* --- End of CSS additions --- */

/* Fix 2: Color Dots Overlap */
.product-colors {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px; /* Increased gap */
  margin-top: 8px;
  opacity: 0.9;
  flex-wrap: wrap; /* Prevent squeezing */
}

.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block; /* Changed from inline-block */
  box-shadow: 0 0 0 1px #ddd;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  flex-shrink: 0; /* Prevent shrinking */
  margin: 2px; /* Safety margin */
}
.product-colors:hover .color-dot {
  opacity: 0.6; /* Slightly fade all dots when hovering the container */
}

.color-dot:hover {
  transform: scale(1.4); /* Pop the hovered dot */
  opacity: 1; /* Keep the hovered one fully visible */
  box-shadow: 0 0 0 2px var(--brand-gold); /* Add a highlight ring */
}
.color-dot.gold { background: #e6c673; }
.color-dot.white { background: #e8e8e8; }
.color-dot.rose { background: #eeb6a2; }

/* Mobile styling for sidebar */
@media (max-width: 768px) {
  .filters-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 1300; /* This moves it on top of the overlay (which is at 1250) */
    padding: 20px;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    transform: translateX(100%); /* Hidden off-screen */
    transition: transform 0.3s ease-in-out;
    display: block !important; /* Override previous display:none */
    overflow-y: auto;
  }

  .filters-sidebar.active {
    transform: translateX(0); /* Slide in */
  }

  /* Header only visible on mobile */
  .filters-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
  }
  
  .filters-header-mobile h3 {
    font-size: 1.2rem;
    font-weight: bold;
  }
  
  .close-filters {
    color: #333;
    font-size: 1.5rem;
    padding: 0;
  }
}

@media (min-width: 769px) {
  .filters-header-mobile {
    display: none;
  }
}

/* ==================== PRODUCT DETAIL PAGE (PDP) ==================== */
.pdp-page {
  padding-top: calc(var(--header-height) + 1.5rem);
  padding-bottom: 3rem;
  background-color: #fff;
}

/* --- Main Content Grid --- */
.pdp-main-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

@media (min-width: 769px) {
  .pdp-main-content {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

/* --- 1. Gallery --- */
.pdp-gallery {
  width: 100%;
}

.pdp-gallery__main-image {
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  overflow: hidden; /* This is crucial for the zoom effect */
  cursor: zoom-in;
  margin-bottom: 1rem;
}

.pdp-gallery__main-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease; /* Zoom animation */
}

/* Zoom effect: We use transform-origin in JS */
.pdp-gallery__main-image.is-zooming img {
  transform: scale(1.5); /* Adjust zoom level as needed */
}

.pdp-gallery__thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 0.8rem;
}

.pdp-thumbnail {
  border: 2px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: none;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.pdp-thumbnail img {
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
}

.pdp-thumbnail:hover {
  opacity: 1;
  border-color: #ccc;
}

.pdp-thumbnail.active {
  opacity: 1;
  border-color: var(--brand-gold);
  box-shadow: 0 0 8px rgba(160, 140, 91, 0.4);
}

/* --- 2. Details --- */
.pdp-details {
  direction: rtl;
}

.pdp-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.pdp-sku {
  font-size: 0.85rem;
  color: #888;
  display: block;
  margin-bottom: 1rem;
}

.pdp-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--brand-gold);
  margin-bottom: 1.5rem;
}

.pdp-description-short {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #444;
  margin-bottom: 2rem;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 2rem;
}

.pdp-options-group {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pdp-options-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
  min-width: 50px;
}

.pdp-select {
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  min-width: 150px;
}

/* Interactive Color Dot */
.pdp-details .color-dot {
  transform: scale(1.2); /* Make them slightly larger on this page */
}
.pdp-details .color-dot.active {
  transform: scale(1.5);
  box-shadow: 0 0 0 3px var(--brand-gold);
}


/* Quantity Selector */
.pdp-quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.pdp-quantity-selector .quantity-btn {
  background: #f7f7f7;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  font-weight: 600;
  color: #555;
  width: 40px;
  height: 40px;
  transition: background 0.2s;
}
.pdp-quantity-selector .quantity-btn:hover {
  background: #eee;
}

.pdp-quantity-selector input[type="number"] {
  border: none;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  width: 50px;
  height: 40px;
  /* Hide spinner arrows */
  -moz-appearance: textfield;
}
.pdp-quantity-selector input[type="number"]::-webkit-outer-spin-button,
.pdp-quantity-selector input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Actions */
.pdp-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-add-to-cart {
  flex-grow: 1;
  padding: 14px 20px;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(160, 140, 91, 0.3);
}

.pdp-actions .action-btn {
  width: 50px; /* Larger */
  height: 50px;
  font-size: 1.5rem;
}
/* Re-use heart animation */
.pdp-actions .action-btn i.is-animating {
  animation: heartbeat 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

/* Trust Badges */
.pdp-trust-badges {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  color: #555;
  font-size: 0.85rem;
}

@media (min-width: 480px) {
  .pdp-trust-badges {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #f9f9f9;
  padding: 8px 12px;
  border-radius: 6px;
}
.badge-item i {
  font-size: 1.2rem;
  color: var(--brand-gold);
}


/* --- Tabs Section --- */
.pdp-info-tabs {
  margin-top: 4rem;
  border-top: 1px solid #eee;
}

.pdp-tabs__nav {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid #eee;
}

.pdp-tab-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #888;
  padding: 1.2rem 0;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}
.pdp-tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px; /* Align with border */
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--brand-gold);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.pdp-tab-btn:hover {
  color: #333;
}
.pdp-tab-btn.active {
  color: #333;
}
.pdp-tab-btn.active::after {
  transform: scaleX(1);
}

.pdp-tabs__content {
  padding-top: 2rem;
}

.pdp-tab-panel {
  display: none;
  opacity: 0;
  animation: fadeIn 0.4s ease forwards;
}
.pdp-tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.pdp-specs-table {
  width: 100%;
  max-width: 500px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.pdp-specs-table td {
  padding: 0.8rem;
  border-bottom: 1px solid #f0f0f0;
}
.pdp-specs-table tr:last-child td {
  border-bottom: none;
}
.pdp-specs-table td:first-child {
  font-weight: 600;
  color: #333;
  width: 150px;
}

/* --- Related Products Section --- */
.related-products {
  background-color: #fcfcfc;
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid #f0f0f0;
}

/* ==================== ADD TO CART ANIMATION ==================== */

/* This is the small image that flies */
.fly-to-cart-img {
  position: fixed;
  z-index: 9999;
  border: 1px solid var(--brand-gold);
  border-radius: 50%; /* Make it a circle as it flies */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  object-fit: cover;
  
  /* Set the start state (small and at the image) */
  opacity: 1;
  transform: scale(1);
  
  /* This transition is the magic */
  transition: top 0.8s cubic-bezier(0.5, -0.5, 0.7, 0.7), 
              left 0.8s cubic-bezier(0.5, -0.5, 0.7, 0.7),
              transform 0.8s cubic-bezier(0.4, 0, 1, 1),
              opacity 0.8s ease-out;
}

/* This makes the header cart icon jiggle */
.header-icons .cart-btn.is-jiggling {
  animation: cart-jiggle 0.5s ease;
}

@keyframes cart-jiggle {
  0% { transform: scale(1); }
  25% { transform: scale(1.3) rotate(10deg); }
  50% { transform: scale(1.3) rotate(-10deg); }
  75% { transform: scale(1.3) rotate(10deg); }
  100% { transform: scale(1); }
}

/* --- End of CSS additions --- */

/* ==================== BLOG LISTING PAGE (BLP) ==================== */
.blog-page {
  padding-top: calc(var(--header-height));
  padding-bottom: 3rem;
}

/* NEW: 2-Column Container */
.blog-page-container {
  padding-top: 2rem;
  display: grid;
  grid-template-columns: 1fr; /* Mobile-first: sidebar stacks below */
  gap: 3rem;
}

@media (min-width: 992px) {
  .blog-page-container {
    grid-template-columns: 1fr 320px; /* Main content + sidebar */
  }
}

/* === 1. Main Content Column === */
.blog-main-content {
  width: 100%;
}

/* --- Featured Card (This is "the big one") --- */
/* (This style is from our previous step and is correct) */
.blog-featured-card {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(160, 140, 91, 0.1);
  margin-bottom: 3rem;
  border: 1px solid #f0f0f0;
}
.blog-featured-card__link {
  display: grid;
  grid-template-columns: 1fr;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.3s ease;
}
@media (min-width: 769px) {
  .blog-featured-card__link {
    grid-template-columns: 1fr 1fr;
  }
}
.blog-featured-card:hover {
  box-shadow: 0 15px 40px rgba(160, 140, 91, 0.15);
}
.blog-featured-card__image-wrapper {
  overflow: hidden;
  background-color: #f7f7f7;
  min-height: 250px;
}
.blog-featured-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-featured-card:hover .blog-featured-card__image {
  transform: scale(1.05);
}
.blog-featured-card__content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
}
.blog-featured-card__category {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-gold);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.blog-featured-card__title {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 1rem;
}
.blog-featured-card__excerpt {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}
.blog-featured-card__meta {
  font-size: 0.85rem;
  color: #777;
  border-top: 1px solid #f0f0f0;
  padding-top: 1rem;
}
.blog-featured-card__meta .blog-card__author {
  font-weight: 600;
  color: #333;
}
.blog-featured-card__meta .blog-card__date::before {
  content: '•';
  margin: 0 0.5rem;
}


/* --- Standard Grid (Updated) --- */
/* This is "the rest of them" */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* NEW CARD STYLE: Text on Image */
.blog-card-overlay {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  aspect-ratio: 9/12; /* Taller card */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card-overlay:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.blog-card-overlay__link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: #fff;
}

.blog-card-overlay__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-card-overlay:hover .blog-card-overlay__image {
  transform: scale(1.05);
}

.blog-card-overlay__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  z-index: 2;
  /* Dark gradient overlay for text readability */
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4), transparent);
}

.blog-card-overlay .blog-card__category {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff; /* White text for contrast */
  background-color: rgba(160, 140, 91, 0.8); /* Semi-transparent gold pill */
  margin-bottom: 0.75rem; /* A bit more space */
  display: inline-block; /* Makes the background fit the text */
  padding: 4px 10px;
  border-radius: 4px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2); /* Subtle shadow for text */
}

.blog-card-overlay__title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}


/* --- Load More Button (Unchanged) --- */
.blog-load-more {
  text-align: center;
  margin-top: 3rem;
}
#load-more-posts {
  padding: 12px 30px;
  font-size: 1.05rem;
  min-width: 200px;
  transition: all 0.3s ease;
}
#load-more-posts .bx-spin {
  display: none;
  font-size: 1.2rem;
  vertical-align: middle;
  margin-right: 5px;
}
#load-more-posts.is-loading {
  pointer-events: none;
  background-color: #8a7a50;
}
#load-more-posts.is-loading span { display: none; }
#load-more-posts.is-loading .bx-spin { display: inline-block; }


/* Animation for new cards (fades in the new .blog-card-overlay) */
.blog-card-overlay.is-newly-loaded {
  animation: card-fade-in 0.6s ease-out;
}
@keyframes card-fade-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}


/* === 2. Blog Sidebar === */
.blog-sidebar {
  width: 100%;
  /* On desktop, it will be constrained by the grid */
}

@media (min-width: 992px) {
  .blog-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    height: fit-content;
  }
}

.sidebar-widget {
  background-color: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.widget-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--brand-gold);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}

/* Search Widget */
.blog-search-form {
  position: relative;
}
.blog-search-form input {
  width: 100%;
  padding: 12px 15px;
  padding-left: 45px; /* Space for button */
  border: 1px solid #e8e3d5;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
}
.blog-search-form input:focus {
  outline: none;
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 3px rgba(160, 140, 91, 0.1);
}
.blog-search-form button {
  position: absolute;
  left: 5px;
  top: 5px;
  bottom: 5px;
  background: var(--brand-gold);
  border: none;
  color: #fff;
  border-radius: 6px;
  width: 35px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background-color 0.2s;
}
.blog-search-form button:hover {
  background-color: #8a7a50;
}

/* Posts Widget (Featured/Latest) */
.widget-post-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.widget-post-list li a {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: #333;
}
.widget-post-list li img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.widget-post-info {
  display: flex;
  flex-direction: column;
}
.widget-post-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
  transition: color 0.2s;
  /* Truncate long titles */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.widget-post-list li a:hover .widget-post-title {
  color: var(--brand-gold);
}
.widget-post-date {
  font-size: 0.8rem;
  color: #777;
  margin-top: 2px;
}

/* ==================== SINGLE POST PAGE (post.html) ==================== */

/* --- Reading Progress Bar --- */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--brand-gold);
  width: 0%; /* Starts at 0, JS will update this */
  z-index: 1001; /* Above header */
  transition: width 0.1s linear;
}

/* --- Post Hero Banner --- */
.post-hero {
  position: relative;
  width: 100%;
  height: 60vh; /* 60% of the viewport height */
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.post-hero__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.post-hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45); /* Dark overlay for contrast */
  z-index: 2;
  display: flex;
  align-items: flex-end; /* Aligns content to the bottom */
}

.post-hero__content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-bottom: 3rem;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.post-hero__content .blog-card__category {
  font-size: 0.9rem;
  color: #fff; /* White text */
  background-color: var(--brand-gold); /* Solid gold pill */
  padding: 5px 12px;
  border-radius: 4px;
}

.post-hero__title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 769px) {
  .post-hero__title {
    font-size: 3.5rem;
  }
}

.post-hero__meta {
  font-size: 0.9rem;
  color: #eee;
}
.post-hero__meta .post-date::before {
  content: '•';
  margin: 0 0.5rem;
}

/* --- Post Content Layout --- */
.post-container {
  padding-top: 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 992px) {
  .post-container {
    grid-template-columns: 3fr 1fr; /* 3 parts content, 1 part sidebar */
  }
}

/* --- Article Content Formatting --- */
.post-content {
  font-size: 1.05rem;
  line-height: 2;
  color: #333;
}
.post-content h2, .post-content h3 {
  font-weight: 700;
  color: #222;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.post-content h2 { font-size: 1.8rem; }
.post-content h3 { font-size: 1.5rem; }

.post-content p { margin-bottom: 1.5rem; }
.post-content ul {
  list-style-type: disc;
  margin-right: 1.5rem;
  margin-bottom: 1.5rem;
}
.post-content li { margin-bottom: 0.5rem; }

.post-content blockquote {
  font-size: 1.2rem;
  font-style: italic;
  font-weight: 600;
  color: var(--brand-gold);
  padding: 1rem 1.5rem;
  border-right: 4px solid var(--brand-gold);
  background: #fdfdfd;
  margin: 2rem 0;
}
.post-content blockquote p { margin-bottom: 0; }

.post-content .post-image {
  margin: 2rem 0;
}
.post-content .post-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.post-content .post-image figcaption {
  font-size: 0.85rem;
  color: #777;
  text-align: center;
  margin-top: 0.5rem;
}

/* --- Post Sidebar (Share) --- */
.post-sidebar {
  width: 100%;
}
@media (min-width: 992px) {
  .post-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    height: fit-content;
  }
}

.post-share-links {
  display: flex;
  gap: 0.8rem;
}
.post-share-links a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.4rem;
  padding: 10px;
  border-radius: 8px;
  color: #555;
  background: #f7f7f7;
  transition: all 0.2s ease;
}
.post-share-links a:hover {
  background: var(--brand-gold);
  color: #fff;
  transform: translateY(-2px);
}

/* --- Author Box --- */
.post-author-box {
  grid-column: 1 / -1; /* Spans full width */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  background: #fcfcfc;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
}
@media (min-width: 769px) {
  .post-author-box {
    flex-direction: row;
    text-align: right;
  }
}

.post-author-box__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--brand-gold);
  flex-shrink: 0;
}
.post-author-box__name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.post-author-box__bio {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.7;
}

/* ==================== CART COUNTER BADGE ==================== */
.header-icons .cart-btn {
  position: relative; /* Needed to position the badge */
}

.cart-item-count {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: #d32f2f; /* Red */
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  
  /* Start hidden */
  transform: scale(0);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.cart-item-count.is-visible {
  transform: scale(1); /* Pop in */
  opacity: 1;
}

/* --- End of CSS additions --- */

/* =================================== */
/* ABOUT US (Journal Page)             */
/* =================================== */

/* --- 1. Canvas Setup --- */
.journal-canvas {
  /* Background Texture */
  background-color: #fcfaf5;
  background-image: url('https://www.transparenttextures.com/patterns/handmade-paper.png');
  background-attachment: fixed;
  overflow-x: hidden; /* Prevent horizontal scroll from overlapping elements */
  
  /* Fonts & Color */
  font-family: 'Amiri', 'PeydaWeb', serif;
  color: #3a352f;

  padding-top: var(--header-height);
}

.journal-island {
  position: relative;
  width: 100%;
  padding: 4rem 2rem; 
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* CRITICAL: Allow elements to overlap sections */
  overflow: visible; 
  border-bottom: none;
}

.journal-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* --- Typography --- */
.island-title {
  font-family: 'PeydaWeb', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--brand-gold);
  margin-bottom: 1.5rem;
}

.island-body-text {
  font-size: 1.3rem;
  line-height: 2.2;
  color: #4a443b;
  max-width: 700px;
}

.text-center { text-align: center; }
.text-center .island-body-text { margin: 0 auto; }


/* --- Island 1: The Name (Anchor) --- */
.island-1 {
  padding-top: 6rem;
  padding-bottom: 12rem; /* Extra space for Island 2 to overlap */
  z-index: 1;
}

.island-1-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.island-1-media {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
  aspect-ratio: 4/3;
  position: relative;
}

.island-1-video-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 769px) {
  .island-1-grid {
    grid-template-columns: 1fr 1.2fr; /* Text Right, Video Left */
  }
  .island-1-media {
    transform: translateY(3rem); /* Push video down to start the chain */
  }
}


/* --- Island 2: The Connector (Calligraphy) --- */
.island-2 {
  padding-top: 0;
  padding-bottom: 5rem;
  z-index: 5; /* Above Island 1 */
  margin-top: -6rem; /* PULL UP: Overlap Island 1 */
  pointer-events: none; /* Let clicks pass through empty areas */
}

.island-2-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2rem;
  pointer-events: auto;
}

.island-2-calligraphy {
  font-family: 'Lalezar', 'PeydaWeb', cursive;
  font-size: 6rem;
  font-weight: 400;
  color: var(--brand-gold);
  text-align: center;
  opacity: 0.9;
  line-height: 1.3;
  transform: rotate(-2deg); /* Dynamic angle */
}

.island-2-note {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: 1.4rem;
  line-height: 2;
  padding: 2rem;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.island-2-note::before {
  content: '';
  position: absolute;
  top: 10px; bottom: 10px; right: 10px;
  width: 3px;
  background-color: var(--brand-gold);
  border-radius: 2px;
}

@media (min-width: 769px) {
  .island-2-grid {
    grid-template-columns: 1fr 1fr;
  }
  .island-2-calligraphy {
    font-size: 8rem;
    text-align: right;
    margin-right: -3rem; /* Overlap right */
  }
  .island-2-note {
    margin-left: 2rem;
    margin-top: 8rem; /* Stagger down */
  }
}


/* --- Island 3: The Source (Collage Interlock) --- */
.island-3 {
  padding-top: 0;
  padding-bottom: 10rem;
  z-index: 4;
  margin-top: -4rem; /* PULL UP */
}

.island-3-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.island-3-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  position: relative;
}

.island-3-collage img {
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  object-fit: cover;
  transition: transform 0.3s ease-out;
  border: 4px solid #fff;
}

@media (min-width: 769px) {
  .island-3-grid {
    grid-template-columns: 1.2fr 1fr;
  }
  
  /* Zig-Zag: Collage moves to the 'start' (Right in RTL), Text to 'end' */
  .island-3-collage {
    order: 1; 
    margin-top: -5rem; /* Deep interlock into Island 2 */
  }
  .island-3-text {
    order: 2;
    padding-right: 3rem;
    padding-top: 5rem;
  }
  
  /* Stagger images */
  .collage-img-1 { transform: translateY(0); }
  .collage-img-2 { transform: translateY(4rem); margin-top: 5rem;}
  .collage-img-3 { transform: translateY(-3rem); margin-left: -2rem; }
}


/* --- Island 4: The Hands (Photo Interlock) --- */
.island-4 {
  padding-top: 0;
  padding-bottom: 5rem;
  margin-top: -5rem; /* PULL UP */
  z-index: 6;
}

.island-4-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.island-4-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.island-4-photos .photo-wrapper {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  aspect-ratio: 3/4;
}

.island-4-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.island-4-photos img:hover {
  filter: grayscale(0) contrast(1);
  transform: scale(1.05);
}

@media (min-width: 769px) {
  .island-4-grid {
    grid-template-columns: 1fr 1.2fr;
  }
  .island-4-text {
    order: 1;
    padding-left: 3rem;
  }
  .island-4-photos {
    order: 2;
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
    margin-top: -8rem; /* Interlock upwards */
  }
  
  /* Stagger photo grid */
  .island-4-photos .photo-wrapper:nth-child(1) { margin-top: 4rem; }
  .island-4-photos .photo-wrapper:nth-child(2) { margin-top: 0; }
  .island-4-photos .photo-wrapper:nth-child(3) { margin-top: 6rem; }
}


/* --- Island 5: The Invitation --- */
.island-5 {
  min-height: 60vh;
  background-color: rgba(0, 0, 0, 0.02); /* Subtle separation */
  margin-top: -2rem; /* Slight overlap */
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.island-5 .large-text {
  font-size: 1.4rem;
  max-width: 800px;
  font-weight: 400;
  margin-bottom: 3rem;
}

.island-5-cta {
  display: inline-block;
  font-family: 'PeydaWeb', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand-gold);
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid var(--brand-gold);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.island-5-cta:hover {
  background-color: var(--brand-gold);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(160, 140, 91, 0.3);
}


/* ========================================= */
/* CONTACT PAGE (LUXURY)             */
/* ========================================= */

/* --- Page Background --- */
.contact-body {
  background-color: #f8f9fa;
  background-image: radial-gradient(circle at 10% 20%, rgba(160, 140, 91, 0.05) 0%, transparent 20%),
                    radial-gradient(circle at 90% 80%, rgba(160, 140, 91, 0.05) 0%, transparent 20%);
}

/* --- Hero Section --- */
.contact-hero {
  position: relative;
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 6rem;
  background-color: #111;
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.contact-hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('../assets/pics/hero-poster.jpg'); /* Using existing asset as fallback background */
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  filter: blur(3px) grayscale(100%);
  transform: scale(1.05);
}

.contact-hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.contact-hero__subtitle {
  display: inline-block;
  font-size: 0.9rem;
  letter-spacing: 1px;
  color: var(--brand-gold);
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.contact-hero__title {
  font-family: 'Amiri', serif;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.contact-hero__title .text-gold {
  color: var(--brand-gold);
  font-style: italic;
}

.contact-hero__text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #ccc;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.4s forwards;
}

/* --- Main Content (Overlapping Layout) --- */
.contact-main {
  margin-top: -4rem; /* Overlap the hero */
  position: relative;
  z-index: 10;
  padding-bottom: 5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1.2fr 1.8fr; /* Info smaller, Form wider */
  }
}

/* --- Common Card Style --- */
.contact-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.6s forwards;
}

/* --- Left Column: Info Card --- */
.info-card {
  background: linear-gradient(145deg, #222, #1a1a1a);
  color: #fff;
  border: 1px solid #333;
}

.info-card__header {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
}

.info-card__header h2 {
  font-family: 'Amiri', serif;
  font-size: 1.8rem;
  color: var(--brand-gold);
  margin-bottom: 0.5rem;
}

.info-card__header p {
  color: #888;
  font-size: 0.9rem;
}

.info-item {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 2rem;
  transition: ease 0.2s;
}

.info-icon {
  width: 50px;
  height: 50px;
  background: rgba(160, 140, 91, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-gold);
  font-size: 1.4rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  transition: ease 0.2s;
}

.info-item:hover .info-icon {
  transform: scale(1.1) rotate(10deg);
  background: var(--brand-gold);
  color: #fff;
  transition: ease 0.2s;
}

.info-text strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: #fff;
}

.info-text p {
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* Link Styling (New Addition) */
.info-text a {
  color: inherit; /* Matches the #aaa color */
  text-decoration: none;
  transition: color 0.3s ease, padding-right 0.3s ease;
}

.info-text a:hover {
  color: var(--brand-gold);
  padding-right: 3px; /* Subtle slide effect on hover */
}

.ltr-text {
  direction: ltr;
  text-align: right;
}

.info-socials {
  display: flex;
  gap: 1rem;
  margin-top: 3rem;
}

.social-link {
  width: 45px;
  height: 45px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  transform: translateY(-3px);
}

/* Decorative Circle behind info card */
.deco-circle {
  position: absolute;
  bottom: -50px;
  left: -50px;
  width: 150px;
  height: 150px;
  border: 2px solid rgba(160, 140, 91, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

/* --- Right Column: Form Card --- */
.form-card {
  background: #fff;
}

.form-title {
  font-family: 'Amiri', serif;
  font-size: 2rem;
  color: #333;
  margin-bottom: 2rem;
}

.luxury-form .input-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 600px) {
  .luxury-form .input-row {
    grid-template-columns: 1fr 1fr;
  }
}

.input-group {
  position: relative;
  margin-bottom: 2rem;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 10px 0;
  font-size: 1rem;
  color: #333;
  border: none;
  border-bottom: 1px solid #ddd;
  outline: none;
  background: transparent;
  transition: border-color 0.3s;
  font-family: inherit;
}

.input-group textarea {
  min-height: 120px;
  resize: vertical;
}

.input-group label {
  position: absolute;
  top: 10px;
  right: 0;
  font-size: 1rem;
  color: #999;
  pointer-events: none;
  transition: 0.3s ease all;
}

/* Animated Border Line */
.input-border {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--brand-gold);
  transition: width 0.3s ease;
}

/* Floating Label Animation */
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
  top: -20px;
  font-size: 0.85rem;
  color: var(--brand-gold);
}

.input-group input:focus ~ .input-border,
.input-group textarea:focus ~ .input-border {
  width: 100%;
}

.submit-btn {
  font-family: inherit;
  font-weight: bold;
  background-color: #222;
  color: var(--brand-gold);
  border: 1px solid #222;
  padding: 15px 40px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 0; /* Sharp luxury look */
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: var(--brand-gold);
  transition: width 0.3s ease;
  z-index: -1;
}

.submit-btn:hover::before {
  width: 100%;
}

.submit-btn:hover {
  color: #fff;
  border-color: var(--brand-gold);
}

/* --- Map Section --- */
.contact-map {
  position: relative;
  height: 450px;
  filter: grayscale(100%) contrast(1.2);
  transition: filter 0.5s ease;
}

.contact-map:hover {
  filter: grayscale(0%) contrast(1);
}

/* Map Overlay (Gradient fade at top) */
.map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(to bottom, #f8f9fa, transparent);
  pointer-events: none;
}

/* --- Animation Keyframes --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================= */
/* MAP SCROLL FIX (FLUENT INTERACTION)       */
/* ========================================= */

/* By default, ignore mouse events on the map so page scrolling is smooth */
.contact-map iframe {
  pointer-events: none; 
}

/* When the user clicks the map, allow interaction */
.contact-map.active iframe {
  pointer-events: auto;
}

/* Optional: Change cursor to indicate it's clickable */
.contact-map:not(.active) {
  cursor: pointer;
}

/* ========================================= */
/* MAP ACTIVATION MESSAGE                    */
/* ========================================= */

.contact-map::after {
  content: 'برای فعال‌سازی نقشه کلیک کنید'; /* "Click to activate map" */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  
  /* Luxury styling */
  background-color: rgba(20, 20, 20, 0.85); /* Deep dark background */
  color: var(--brand-gold);
  border: 1px solid rgba(160, 140, 91, 0.3);
  padding: 12px 25px;
  border-radius: 50px; /* Pill shape */
  
  font-family: 'PeydaWeb', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  
  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 20;
  pointer-events: none; /* Important: lets the click pass through to the map wrapper */
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  backdrop-filter: blur(4px);
}

/* Only show when hovering AND the map is NOT active yet */
.contact-map:not(.active):hover::after {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* ==================== FONT UNIFICATION OVERRIDES ==================== */

/* 1. Global Base */
body {
  font-family: 'PeydaWeb', sans-serif;
}

/* 2. Nerkhname (Price Table) Numbers */
.price-table td.price-value {
  font-family: 'PeydaWeb', sans-serif; /* Was standard sans-serif */
}

/* 3. Journal / About Us Page */
.journal-canvas {
  font-family: 'PeydaWeb', sans-serif; /* Was Amiri */
}

.island-2-calligraphy {
  font-family: 'PeydaWeb', sans-serif; /* Was Lalezar */
  /* Optional: Adjust letter spacing since PeydaWeb is tighter than Lalezar */
  letter-spacing: -1px; 
}

.island-2-note {
  font-family: 'PeydaWeb', sans-serif; /* Was Amiri */
}

/* 4. Contact / Luxury Page */
.contact-hero__title {
  font-family: 'PeydaWeb', sans-serif; /* Was Amiri */
}

.info-card__header h2 {
  font-family: 'PeydaWeb', sans-serif; /* Was Amiri */
}

.form-title {
  font-family: 'PeydaWeb', sans-serif; /* Was Amiri */
}

/* ==================== ISLAND PARAGRAPH ALIGNMENTS ==================== */

/* 1. Enforce RTL Direction */
.journal-canvas {
  direction: rtl;
  text-align: right;
}

/* 2. Justify Body Text (Clean "Newspaper" Look) */
.island-body-text {
  text-align: justify;
  text-justify: inter-word; /* Smart spacing for Persian words */
  margin-left: auto; /* varying alignment safety */
  margin-right: 0;
}

/* 3. Fix Island 2 "Connector" Text */
/* Since we removed the artistic font, we should remove the rotation and center/align it properly */
.island-2-calligraphy {
  transform: none; /* Remove the -2deg tilt */
  text-align: center;
  width: 100%;
  margin-bottom: 2rem;
}

/* 4. Fix Island 2 "Note" Box */
.island-2-note {
  text-align: justify;
  text-align-last: right; /* Ensure last line ends naturally on the right */
}

/* 5. Island 5 (Invitation) Centering */
/* The final section usually looks best fully centered */
.island-5, 
.island-5 .island-body-text {
  text-align: center;
  text-align-last: center; /* Forces the last line of the paragraph to center */
}

/* 6. Desktop Specific Alignments */
@media (min-width: 769px) {
  /* On desktop, the big text in Island 2 looks better aligned to the flow */
  .island-2-calligraphy {
    text-align: right;
    margin-right: -2rem; /* Slight overlap effect maintained */
  }
  
  /* Ensure Island 3 (Collage) text is neat */
  .island-3-text {
    padding-left: 2rem; /* Add spacing from left edge */
  }
}

/* ==================== NEW NERKHNAME STYLES ==================== */

/* Category Titles */
.price-category-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* Border removed */
  width: fit-content;
}

/* Statistics Section */
.stats-section {
  padding-top: 0;
  padding-bottom: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid #f0f0f0;
}

.stat-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #333;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-subtitle {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 1.2rem;
}

/* Sentiment Bar */
.sentiment-bar-wrapper {
  margin-top: 1rem;
}

.sentiment-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.txt-green { color: #2e7d32; }
.txt-red { color: #c62828; }

.sentiment-track {
  width: 100%;
  height: 12px;
  background-color: #ffebee; /* Light Red background */
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.sentiment-fill {
  height: 100%;
  background-color: #4caf50; /* Green fill */
  border-radius: 6px 0 0 6px; /* Rounded only on right (since RTL) */
}

/* Rules List */
.stat-rules {
  list-style: disc;
  margin-right: 1.2rem;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.8;
}

.stat-rules li {
  margin-bottom: 0.4rem;
}

/* Creative Design for Currency List */
#currency-price-body .price-pill {
  background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%); /* Blueish tint */
  border-color: #90caf9;
  box-shadow: 0 4px 20px rgba(33, 150, 243, 0.08);
}

#currency-price-body .price-pill::before {
  background: linear-gradient(to bottom, #2196f3, #1976d2); /* Blue strip */
}

#currency-price-body .price-value {
  background: linear-gradient(135deg, #2196f3, #1565c0); /* Blue badge */
  box-shadow: 0 2px 10px rgba(33, 150, 243, 0.3);
}

/* --- Flex Header & Archive Button Styling --- */
.section__header--flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee; /* خط جداکننده ظریف */
}

.section__header--flex .section__title {
  margin-bottom: 0;
}

/* استایل دکمه آرشیو */
.btn-archive {
  background-color: transparent;
  border: 2px solid var(--brand-gold);
  color: var(--brand-gold);
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 50px; /* گرد کردن گوشه‌ها */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-archive i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.btn-archive:hover {
  background-color: var(--brand-gold);
  color: #fff;
  box-shadow: 0 4px 15px rgba(160, 140, 91, 0.3);
  transform: translateY(-2px);
}

.btn-archive:hover i {
  transform: translateX(-4px); /* حرکت فلش در هاور */
}

.section__header--flex .section__title {
  margin-bottom: 0; /* Override default margin */
}

.section__header--flex .button {
  font-size: 0.9rem;
  padding: 8px 16px;
  white-space: nowrap; /* Prevents text wrapping inside button */
  height: fit-content;
}

/* Border for header to separate it nicely */
.section__header--flex::after {
  display: none; /* Disable the gradient line for this specific header layout if desired, or keep it */
}

/* ==================== COMMENTS & REVIEWS (SHARED) ==================== */
.comments-area, 
.reviews-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
  grid-column: 1 / -1; /* Span full width in grid layouts */
}

.section-title-small {
  font-size: 1.5rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 2rem;
  border-right: 4px solid var(--brand-gold);
  padding-right: 1rem;
}

/* --- Comment/Review List --- */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3rem;
}

.comment-item {
  display: flex;
  gap: 1rem;
  background-color: #fcfcfc;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 1.5rem;
  transition: box-shadow 0.3s ease;
}

.comment-item:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.comment-avatar {
  width: 50px;
  height: 50px;
  background-color: #eee;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--brand-gold);
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Fallback avatar icon */
.comment-avatar i {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #aaa;
  background: #f5f5f5;
}

.comment-body {
  flex-grow: 1;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.comment-author {
  font-weight: 700;
  font-size: 1rem;
  color: #333;
}

.comment-date {
  font-size: 0.85rem;
  color: #888;
}

.comment-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #555;
}

/* --- Reply Button --- */
.btn-reply {
  font-family: 'PeydaWeb';
  background: none;
  border: none;
  color: var(--brand-gold);
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 600;
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-reply:hover { text-decoration: underline; }

/* --- Rating Stars (Reviews) --- */
.review-stars {
  color: #ccc; /* Default gray */
  font-size: 0.9rem;
}
.review-stars .bxs-star {
  color: #ffc107; /* Gold/Yellow for active stars */
}

/* --- Form Section --- */
.comment-form-box {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .form-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Star Rating Input */
.star-rating-input {
  display: flex;
  flex-direction: row-reverse; /* Right to left for visual logic */
  justify-content: flex-end;
  gap: 5px;
  margin-bottom: 1rem;
}

.star-rating-input input {
  display: none;
}

.star-rating-input label {
  cursor: pointer;
  font-size: 1.5rem;
  color: #ddd;
  transition: color 0.2s;
}

.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input:checked ~ label {
  color: #ffc107;
}

/* ==================== CART PAGE ==================== */
.cart-page-container {
  padding-top: 2rem;
  padding-bottom: 4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .cart-page-container {
    grid-template-columns: 1fr 350px; /* Main Content + Sidebar */
  }
}

/* Cart Table (Desktop) */
.cart-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 1rem; /* Space between rows */
}

.cart-table th {
  text-align: right;
  color: #888;
  font-weight: 600;
  padding-bottom: 0.5rem;
  font-size: 0.9rem;
}

.cart-table-row {
  background-color: #fff;
  box-shadow: 0 5px 15px rgba(0,0,0,0.03);
  border-radius: 8px;
  transition: transform 0.2s;
}

.cart-table-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.cart-table td {
  padding: 1rem;
  vertical-align: middle;
  border-top: 1px solid #f9f9f9;
  border-bottom: 1px solid #f9f9f9;
}

.cart-table td:first-child {
  border-right: 1px solid #f9f9f9;
  border-radius: 0 8px 8px 0;
}

.cart-table td:last-child {
  border-left: 1px solid #f9f9f9;
  border-radius: 8px 0 0 8px;
}

.cart-product {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cart-product img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #eee;
}

.cart-product-info h4 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: #333;
}

.cart-product-info span {
  font-size: 0.85rem;
  color: #777;
}

.cart-price {
  font-weight: 600;
  color: #333;
}

/* Cart Totals Box (Sidebar) */
.cart-totals {
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #eee;
  height: fit-content;
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}

.cart-totals h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: #555;
}

.cart-total-row.total {
  font-weight: 700;
  color: #333;
  font-size: 1.1rem;
  border-top: 1px solid #eee;
  padding-top: 1rem;
  margin-top: 1rem;
}

.btn-checkout {
  width: 100%;
  margin-top: 1.5rem;
  padding: 14px;
}

/* Mobile Cart (Hide Table, Show Cards) */
.mobile-cart-item {
  display: none; /* Hidden on desktop */
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid #eee;
  position: relative;
}

@media (max-width: 768px) {
  .cart-table { display: none; }
  .mobile-cart-item { display: flex; gap: 1rem; }
  
  .mobile-cart-content { flex-grow: 1; }
  .mobile-cart-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
  .mobile-cart-price { color: var(--brand-gold); font-weight: 700; }
  .mobile-cart-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
}


/* ==================== CHECKOUT PAGE ==================== */
.checkout-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

@media (min-width: 992px) {
  .checkout-container {
    grid-template-columns: 1.8fr 1.2fr; /* Form Wider, Summary Narrower */
  }
}

.checkout-form-box {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid #eee;
}

.checkout-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkout-title i { color: var(--brand-gold); }

/* Payment Methods */
.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.payment-method-label {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.payment-method-label:hover { background-color: #f9f9f9; }
.payment-method-label input { margin-left: 1rem; accent-color: var(--brand-gold); }

.payment-method-label.active {
  border-color: var(--brand-gold);
  background-color: rgba(160, 140, 91, 0.05);
}

/* Cart Item Styling Updates */
.cart-item__image {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eee;
}

.cart-item__details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item__name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.cart-item__price {
  font-size: 0.85rem;
  color: #777;
}

/* ==================== 2.0 PROFILE PAGE (LUXURY) ==================== */
.profile-body {
  background-color: #fcfcfc;
}

.profile-main {
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 5rem;
  min-height: 80vh;
}

/* Header Section */
.profile-welcome {
  margin-bottom: 2.5rem;
}
.welcome-text {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 0.5rem;
}
.text-gold { color: var(--brand-gold); }
.welcome-sub {
  color: #777;
  font-size: 0.95rem;
}

/* Layout Grid */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 992px) {
  .profile-grid {
    grid-template-columns: 280px 1fr;
    gap: 3rem;
  }
}

/* Sidebar */
.profile-sidebar {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  overflow: hidden;
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  border: 1px solid #f0f0f0;
}

.sidebar-user {
  padding: 2rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
  background: linear-gradient(to bottom, #fff, #fcfcfc);
}

.sidebar-avatar {
  width: 90px;
  height: 90px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  padding: 4px;
  border: 2px dashed var(--brand-gold);
}
.sidebar-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.sidebar-name {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 0.2rem;
}
.sidebar-phone {
  color: #888;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* Sidebar Menu */
.sidebar-menu {
  padding: 0.5rem 0;
}

.menu-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 14px 20px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.95rem;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
  text-align: right;
  border-left: 3px solid transparent;
}

.menu-btn i {
  font-size: 1.3rem;
  margin-left: 10px;
  color: #999;
  transition: color 0.2s;
}

.menu-btn:hover {
  background-color: #f9f9f9;
  color: var(--brand-gold);
}
.menu-btn:hover i { color: var(--brand-gold); }

.menu-btn.active {
  background-color: rgba(160, 140, 91, 0.08);
  color: var(--brand-gold);
  border-left-color: var(--brand-gold);
  font-weight: 600;
}
.menu-btn.active i { color: var(--brand-gold); }

.menu-btn.logout {
  color: #c62828;
  margin-top: 0.5rem;
  border-top: 1px solid #f0f0f0;
}
.menu-btn.logout:hover {
  background-color: #ffebee;
}

/* Content Panels */
.tab-panel {
  display: none;
  animation: fadeUp 0.4s ease forwards;
}
.tab-panel.active {
  display: block;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-title {
  font-size: 1.3rem;
  color: #333;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #eee;
}

.panel-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.8rem;
}
.panel-header-flex .panel-title { border: none; margin: 0; padding: 0; }

/* Dashboard Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 600px) {
  /* UPDATED: Dashboard Stats Responsive Fix */
  .stats-row {
    /* Change from 2 columns to 1 column for better visibility */
    grid-template-columns: 1fr; 
    gap: 1rem;
  }
  
  /* Reset the last-child span since we are now 1 column */
  .stat-box:last-child {
    grid-column: auto; 
  }
  
  /* UPDATED: Revert to row layout (Icon Left | Text Right) */
  .stat-box {
    padding: 1rem;
    flex-direction: row;      /* Keep icon and text side-by-side */
    text-align: right;        /* Align text to right (RTL) */
    gap: 1rem;
    justify-content: flex-start;
  }

  /* Optional: Ensure icon doesn't shrink */
  .stat-icon {
    flex-shrink: 0;
  }
}

.stat-box {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid #f0f0f0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.gold-bg { background: rgba(160, 140, 91, 0.15); color: var(--brand-gold); }
.blue-bg { background: #e3f2fd; color: #1976d2; }
.green-bg { background: #e8f5e9; color: #2e7d32; }

.stat-data { display: flex; flex-direction: column; }
.stat-value { font-size: 1.4rem; font-weight: 700; color: #333; }
.stat-label { font-size: 0.85rem; color: #888; }

/* Dashboard Table */
.recent-orders-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
  overflow: hidden;
}
.recent-orders-card .card-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fdfdfd;
}
.recent-orders-card .card-header h3 { font-size: 1rem; color: #444; margin: 0; }

.text-btn {
  background: none;
  border: none;
  color: var(--brand-gold);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}

.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.data-table th { text-align: right; padding: 1rem; font-size: 0.85rem; color: #888; font-weight: 600; background: #fff; }
.data-table td { padding: 1rem; border-top: 1px solid #f9f9f9; font-size: 0.9rem; color: #333; vertical-align: middle; }

.status-pill { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; display: inline-block; }
.status-pill.warning { background: #fff3e0; color: #ef6c00; }
.status-pill.success { background: #e8f5e9; color: #2e7d32; }

.action-link { color: #555; font-size: 0.85rem; border: 1px solid #ddd; padding: 4px 10px; border-radius: 6px; transition: all 0.2s; }
.action-link:hover { border-color: var(--brand-gold); color: var(--brand-gold); }

/* Orders List (Tab 2) */
.orders-list { display: flex; flex-direction: column; gap: 1.5rem; }
.order-card { background: #fff; border: 1px solid #eee; border-radius: 12px; overflow: hidden; transition: box-shadow 0.2s; }
.order-card:hover { box-shadow: 0 5px 20px rgba(0,0,0,0.05); }

.order-header { padding: 1rem 1.5rem; background: #fcfcfc; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.order-meta { display: flex; gap: 1rem; align-items: center; color: #666; font-size: 0.9rem; }
.order-id { font-weight: 700; color: #333; }
.order-date { font-size: 0.85rem; color: #888; }

.order-body { padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.order-thumbs { display: flex; gap: 10px; }
.order-thumbs img { width: 60px; height: 60px; border-radius: 8px; border: 1px solid #eee; object-fit: cover; }
.order-total { text-align: left; }
.order-total span { display: block; font-size: 0.85rem; color: #888; margin-bottom: 3px; }
.order-total strong { font-size: 1.1rem; color: var(--brand-gold); }

.order-footer { padding: 1rem 1.5rem; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 10px; }
.button.outline { background: transparent; border: 1px solid #ddd; color: #555; }
.button.outline:hover { border-color: var(--brand-gold); color: var(--brand-gold); }
.button.small { padding: 8px 16px; font-size: 0.85rem; }

/* Addresses Grid (Tab 3) */
.addresses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.address-box { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 1.5rem; position: relative; transition: border-color 0.2s; }
.address-box:hover { border-color: var(--brand-gold); }

.address-badges { margin-bottom: 1rem; display: flex; gap: 5px; }
.badge { font-size: 0.75rem; background: var(--brand-gold); color: #fff; padding: 2px 8px; border-radius: 4px; }
.badge.gray { background: #eee; color: #555; }

.address-text { font-size: 0.95rem; line-height: 1.6; color: #333; margin-bottom: 1.5rem; height: 3rem; overflow: hidden; }

.address-details { font-size: 0.85rem; color: #666; display: flex; flex-direction: column; gap: 5px; margin-bottom: 1.5rem; }
.address-details i { color: #aaa; margin-left: 5px; }

.address-actions { border-top: 1px solid #f0f0f0; padding-top: 1rem; display: flex; gap: 10px; }
.icon-action { background: #f9f9f9; border: none; width: 32px; height: 32px; border-radius: 6px; cursor: pointer; color: #555; transition: all 0.2s; }
.icon-action:hover { background: var(--brand-gold); color: #fff; }
.icon-action.delete:hover { background: #ffebee; color: #c62828; }

/* Forms (Tab 4) */
.profile-form { max-width: 600px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
@media(max-width: 500px) { .form-row { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; color: #444; font-weight: 500; }
.form-input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-family: inherit; font-size: 0.95rem; transition: border-color 0.2s; }
.form-input:focus { outline: none; border-color: var(--brand-gold); }
.input-hint { display: block; margin-top: 5px; font-size: 0.75rem; color: #999; }
.form-section-title { font-size: 1.1rem; color: #333; margin: 2rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid #eee; }
.form-submit-area { margin-top: 2rem; }

/* --- Fix for Inline SVG Icons --- */
.icon-action svg {
  fill: #555; /* Match default icon color */
  transition: fill 0.2s ease;
}

.icon-action:hover svg {
  fill: #fff; /* Turn white on hover (like the brand gold background) */
}

/* Ensure it aligns perfectly with text/buttons */
button svg {
  display: inline-block;
  vertical-align: middle;
  margin-top: -2px; 
}

@media (max-width: 991px) {
  /* 1. Compact User Info */
  .sidebar-user {
    display: flex;
    align-items: center;
    text-align: right; /* Align text right for RTL */
    padding: 1rem;
    gap: 1rem;
  }
  
  .sidebar-avatar {
    width: 60px; /* Smaller avatar */
    height: 60px;
    margin: 0; /* Remove bottom margin */
  }

  /* 2. Horizontal Menu -> Updated to Wrapped List (All Visible) */
  .sidebar-menu {
    display: flex;
    flex-wrap: wrap;       /* NEW: Allows tabs to wrap to next line */
    overflow-x: visible;   /* NEW: Removes scrollbar */
    white-space: normal;   /* NEW: Allows text to wrap if needed */
    padding: 0 1rem 1rem 1rem;
    gap: 0.8rem;
    border-bottom: 1px solid #f0f0f0;
    /* Remove scrollbar hiding rules if present */
  }
  
  .sidebar-menu::-webkit-scrollbar {
    display: none;
  }

  /* Make buttons fill available space for a cleaner list look */
  .menu-btn {
    flex: 1 0 auto;        /* NEW: Grow to fill space */
    justify-content: center;
    width: auto;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    padding: 8px 16px;
    background: #fff;
    border-left: 1px solid #e0e0e0; 
  }

  .menu-btn.active {
    background: var(--brand-gold);
    color: #fff;
    border-color: var(--brand-gold);
  }
  
  /* Make icons white when active */
  .menu-btn.active i {
    color: #fff;
  }

  .menu-btn.logout {
    margin-top: 0;
    border-top: 1px solid #e0e0e0; /* Reset desktop border */
  }
}

@media (max-width: 600px) {
  /* Hide the table header */
  .recent-orders-card table thead {
    display: none;
  }
  
  .recent-orders-card table, 
  .recent-orders-card table tbody, 
  .recent-orders-card table tr, 
  .recent-orders-card table td {
    display: block;
    width: 100%;
  }
  
  .recent-orders-card table tr {
    margin-bottom: 1rem;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1rem;
    background: #fcfcfc;
  }
  
  .recent-orders-card table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    padding: 0.5rem 0;
    text-align: left; /* Value aligns left */
  }

  /* Use pseudo-elements to add labels back */
  .recent-orders-card table td::before {
    content: attr(data-label); /* Requires HTML update below */
    font-weight: bold;
    color: #666;
    float: right; /* Label aligns right (RTL) */
  }
}

/* ==================== PROFILE PAGE MOBILE FIXES (600px and below) ==================== */

@media (max-width: 600px) {
  /* Main container adjustments */
  .profile-main {
    padding-top: calc(var(--header-height) + 1rem);
    padding-bottom: 2rem;
    min-height: 70vh;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Welcome section improvements */
  .profile-welcome {
    margin-bottom: 1.5rem;
    text-align: center;
  }
  
  .welcome-text {
    font-size: 1.4rem;
    line-height: 1.3;
  }
  
  .welcome-sub {
    font-size: 0.9rem;
  }
  
  /* Profile grid layout */
  .profile-grid {
    gap: 1.5rem;
  }
  
  /* Sidebar improvements for mobile */
  .profile-sidebar {
    position: relative;
    top: 0;
    border-radius: 8px;
  }
  
  .sidebar-user {
    padding: 1.5rem 1rem;
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .sidebar-avatar {
    width: 70px;
    height: 70px;
    margin: 0 auto;
  }
  
  .sidebar-name {
    font-size: 1rem;
  }
  
  .sidebar-phone {
    font-size: 0.85rem;
  }
  
  /* Sidebar menu - horizontal scroll for mobile */
  .sidebar-menu {
    display: flex;
    overflow-x: auto;
    padding: 0.5rem 1rem 1rem;
    gap: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    white-space: nowrap;
    flex-wrap: nowrap;
  }
  
  .sidebar-menu::-webkit-scrollbar {
    display: none;
  }
  
  .menu-btn {
    flex: 0 0 auto;
    padding: 10px 14px;
    font-size: 0.85rem;
    border-radius: 25px;
    border: 1px solid #e0e0e0;
    min-width: max-content;
    border-left: 1px solid #e0e0e0 !important; /* Override desktop border */
  }
  
  .menu-btn i {
    font-size: 1.1rem;
    margin-left: 6px;
  }
  
  .menu-btn.logout {
    border-top: 1px solid #e0e0e0;
    margin-top: 0;
  }
  
  /* Content area improvements */
  .profile-content {
    overflow: hidden;
  }
  
  .panel-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }
  
  .panel-header-flex {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .panel-header-flex .button {
    align-self: stretch;
    text-align: center;
  }
  
  /* Stats row - single column layout */
  .stats-row {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .stat-box {
    padding: 1rem;
    gap: 0.75rem;
  }
  
  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .stat-value {
    font-size: 1.2rem;
  }
  
  .stat-label {
    font-size: 0.8rem;
  }
  
  /* Recent orders card */
  .recent-orders-card .card-header {
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  
  .data-table {
    min-width: unset;
  }
  
  .data-table th,
  .data-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }
  
  /* Orders list improvements */
  .orders-list {
    gap: 1rem;
  }
  
  .order-header {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .order-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .order-body {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .order-thumbs {
    align-self: stretch;
    justify-content: center;
  }
  
  .order-thumbs img {
    width: 50px;
    height: 50px;
  }
  
  .order-total {
    text-align: center;
    width: 100%;
  }
  
  .order-footer {
    padding: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  /* Addresses grid - single column */
  .addresses-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .address-box {
    padding: 1rem;
  }
  
  .address-text {
    font-size: 0.9rem;
    height: auto;
    min-height: 3rem;
  }
  
  .address-details {
    font-size: 0.8rem;
    gap: 4px;
  }
  
  /* Form improvements */
  .profile-form {
    max-width: 100%;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .form-group {
    margin-bottom: 1rem;
  }
  
  .form-input {
    padding: 10px;
    font-size: 0.9rem;
  }
  
  .form-section-title {
    font-size: 1rem;
    margin: 1.5rem 0 1rem;
  }
  
  .form-submit-area {
    margin-top: 1.5rem;
  }
  
  /* Button improvements */
  .button {
    padding: 10px 16px;
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
  }
  
  .button.small {
    padding: 8px 12px;
    font-size: 0.8rem;
    width: auto;
  }
  
  /* Action links and pills */
  .action-link {
    font-size: 0.8rem;
    padding: 3px 8px;
  }
  
  .status-pill {
    font-size: 0.7rem;
    padding: 3px 8px;
  }
  
  /* Card improvements */
  .recent-orders-card,
  .order-card,
  .address-box {
    border-radius: 8px;
  }
  
  /* Table responsive behavior */
  .table-responsive {
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    background: #fff;
  }
  
  .data-table th {
    display: none;
  }
  
  .data-table tr {
    display: block;
    border-bottom: 1px solid #f0f0f0;
    padding: 1rem;
  }
  
  .data-table tr:last-child {
    border-bottom: none;
  }
  
  .data-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border: none;
    text-align: left;
  }
  
  .data-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #666;
    font-size: 0.85rem;
  }
  
  /* Ensure status pills and action links look good in mobile table */
  .data-table td .status-pill,
  .data-table td .action-link {
    margin-right: auto;
    margin-left: 0.5rem;
  }
}

/* Additional fixes for very small screens */
@media (max-width: 400px) {
  .sidebar-menu {
    padding: 0.5rem 0.75rem 1rem;
  }
  
  .menu-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  .menu-btn i {
    font-size: 1rem;
    margin-left: 4px;
  }
  
  .stat-box {
    padding: 0.75rem;
  }
  
  .order-thumbs img {
    width: 45px;
    height: 45px;
  }
  
  .address-box {
    padding: 0.75rem;
  }
}

/* Improve touch targets for mobile */
@media (max-width: 600px) {
  .menu-btn,
  .button,
  .action-link,
  .icon-action {
    min-height: 44px;
    min-width: 44px;
  }
  
  .icon-action {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .text-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* ==================== ALWAYS VISIBLE MENU TABS FIX ==================== */

@media (max-width: 991px) {
  /* Sidebar Menu - Always Visible Layout */
  .sidebar-menu {
    display: flex;
    flex-wrap: wrap;       /* Allow natural wrapping */
    overflow-x: visible;   /* Remove any scrollbars */
    white-space: normal;   /* Allow text to wrap naturally */
    padding: 0 1rem 1rem 1rem;
    gap: 0.5rem;          /* Reduced gap for better fit */
    border-bottom: 1px solid #f0f0f0;
    justify-content: center; /* Center the buttons for better appearance */
  }
  
  .sidebar-menu::-webkit-scrollbar {
    display: none;
  }

  /* Menu buttons - flexible width that fits content */
  .menu-btn {
    flex: 0 0 auto;        /* Don't grow or shrink, base on content */
    min-width: 120px;      /* Minimum width for readability */
    max-width: 180px;      /* Maximum width to prevent overflow */
    justify-content: center;
    width: auto;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    padding: 10px 16px;
    background: #fff;
    border-left: 1px solid #e0e0e0;
    text-align: center;
    font-size: 0.85rem;
    white-space: nowrap;   /* Keep text in one line */
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .menu-btn i {
    font-size: 1.1rem;
    margin-left: 6px;
    flex-shrink: 0;        /* Prevent icon from shrinking */
  }

  .menu-btn.active {
    background: var(--brand-gold);
    color: #fff;
    border-color: var(--brand-gold);
  }
  
  .menu-btn.active i {
    color: #fff;
  }

  .menu-btn.logout {
    margin-top: 0;
    border-top: 1px solid #e0e0e0;
  }
}

@media (max-width: 600px) {
  /* Further adjustments for very small screens */
  .sidebar-menu {
    gap: 0.4rem;
    padding: 0 0.75rem 0.75rem 0.75rem;
  }
  
  .menu-btn {
    min-width: 110px;
    max-width: 150px;
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  .menu-btn i {
    font-size: 1rem;
    margin-left: 4px;
  }
}

/* Extra small screens - ensure everything stays visible */
@media (max-width: 400px) {
  .sidebar-menu {
    gap: 0.3rem;
  }
  
  .menu-btn {
    min-width: 100px;
    max-width: 130px;
    padding: 6px 10px;
    font-size: 0.75rem;
  }
  
  /* If there are still visibility issues, we can force 2-column layout */
  .sidebar-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  
  .menu-btn {
    min-width: auto;
    max-width: none;
    width: 100%;
  }
}

/* Ensure status pills are always properly sized and visible */
.status-pill {
  white-space: nowrap;
  min-width: max-content;
}

/* Make sure action links don't break layout */
.action-link {
  white-space: nowrap;
}

/* Ensure badges in addresses don't wrap awkwardly */
.address-badges {
  flex-wrap: wrap;
  gap: 0.3rem;
}

.badge {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ==================== SMALLER ACTION BUTTON FIX ==================== */

.action-link {
    padding: 2px 8px !important;
    font-size: 0.75rem !important;
    min-height: auto !important;
}

@media (max-width: 600px) {
    .action-link {
        padding: 1px 6px !important;
        font-size: 0.7rem !important;
    }
    
    /* Ensure table action links are properly sized */
    .data-table td .action-link {
        margin: 0 1;
        display: inline-block;
    }
}

/* Make sure the button doesn't get too small on very small screens */
@media (max-width: 400px) {
    .action-link {
        padding: 1px 4px !important;
        font-size: 0.65rem !important;
    }
}

/* ==================== EVENTS & CLUB PAGE STYLES ==================== */

/* --- 1. Layout Grid --- */
.events-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 992px) {
  .events-grid {
    grid-template-columns: 1fr 1fr; /* 2 Columns on Desktop */
  }
}

/* --- 2. Event Box (Card Style) --- */
.event-box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(160, 140, 91, 0.1);
}

.event-box__header {
  background: #fdfdfd;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.event-box__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-box__title i {
  color: var(--brand-gold);
  font-size: 1.4rem;
}

.event-box__body {
  text-align: center;
  padding: 1.5rem;
  flex-grow: 1;
}

/* --- 3. Chic Table (Leaderboards) --- */
.chic-table-wrapper {
  height: 450px; /* Fixed height for ~10 records */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-gold) #f0f0f0;
  border-radius: 8px;
  border: 1px solid #f5f5f5;
}

/* Custom Scrollbar for Webkit */
.chic-table-wrapper::-webkit-scrollbar {
  width: 6px;
}
.chic-table-wrapper::-webkit-scrollbar-track {
  background: #f0f0f0;
}
.chic-table-wrapper::-webkit-scrollbar-thumb {
  background-color: var(--brand-gold);
  border-radius: 10px;
}

.chic-table {
  width: 100%;
  border-collapse: separate; 
  border-spacing: 0;
  font-size: 0.95rem;
}

.chic-table th {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
  text-align: center;
  padding: 15px;
  font-weight: 700;
  color: #666;
  border-bottom: 2px solid #eee;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.chic-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #f9f9f9;
  color: #444;
  transition: background 0.2s;
}

.chic-table tr:hover td {
  background-color: #fcfaf5; /* Subtle gold tint */
  color: var(--brand-gold);
}

/* Rank Badge for Top 3 */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eee;
  color: #555;
  font-size: 0.8rem;
  font-weight: bold;
  margin-left: 8px;
}
.rank-1 { background: #ffd700; color: #fff; box-shadow: 0 2px 5px rgba(255, 215, 0, 0.4); }
.rank-2 { background: #c0c0c0; color: #fff; }
.rank-3 { background: #cd7f32; color: #fff; }

/* --- 4. Inquiry System --- */
.captcha-container {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 2rem;
}

.captcha-box {
  background: #eee;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 1.5rem;
  letter-spacing: 4px;
  color: #555;
  user-select: none;
  width: 120px;
  text-align: center;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1IiBoZWlnaHQ9IjUiPgo8cmVjdCB3aWR0aD0iNSIgaGVpZ2h0PSI1IiBmaWxsPSIjZmZmIj48L3JlY3Q+CjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiNjY2MiPjwvcmVjdD4KPC9zdmc+');
}

.inquiry-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 300px;
  color: #aaa;
  text-align: center;
  border: 2px dashed #eee;
  border-radius: 12px;
  background: #fdfdfd;
}

.inquiry-empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.btn-download-pdf {
  width: 100%;
  background-color: #d32f2f;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 10px rgba(211, 47, 47, 0.2);
}

.btn-download-pdf:hover {
  background-color: #b71c1c;
  transform: translateY(-2px);
}

/* --- 5. Registration Form Container --- */
.registration-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.gender-options {
  display: flex;
  gap: 30px;
  padding: 10px 0;
  border-bottom: 1px solid #ddd; /* Match input-group style */
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 1rem;
  color: #555;
  transition: color 0.2s;
}

.radio-label:hover {
  color: var(--brand-gold);
}

.radio-label input[type="radio"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #ccc;
  border-radius: 50%;
  position: relative;
  transition: all 0.2s;
}

.radio-label input[type="radio"]:checked {
  border-color: var(--brand-gold);
}

.radio-label input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 10px; height: 10px;
  background: var(--brand-gold);
  border-radius: 50%;
}

/* ==================== FIXES: LTR & CURSORS ==================== */

/* 1. Fix Radio Button Cursor */
/* Ensures the pointer appears when hovering the actual circle input */
.radio-label input[type="radio"] {
  cursor: pointer;
}

/* 2. LTR Columns for Points */
/* Target 3rd column of "Latest Customers" (2nd box) and "Inquiry Result" (#result-data) */
.events-grid .event-box:nth-child(2) .chic-table td:last-child,
#result-data .chic-table td:last-child {
  direction: ltr;       /* Forces +50 to display correctly as +50, not 50+ */
  text-align: center;     /* Aligns numbers to the left for better readability */
  font-weight: 600;     /* Optional: makes the score pop a bit more */
}

/* ==================== EVENTS PAGE "SOUL" ANIMATIONS (FIXED) ==================== */

/* 1. Hero Image "Breathing" Effect */
.plp-banner {
  overflow: hidden; 
}
.plp-banner__image {
  animation: hero-breathe 18s ease-in-out infinite alternate;
  transform-origin: center center;
}
@keyframes hero-breathe {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.1); filter: brightness(1.05); }
}

/* 2. Staggered Entrance for Cards */
.events-grid .event-box {
  opacity: 0; 
  animation: soul-slide-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.events-grid .event-box:nth-child(2) {
  animation-delay: 0.2s;
}

.registration-wrapper {
  opacity: 0;
  animation: soul-slide-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s forwards;
}

@keyframes soul-slide-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 3. Card Hover "Lift" & Glow (FIXED) */
/* Reduced lift distance to prevent cursor flickering/jitter */
.event-box {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.4s ease, 
              border-color 0.4s ease;
}

.event-box:hover {
  transform: translateY(-5px); /* Changed from -8px to -5px for stability */
  box-shadow: 0 15px 30px rgba(160, 140, 91, 0.12);
  border-color: rgba(160, 140, 91, 0.4);
}

/* 4. Table Row Interaction (FIXED) */
/* Added GPU hacks to prevent font-weight flickering */
.chic-table tbody tr {
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  z-index: 1;
  
  /* STABILITY FIXES: */
  will-change: transform;         /* Tells browser to prepare for movement */
  backface-visibility: hidden;    /* Prevents blurry/jittery text */
  transform: translateZ(0);       /* Forces GPU rendering constantly so it doesn't "switch" on hover */
  -webkit-font-smoothing: subpixel-antialiased; /* Keeps text sharp */
}

.chic-table tbody tr:hover {
  background-color: #fff;
  transform: translateY(-3px) translateZ(0); /* Keep the Z-axis stable during lift */
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  z-index: 10;
  border-radius: 6px;
  cursor: default;
}

/* 5. "Live" Status Pulse */
.event-box__header .text-gold {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.event-box__header .text-gold::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--brand-gold);
  border-radius: 50%;
  margin-left: 8px;
  animation: live-pulse 2s infinite;
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(160, 140, 91, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(160, 140, 91, 0); }
  100% { box-shadow: 0 0 0 0 rgba(160, 140, 91, 0); }
}

/* 6. Gold Rank Badge Shine */
.rank-1 {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.rank-1::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  transform: skewX(-20deg);
  animation: badge-shine 4s infinite;
}

@keyframes badge-shine {
  0% { left: -150%; }
  20% { left: 150%; } 
  100% { left: 150%; }
}

/* 7. Input Field "Soul" */
.luxury-form .input-group input,
.luxury-form .input-group textarea {
  transition: all 0.3s ease;
}

.luxury-form .input-group input:focus,
.luxury-form .input-group textarea:focus {
  background-color: rgba(160, 140, 91, 0.02);
}

.luxury-form .input-group input:focus ~ .input-border, 
.luxury-form .input-group textarea:focus ~ .input-border {
  height: 2px;
  box-shadow: 0 2px 10px rgba(160, 140, 91, 0.3);
}

/* 8. Button Press Effect */
.submit-btn:active {
  transform: scale(0.98);
  background-color: #000;
}



/* ==================== Toast CSS ==================== */

#toast-root {
    position: fixed;
    bottom: 24px;
    right: 24px;
    max-width: 320px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.85);
    z-index: 20000; 
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.toast-show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: linear-gradient(135deg, #32b37b, #1e8f56);
}

.toast-error {
    background: linear-gradient(135deg, #e65151, #c62828);
}
