/* =========================================================
   BARAN DATES — RESPONSIVE STYLES
   Consolidated responsive rules for desktop, tablet and mobile.
   Keep page-specific base styles in their original CSS files.
========================================================= */

/* ---------- RTL / Persian shared adjustments ---------- */
html[dir="rtl"] body {
  font-family: var(--font-body);
  text-align: right;
}

html[dir="rtl"] .hero-title,
html[dir="rtl"] .section-title,
html[dir="rtl"] .about-card-inner h3,
html[dir="rtl"] .product-details h3,
html[dir="rtl"] .cta-box h2,
html[dir="rtl"] .info-card h3,
html[dir="rtl"] .contact-form h3,
html[dir="rtl"] .why-card h3,
html[dir="rtl"] .pack-card h3 {
  font-family: var(--font-display);
}

html[dir="rtl"] .btn-outline.dark {
  color: var(--brown-deep);
  border-color: var(--brown);
}

html[dir="rtl"] .btn-outline.dark:hover {
  background: var(--brown-deep);
  color: var(--white);
  border-color: var(--brown-deep);
}

html[dir="rtl"] .nav-list {
  flex-direction: row-reverse;
}

html[dir="rtl"] .header-inner {
  flex-direction: row-reverse;
}

html[dir="rtl"] .logo {
  flex-direction: row-reverse;
}

html[dir="rtl"] .header-actions {
  flex-direction: row-reverse;
}

html[dir="rtl"] .about-grid,
html[dir="rtl"] .product-showcase,
html[dir="rtl"] .markets-visual,
html[dir="rtl"] .contact-grid {
  direction: rtl;
}

html[dir="rtl"] .highlight-item,
html[dir="rtl"] .market-item {
  flex-direction: row-reverse;
  text-align: right;
}

html[dir="rtl"] .product-features li {
  flex-direction: row-reverse;
}

html[dir="rtl"] .info-list li {
  text-align: right;
}

html[dir="rtl"] .footer-grid {
  direction: rtl;
}

html[dir="rtl"] .footer-bottom {
  flex-direction: row-reverse;
}

html[dir="rtl"] .form-group label,
html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group select,
html[dir="rtl"] .form-group textarea {
  text-align: right;
}

html[dir="rtl"] .quality-note {
  border-right: 4px solid var(--gold);
  border-left: none;
}


/* ---------- About page image/card details ---------- */
.about-card-photo {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.about-card {
  overflow: hidden;
  padding: 0;
}

.about-card .about-card-inner {
  padding: 28px 28px 36px;
  border-radius: 0 0 calc(var(--radius-lg) - 2px) calc(var(--radius-lg) - 2px);
}


/* ---------- Page hero ---------- */
.page-hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, var(--brown-deep) 0%, var(--green-deep) 100%);
  color: var(--white);
  text-align: center;
}

.page-hero h1 {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
}

.page-hero p {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}


/* ---------- Language switch colors ---------- */
.header .lang-switch {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(61, 35, 20, 0.92);
}

.header .lang-switch a,
.header.scrolled .lang-switch a {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 6px;
  color: #f5ead2 !important;
  background: transparent !important;
  opacity: 1 !important;
  text-decoration: none;
  transition: none;
}

.header .lang-switch a.active,
.header.scrolled .lang-switch a.active {
  color: var(--gold) !important;
  background: rgba(201, 162, 39, 0.18) !important;
}

.header .lang-switch a:hover,
.header.scrolled .lang-switch a:hover {
  opacity: 1;
}


/* ---------- About highlights ---------- */
.about .about-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.about .about-highlights .highlight-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 18px 16px;
  background: rgba(255, 254, 249, 0.85);
  border: 1px solid rgba(92, 58, 33, 0.09);
  border-radius: var(--radius);
  box-shadow: none;
  transition: var(--transition);
}

.about .about-highlights .highlight-item:hover {
  border-color: rgba(201, 162, 39, 0.5);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.about .about-highlights .highlight-icon {
  display: flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--green);
  background: var(--cream);
  border-radius: 12px;
}

.about .about-highlights .highlight-icon svg {
  width: 23px;
  height: 23px;
}

