@font-face {
    font-family: 'Vazirmatn';
    src: url('Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
  }
  @font-face {
    font-family: 'Vazirmatn';
    src: url('Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
  }
  
  body {
    margin: 0;
    font-family: 'Vazirmatn', sans-serif;
    background-color: #F8F0E5;
    color: #1A2D58;
    direction: rtl;
    text-align: center;
  }
  
  header {
    padding: 40px 20px;
  }
  
  h1 {
    margin: 10px 0;
    font-size: 1.8rem;
    font-weight: 700;
  }
  
  p.slogan {
    color: #1A2D58;
    opacity: 0.8;
    margin-bottom: 10px;
  }
  
  nav {
    background-color: #1A2D58;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  nav a img {
    width: 100px;
  }  
  .nav-links {
    display: flex;
    gap: 20px;
  }  
  nav a {
    color: #F8F0E5;
    text-decoration: none;
    font-weight: 600;
    border-radius: 20px;
    padding: 8px 18px;
    transition: 0.3s;
  }
  
  nav a:hover {
    background-color: #142041;
  }
  
  .buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
  }
  
  a.button {
    background-color: #1A2D58;
    color: #F8F0E5;
    text-decoration: none;
    padding: 14px 35px;
    border-radius: 30px;
    transition: all 0.3s;
  }
  
  a.button:hover {
    background-color: #142041;
    transform: translateY(-3px);
  }
  
  footer {
    margin-top: 60px;
    padding: 20px;
    font-size: 0.9rem;
    background-color: #1A2D58;
    color: #F8F0E5;
    opacity: 1;
  }
  
  /* --------------------------
     Products Page Styles
  --------------------------- */
  .search-wrapper {
    padding: 20px 40px 0 40px;
    max-width: 600px;
    margin: 0 auto;
  }

  .search-container {
    display: flex;
    gap: 10px;
    width: 100%;
    border-radius: 30px;
    background-color: #fff;
    padding: 8px;
    box-shadow: 0 4px 10px rgba(26, 45, 88, 0.1);
  }

  #searchInput {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 10px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    color: #1A2D58;
  }

.lang-en #searchInput {
  text-align: left;
}

  #searchInput:focus {
    outline: none;
  }

  #searchButton, #clearButton {
    border: none;
    border-radius: 25px;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
  }

  #searchButton {
    background-color: #1A2D58;
    color: #F8F0E5;
    padding: 10px 25px;
  }

  #searchButton:hover {
    background-color: #142041;
  }

  #clearButton {
    background-color: #E4D8C4;
    color: #1A2D58;
    padding: 10px 15px;
    font-size: 1.2rem;
  }

  #clearButton:hover {
    background-color: #d9cbb5;
  }

  .filter-container {
    margin-top: 15px;
    justify-self:right;
    width: 50%;
  }

  #categoryFilter {
    width: 100%;
    padding: 12px;
    border-radius: 30px;
    border: 2px solid #1A2D58;
    background-color: #fff;
    color: #1A2D58;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%231A2D58' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
  }

  #categoryFilter:focus {
    outline: none;
    border-color: #142041;
  }

  #resultsCount {
    text-align: right;
    margin-top: 10px;
    font-weight: 600;
    color: #1A2D58;
    opacity: 0.9;
  }

  .products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    padding: 40px;
  }
  
  .product-card {
    cursor: pointer;
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(26, 45, 88, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0;
    margin: 0;
  }
  
  .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(26, 45, 88, 0.15);
  }

  .product-card img {
    display: block;
    width: 100%;
    height: 250px;
    object-fit: cover;
    margin: 0;
    padding: 0;
    line-height: 0;
  }
  
  .product-item {
    width: 100%;
    margin: 0;
    padding: 0;
  }
  
  .product-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
  }
  
  .product-button img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
  }
  
  .product-title {
    width: 100%;
    text-align: center;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    color: #1A2D58;
    margin: 0;        /* 👈 kills top/bottom margin */
    padding: 0;       /* 👈 kills inner padding */
    line-height: 1;   /* 👈 prevents vertical gaps */
  }
  
  
  .product-card button:hover {
    background-color: #142041;
  }
  
  .product-info {
    background-color: #1A2D58;
    color: #F8F0E5;
    padding: 12px 0;
    border-radius: 0 0 20px 20px;
    font-weight: 600;
    width: 100%;
    margin: 0;
    text-align: center;
    line-height: 1.2;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 4em;
  }
  
  .product-info p {
    margin: 0; /* ✅ Removes the gap under the image */
    padding: 0;
  }  

  /* --------------------------
   Modal Gallery Styles
  --------------------------- */

  /* Modal container */
  .modal {
    display: none;              /* hide modal by default */
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 45, 88, 0.7);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .modal.show {
    display: flex;
    opacity: 1;
  }

  /* Modal content */
  .modal-content {
    background-color: #F8F0E5;
    border-radius: 20px;
    padding: 20px;
    max-width: 90%;
    width: 500px;
    text-align: center;
    position: relative;  /* important for arrows and layering */
    max-height: 90vh; /* Set a max-height */
    overflow-y: auto; /* Add a scrollbar if content overflows */
    display: flex;
    flex-direction: column;
  }

  .main-image-container {
    position: relative;
  }

  /* Main image */
  .modal-content img.main-img {
    width: 100%;
    border-radius: 15px;
    margin-bottom: 10px;
    display: block;
    line-height: 0;
    max-height: 60vh; /* Set a max-height for the image */
    object-fit: contain; /* Ensure the whole image is visible */
  }

  /* Thumbnails */
  .thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
  }
  
  .thumbnails img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
  }
  
  .thumbnails img:hover {
    transform: scale(1.05);
    opacity: 0.8;
  }

  /* Next / Prev buttons */
  .prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(26, 45, 88, 0.7);
    color: #F8F0E5;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    padding: 3px 12px;
    transition: background-color 0.3s;
    z-index: 10;          /* ensures arrows appear above main image */
  }

  .prev:hover, .next:hover {
    background-color: rgba(26, 45, 88, 0.9);
  }

  .prev { right: auto; left: 10px; }
  .next { left: auto; right: 10px; }

  /* Modal info text */
  .modal-info {
    color: #1A2D58;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    margin-top: 15px;
    line-height: 1.4;
    text-align: right;
  }

  .modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
  }

  .modal-explanation {
    margin-bottom: 20px;
  }

  .modal-details {
    display: flex;
    justify-content: space-between;
    gap: 20px;
  }

  .modal-sizes, .modal-colors {
    flex: 1;
  }

  .modal-details h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    border-bottom: 2px solid #1A2D58;
    padding-bottom: 5px;
  }

  .modal-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .modal-details li {
    margin-bottom: 5px;
  }

  /* Modal close button */
.modal-content .close {
  position: sticky;
  top: 5px;
  left: 5px; /* RTL layout: left is correct */
  background-color: #1A2D58;
  color: #F8F0E5;
  border: none;
  font-size: 1.4rem;
  font-weight: 700;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.modal-content .close:hover {
  background-color: #142041;
  transform: scale(1.1);
}

/* -----------------------------------
   Home Page
----------------------------------- */
.hero {
  position: relative;
  text-align: center;
  color: #fff;
  background-image: url('hero1.jpg'); /* default image */
  background-size: cover;
  background-position: center;
  padding: 100px 20px;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4); /* overlay for text contrast */
}

.hero-text {
  position: relative;
  z-index: 1;
}

.logo {
  width: 100px;
  margin-bottom: 10px;
}

.slogan {
  font-style: italic;
  font-size: 1.2em;
  margin-bottom: 20px;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 2rem;
  color: #F8F0E5;
}

.explore-btn {
  background-color: #F8F0E5;
  color: #1A2D58;
  font-weight: 600;
  padding: 14px 40px;
  border-radius: 40px;
  transition: 0.3s;
}

.explore-btn:hover {
  background-color: #ffffff;
  transform: translateY(-3px);
}

/* -----------------------------------
   About / Contact / Location
----------------------------------- */
.about {
  background-color: #fff;
  padding: 80px 20px;
  max-width: 800px;
  margin: -50px auto 0;
  border-radius: 30px;
  box-shadow: 0 6px 20px rgba(26,45,88,0.08);
}

.about h2 {
  color: #1A2D58;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.about p {
  color: #444;
  line-height: 2;
  font-size: 1rem;
}

.contact-section {
  padding: 60px 20px;
  background-color: #1A2D58;
  color: #F8F0E5;
}