.about .about-highlights .highlight-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.about .about-highlights .highlight-copy strong {
  color: var(--brown-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.045em;
}

.about .about-highlights .highlight-copy span {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}




/* ---------- Tablet and smaller laptops ---------- */
@media (max-width: 1024px) {
  /* Main page layouts */
  .about-grid,
  .product-showcase,
  .markets-visual,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .capacity-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .packaging-grid,
  .why-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-image {
    min-height: 340px;
  }

  /* Product slider on the home page */
  .product-slider {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 4 / 3;
    margin-left: auto;
    margin-right: auto;
  }

  .product-details {
    width: 100%;
  }

  /* Dedicated product page */
  .product-hero {
    padding-top: 100px;
    padding-bottom: 80px;
  }

  .product-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 32px;
  }

  .product-hero-content h1 {
    font-size: clamp(2.3rem, 4vw, 3.2rem);
  }

  .product-image-frame {
    width: 100%;
  }

  .product-intro-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
  }

  .product-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .product-packaging-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .product-packaging-card {
    padding: 24px 18px;
  }

  /* Header: switch to the mobile navigation before items become cramped */
  .header-inner {
    gap: 12px;
  }

  .header .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
    padding: 100px 28px 40px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--brown-deep);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
    transition: right var(--transition), left var(--transition);
    z-index: 1001;
  }

  .header .nav.open {
    right: 0;
  }

  .header .nav-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .header .nav-link {
    display: block;
    padding: 12px 8px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 1rem;
    white-space: normal;
  }

  .header .nav-link:hover,
  .header .nav-link.active,
  .header.scrolled .nav-link,
  .header.scrolled .nav-link:hover,
  .header.scrolled .nav-link.active {
    color: var(--gold);
  }

  .header .nav-toggle {
    display: flex;
    position: relative;
    z-index: 1002;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  .header .header-actions .btn {
    display: none;
  }

  .header .logo-coin {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
  }

  /* The language switch should not be pushed outside the header */
  .header .lang-switch {
    transform: none;
  }

  /* RTL menu enters from the left */
  html[dir="rtl"] .header .nav {
    right: auto;
    left: -100%;
  }

  html[dir="rtl"] .header .nav.open {
    left: 0;
    right: auto;
  }

  html[dir="rtl"] .header .nav-list {
    align-items: stretch;
  }

  html[dir="rtl"] .header .nav-link {
    text-align: right;
  }
}