.contact-section h2,
.location-section h2 {
  font-size: 1.5rem;
  margin-bottom: 30px;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.contact-btn {
  background-color: #F8F0E5;
  color: #1A2D58;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s;
}

.contact-btn img {
  width: 22px;
  height: 22px;
}

.contact-btn:hover {
  background-color: #142041;
  transform: translateY(-3px);
}

/* Location Section */
.location-section {
  background-color: #F8F0E5;
  color: #1A2D58;
  padding: 0px 20px;
}

.location-section p {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 20px;
}

.map-btn {
  background-color: #1A2D58;
  color: #F8F0E5;
  text-decoration: none;
  padding: 12px 25px;
  border-radius: 25px;
  font-weight: 600;
  transition: 0.3s;
}

.map-btn:hover {
  background-color: #142041;
  transform: translateY(-3px);
}

/* -----------------------------------
   Responsive Styles
----------------------------------- */

/* Tablet */
@media (max-width: 768px) {
  .search-wrapper {
    padding: 20px 20px 0 20px;
  }

  .filter-container {
    padding: 0;
  }

  .products-container {
    padding: 30px;
    gap: 20px;
  }

  .modal-content {
    width: 85%;
  }
}

/* Mobile */
@media (max-width: 480px) {
  nav {
    gap: 10px;
  }

  nav a {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  .search-wrapper {
    padding: 15px 15px 0 15px;
  }

  .search-container {
    padding: 6px;
    gap: 5px;
  }

  #searchInput {
    font-size: 0.9rem;
  }

  #searchButton {
    padding: 8px 18px;
    font-size: 0.9rem;
  }

  #clearButton {
    padding: 8px 12px;
    font-size: 1rem;
  }

  .filter-container {
    padding: 0;
  }

  #categoryFilter {
    padding: 10px;
    font-size: 0.9rem;
  }

  .products-container {
    padding: 20px;
    gap: 15px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .modal-content {
    width: 95%;
    padding: 15px;
  }

  .thumbnails img {
    width: 50px;
    height: 50px;
  }
}

/* -----------------------------------
   Product Showcase
----------------------------------- */
.product-showcase {
  padding: 60px 20px;
  text-align: center;
}

.product-showcase h2 {
  font-size: 1.8rem;
  margin-bottom: 40px;
}

.showcase-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
}

.showcase-products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  width: 100%;
}

.showcase-prev,
.showcase-next {
  background-color: #1A2D58;
  color: #F8F0E5;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 50%;
  padding: 10px 18px;
  transition: background-color 0.3s;
}

.showcase-prev:hover,
.showcase-next:hover {
  background-color: #142041;
}

@media (max-width: 1024px) {
  .showcase-products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .showcase-products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .showcase-products {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* -----------------------------------
   Language Switcher
----------------------------------- */
.lang-switcher select {
  background-color: #F8F0E5;
  color: #1A2D58;
  border: 1px solid #1A2D58;
  padding: 8px 12px;
  border-radius: 20px;
  font-family: 'Vazirmatn', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.lang-switcher select:focus {
  outline: none;
}


@media (max-width: 415px) {
  nav a img {
    width: 60px;
  } 
  .nav-links{
    gap: 5px;
  }
  .lang-switcher {
  gap: 5px;
  }
  .lang-switcher a {
  font-size: 10px;
  padding: 4px 6px;
  }
}
.lang-en body {
  direction: ltr;
}

.lang-en .filter-container {
  justify-self: left;
}

.lang-en #resultsCount {
  text-align: left;
}

.lang-en .modal-info {
  text-align: left;
}

.lang-en .about p {
  text-align: left;
}

.lang-en .nav-links {
  flex-direction: row-reverse;
}

.lang-en .contact-buttons {
  flex-direction: row-reverse;
}

.lang-en .showcase-container {
  flex-direction: row-reverse;
}

.lang-en nav {
  flex-direction: row-reverse;
}

.lang-en .lang-switcher {
  flex-direction: row-reverse;
}

.lang-en .search-container {
  flex-direction: row-reverse;
}

.lang-en .filter-container {
  justify-self: flex-start;
}

.lang-en #categoryFilter {
  background-position: right 15px center;
}

.lang-en .modal-details {
  flex-direction: row-reverse;
}

.lang-en .contact-btn {
  flex-direction: row-reverse;
}

.lang-en .showcase-prev {
  flex-direction: row-reverse;
}

.lang-en .showcase-next {
  flex-direction: row-reverse;
}

.lang-en .product-card {
  flex-direction: column;
}

.lang-en .product-info {
  flex-direction: row-reverse;
}

.lang-en footer {
  flex-direction: row-reverse;
}

.lang-en .hero {
  flex-direction: row-reverse;
}

.lang-en .about {
  flex-direction: row-reverse;
}

.lang-en .contact-section {
  flex-direction: row-reverse;
}

.lang-en .location-section {
  flex-direction: row-reverse;
}

.lang-en .product-showcase {
  flex-direction: row-reverse;
}

.lang-en .modal-content .close {
  right: auto;
  left: 5px;
}

.lang-en .prev {
  right: 10px;
  left: auto;
}

.lang-en .next {
  left: 10px;
  right: auto;
}