/* ---------- Mobile and tablet ---------- */
@media (max-width: 768px) {
  /* General spacing and typography */
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  body {
    font-size: 1rem;
  }

  .section-desc {
    font-size: 1rem;
  }

  .about-lead {
    font-size: 1.1rem;
  }

  .hero-content {
    padding: 100px 20px 60px;
  }

  .page-hero {
    padding: 120px 20px 64px;
  }

  .page-hero h1 {
    font-size: clamp(2rem, 7vw, 2.7rem);
  }

  /* Single-column content sections */
  .about-grid,
  .product-showcase,
  .markets-visual,
  .contact-grid,
  .packaging-grid,
  .why-grid,
  .markets-list,
  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-showcase {
    gap: 28px;
  }

  .capacity-grid {
    max-width: 420px;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .cta-box {
    padding: 42px 24px;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 320px;
  }

  .info-card,
  .contact-form-wrap {
    padding: 26px 22px;
  }

  .map-placeholder {
    max-width: 100%;
  }

  /* About page cards and highlights */
  .about-card-photo {
    height: 250px;
  }

  .about-card .about-card-inner {
    padding: 24px 22px 30px;
  }

  .about .about-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .about .about-highlights .highlight-item {
    min-width: 0;
    padding: 15px 13px;
    gap: 11px;
  }

  .about .about-highlights .highlight-copy strong,
  .about .about-highlights .highlight-copy span {
    font-size: 0.78rem;
  }

  /* Home page product slider */
  .product-slider {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
  }

  .product-slider .slider-arrow {
    width: 40px;
    height: 40px;
    font-size: 17px;
  }

  .product-slider .slider-arrow.prev {
    left: 10px;
  }

  .product-slider .slider-arrow.next {
    right: 10px;
  }

  /* CTA and form controls */
  .hero-cta {
    flex-wrap: wrap;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    max-width: 100%;
  }

  /* Dedicated product page */
  .products-page {
    overflow-x: clip;
  }

  .product-hero {
    padding-top: 76px;
    padding-bottom: 64px;
  }

  .product-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
  }

  .product-hero-content {
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .product-hero-content h1 {
    font-size: clamp(2.2rem, 7vw, 3.2rem);
  }

  .product-hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .product-hero-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .product-origin {
    justify-content: center;
  }

  .product-hero-visual {
    width: 100%;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
  }

  .product-stamp {
    transform: scale(0.82);
    transform-origin: top right;
  }

  .product-introduction,
  .product-gallery-section,
  .product-packaging-section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .product-intro-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .product-intro-heading,
  .gallery-heading {
    text-align: center;
  }

  .product-intro-text {
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
  }

  .product-features-panel {
    width: 100%;
  }

  .product-packaging-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-final-cta {
    padding: 52px 24px;
  }

  .product-final-cta-inner {
    text-align: center;
  }

  /* RTL layout adjustments */
  html[dir="rtl"] .about-grid,
  html[dir="rtl"] .product-showcase,
  html[dir="rtl"] .markets-visual,
  html[dir="rtl"] .contact-grid,
  html[dir="rtl"] .footer-grid {
    direction: rtl;
  }

  html[dir="rtl"] .highlight-item,
  html[dir="rtl"] .market-item {
    flex-direction: row-reverse;
    text-align: right;
  }

  html[dir="rtl"] .product-features li {
    flex-direction: row-reverse;
  }

  html[dir="rtl"] .info-list li,
  html[dir="rtl"] .form-group label,
  html[dir="rtl"] .form-group input,
  html[dir="rtl"] .form-group select,
  html[dir="rtl"] .form-group textarea {
    text-align: right;
  }

  html[dir="rtl"] .footer-bottom {
    flex-direction: column;
  }
}


/* ---------- Small phones ---------- */
@media (max-width: 480px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  .hero-title {
    font-size: clamp(2rem, 9vw, 2.35rem);
    line-height: 1.2;
  }

  .hero-content {
    padding: 92px 16px 52px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .page-hero {
    padding: 108px 16px 54px;
  }

  .page-hero h1 {
    font-size: 2rem;
    line-height: 1.25;
  }

  .page-hero p {
    font-size: 0.95rem;
  }

  .pack-options {
    flex-direction: column;
  }

  .about .about-highlights {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .about .about-highlights .highlight-item {
    padding: 14px;
  }

  .about-card-photo {
    height: 220px;
  }

  .about-card .about-card-inner {
    padding: 21px 18px 26px;
  }

  .cta-box {
    padding: 34px 18px;
  }

  .info-card,
  .contact-form-wrap {
    padding: 22px 17px;
  }

  /* Header */
  .header {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .header.scrolled {
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .header-inner {
    gap: 8px;
  }

  .header .logo {
    gap: 7px;
  }

  .header .logo-coin {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .header .logo-text {
    font-size: 15px;
  }

  .header .header-actions {
    gap: 5px;
    margin-right: 0;
  }

  .header .lang-switch {
    gap: 2px;
    font-size: 0.78rem;
  }

  .header .lang-switch a,
  .header.scrolled .lang-switch a {
    padding: 5px 7px;
  }

  .header .nav {
    width: 270px;
    max-width: 88vw;
    padding: 88px 22px 32px;
  }

  .header .nav-toggle {
    padding: 7px;
  }

  /* Home page product slider */
  .product-slider {
    aspect-ratio: 4 / 3;
  }

  .product-slider .slider-arrow {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  /* Dedicated product page */
  .product-hero {
    padding-top: 58px;
    padding-bottom: 52px;
  }

  .product-hero-grid {
    gap: 30px;
  }

  .product-hero-content h1 {
    font-size: 2.15rem;
    line-height: 1.25;
  }

  .product-hero-description {
    font-size: 0.95rem;
    line-height: 1.85;
  }

  .product-hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .product-hero-actions a {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .product-origin {
    font-size: 0.84rem;
    flex-wrap: wrap;
  }

  .product-image-frame {
    border-radius: 16px;
  }

  .product-image-frame img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .product-image-caption {
    font-size: 0.8rem;
  }

  .product-stamp {
    transform: scale(0.65);
  }

  .product-introduction,
  .product-gallery-section,
  .product-packaging-section {
    padding-top: 52px;
    padding-bottom: 52px;
  }

  .product-intro-heading {
    font-size: 1.8rem;
  }

  .product-intro-lead {
    font-size: 1rem;
    line-height: 1.85;
  }

  .product-feature {
    padding: 17px 14px;
    gap: 11px;
  }

/* Product gallery - Mobile layout fix */
.product-gallery {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-rows: 230px;
    gap: 16px;
    width: 100%;
}

/* Remove desktop grid positioning */
.product-gallery .gallery-large,
.product-gallery .gallery-packaging {
    grid-column: auto;
    grid-row: auto;
}

/* Equal image boxes */
.product-gallery .gallery-item {
    display: block;
    position: relative;
    width: 100%;
    height: 230px;
    min-height: 0;
    overflow: hidden;
}

/* Fill each box with its image */
.product-gallery .gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}


/* Packaging cards - compact mobile layout */
.product-packaging-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.product-packaging-card {
    min-height: 0;
    padding: 24px 20px;
}

.pack-index {
    top: 14px;
    left: 16px;
}

.pack-weight {
    font-size: 2.2rem;
    margin: 12px 0;
}

.pack-divider {
    margin-bottom: 16px;
}

.product-packaging-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.product-packaging-card p {
    font-size: 0.88rem;
    line-height: 1.8;
}

.pack-tag {
    margin-top: 14px;
}

.packaging-note {
    margin-top: 24px;
    line-height: 1.8;
}


  .pack-weight {
    font-size: 1.9rem;
  }

  .packaging-note {
    font-size: 0.9rem;
    line-height: 1.8;
  }

  .product-final-cta {
    padding: 42px 18px;
  }

  .product-final-cta-inner h2 {
    font-size: 1.65rem;
    line-height: 1.4;
  }

  .product-final-cta-inner p {
    font-size: 0.9rem;
    line-height: 1.8;
  }
}


/* ---------- Very narrow phones ---------- */
@media (max-width: 360px) {
  .container {
    padding-left: 13px;
    padding-right: 13px;
  }

  .header .logo-text {
    font-size: 14px;
  }

  .header .logo-coin {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .header .lang-switch a,
  .header.scrolled .lang-switch a {
    padding-left: 5px;
    padding-right: 5px;
  }

  .product-hero-content h1 {
    font-size: 1.95rem;
  }
}


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