/* Souvenir Advertising - Core Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@400;600;700&display=swap');

:root {
  --primary-color: #0d21a1;
  --primary-nav-selected: #566EE3; /* Lighter version of #0d21a1 for nav selection */
  --primary-navy: var(--primary-color);
  --dark-navy: #081566;
  --navy-hover: #0a1b85;
  --accent-gold: #D4AF37;
  --accent-gold-light: #F4E8C1;
  --whatsapp-green: #25D366;
  --whatsapp-hover: #1EBE57;
  --text-dark: #1A1D20;
  --text-muted: #6C757D;
  --bg-light: #F8F9FA;
  --card-bg: #FFFFFF;
  --border-color: #E9ECEF;
  --font-main: 'Quicksand', 'Noto Sans Arabic', sans-serif;
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background-color: #FFFFFF;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('images/spatbg.png');
  background-repeat: repeat;
  opacity: 0.2;
  pointer-events: none;
  z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text-dark);
}

.arabic-text {
  font-family: 'Noto Sans Arabic', 'Quicksand', sans-serif;
  direction: rtl;
}

/* Header & Navigation */
.navbar-souvenir {
  background-color: var(--dark-navy);
  padding: 1rem 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.navbar-souvenir .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  transition: all 0.25s ease;
  background-color: transparent !important;
  position: relative;
}

.navbar-souvenir .nav-link:hover {
  color: var(--primary-nav-selected) !important;
  background-color: transparent !important;
}

.navbar-souvenir .nav-link.active {
  color: var(--primary-nav-selected) !important;
  background-color: transparent !important;
  font-weight: 700;
}

.navbar-souvenir .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1.2rem;
  right: 1.2rem;
  height: 3px;
  background-color: var(--primary-nav-selected);
  border-radius: 2px;
}

.brand-logo {
  max-height: 52px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.brand-logo:hover {
  transform: scale(1.02);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(180deg, var(--dark-navy) 0%, var(--primary-color) 100%);
  color: #FFFFFF;
  padding: 4.5rem 1rem 5rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('images/spat.png');
  background-repeat: repeat;
  opacity: 0.2;
  pointer-events: none;
  z-index: 1;
  animation: movePatternUp 30s linear infinite;
  will-change: background-position;
}

@keyframes movePatternUp {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 -500px;
  }
}

.hero-section > .container {
  position: relative;
  z-index: 2;
}

/* All Slogans Pure White */
.hero-subtitle {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #FFFFFF !important;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 700;
  color: #FFFFFF !important;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.hero-arabic {
  font-size: 1.4rem;
  color: #FFFFFF !important;
  font-weight: 600;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

/* Search Bar Placed Under Slogan */
.hero-search-container {
  max-width: 620px;
  margin: 2rem auto 0 auto;
}

.hero-search-input {
  border-radius: 30px 0 0 30px !important;
  padding: 0.85rem 1.5rem;
  font-size: 1.05rem;
  border: 2px solid #FFFFFF;
  background: #FFFFFF;
  color: #1A1D20;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.hero-search-input::placeholder {
  color: #6C757D;
}

.hero-search-input:focus {
  background: #FFFFFF;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(0, 63, 136, 0.25);
}

.hero-search-btn {
  border-radius: 0 30px 30px 0 !important;
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
  background-color: var(--primary-color);
  color: #FFFFFF;
  border: 2px solid var(--primary-color);
  font-weight: 600;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-search-btn:hover {
  background-color: var(--navy-hover);
  border-color: var(--navy-hover);
  color: #FFFFFF;
}

.hero-svg-container {
  max-width: 750px;
  margin: 0 auto;
}

.hero-svg-container img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

/* Section Formatting */
.section-title-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 0;
}

.section-link {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.section-link:hover {
  color: var(--primary-navy);
  transform: translateX(4px);
}

/* Aspect Ratio Cards & Strict Flex Alignment */
.card-aspect {
  border: none;
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-aspect:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 11, 88, 0.1);
}

/* Image Skeleton Placeholder Loading (Bootstrap Placeholder Integration) */
.img-loading-placeholder {
  background: linear-gradient(90deg, #EBECEE 25%, #F5F6F8 50%, #EBECEE 75%);
  background-size: 200% 100%;
  animation: skeletonGlow 1.5s infinite ease-in-out;
}

@keyframes skeletonGlow {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* 1:1 Aspect Ratio Box */
.img-container-1x1 {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #F3F4F6;
  position: relative;
  flex-shrink: 0;
}

.img-container-1x1 img,
.img-container-16x9 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease-in-out, transform 0.4s ease;
}

.img-container-1x1 img.loaded,
.img-container-16x9 img.loaded {
  opacity: 1;
}

.card-aspect:hover .img-container-1x1 img {
  transform: scale(1.05);
}

/* 16:9 Aspect Ratio Box */
.img-container-16x9 {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #F3F4F6;
  position: relative;
  flex-shrink: 0;
}

.card-aspect:hover .img-container-16x9 img {
  transform: scale(1.04);
}

/* Card Content & 2-Line Truncation */
.card-content {
  padding: 1.2rem 0.5rem 0.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-item-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 1.5rem !important;
  min-height: 1.5rem !important;
  max-height: 1.5rem !important;
}

.card-item-desc {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  /* EXACT FIXED HEIGHT FOR 2 LINES ALWAYS */
  height: 2.52rem !important;
  min-height: 2.52rem !important;
  max-height: 2.52rem !important;
}

.card-action-block {
  margin-top: auto !important;
  width: 100%;
}

.card-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 0.75rem;
}

/* Dark Navy Button matching mockup */
.btn-souvenir-navy {
  background-color: var(--primary-navy);
  color: #FFFFFF;
  border: none;
  width: 100%;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}

.btn-souvenir-navy:hover {
  background-color: var(--dark-navy);
  color: #FFFFFF;
}

/* Bespoke WhatsApp Button matching mockup */
.btn-bespoke-wa {
  color: var(--whatsapp-green);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.btn-bespoke-wa:hover {
  color: var(--whatsapp-hover);
  transform: translateX(4px);
}

.bespoke-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0.25rem 0.5rem 0.25rem;
}

.bespoke-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0;
  color: var(--text-dark);
}

/* Bespoke Clickable Gallery Image Hover Styling */
.bespoke-img-clickable {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bespoke-img-clickable:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 16px rgba(0, 11, 88, 0.15) !important;
}

/* Modal Styling */
.modal-content-custom {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.modal-header-custom {
  background-color: var(--dark-navy);
  color: #FFFFFF;
  border-bottom: none;
  padding: 1.25rem 1.5rem;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.modal-header-custom .modal-title {
  color: #FFFFFF !important;
  font-weight: 700;
  margin-bottom: 0;
}

.modal-header-custom .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  margin: 0 !important;
  opacity: 0.85;
}

.modal-header-custom .btn-close:hover {
  opacity: 1;
}

[dir="rtl"] .modal-header-custom {
  flex-direction: row-reverse !important;
}

/* QR Code Container (Desktop / PC Only) */
.extra-small {
  font-size: 0.78rem;
  line-height: 1.35;
}

.qr-code-box img,
.qr-code-box canvas {
  display: block;
  width: 90px !important;
  height: 90px !important;
  border-radius: 4px;
}

.price-notice-box {
  background-color: #FFF9E6;
  border-left: 4px solid var(--accent-gold);
  padding: 0.85rem 1rem;
  border-radius: 6px;
  margin: 1rem 0;
}

.price-notice-en {
  font-weight: 600;
  font-size: 0.9rem;
  color: #856404;
  margin-bottom: 0.25rem;
}

.price-notice-ar {
  font-weight: 600;
  font-size: 0.9rem;
  color: #856404;
  direction: rtl;
  text-align: right;
  font-family: 'Noto Sans Arabic', sans-serif;
}

.btn-whatsapp-large {
  background-color: var(--whatsapp-green);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  transition: background-color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  text-decoration: none;
}

.btn-whatsapp-large:hover {
  background-color: var(--whatsapp-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* Contact Page Icon Circles */
.contact-icon-circle {
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Quick Search Form in Header */
.search-input-header {
  border-radius: 20px 0 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  padding-left: 1rem;
}

.search-input-header::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-input-header:focus {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: none;
}

.search-btn-header {
  border-radius: 0 20px 20px 0;
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-left: none;
}

.search-btn-header:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
}

/* Footer */
.footer-souvenir {
  background-color: var(--dark-navy);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 0 1.5rem 0;
  border-top: 4px solid var(--primary-navy);
  margin-top: auto;
}

.footer-title {
  color: #FFFFFF;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.footer-link:hover {
  color: #FFFFFF;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: 0.9rem;
  text-align: center;
}

/* Responsive adjustments matching desktop & mobile ref */
@media (max-width: 768px) {
  .navbar-souvenir {
    padding-top: max(0.5rem, env(safe-area-inset-top));
    padding-bottom: 0.5rem;
  }
  .brand-logo {
    max-height: 38px;
  }
  .hero-title {
    font-size: 1.85rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .hero-arabic {
    font-size: 1.1rem;
  }
  .section-title {
    font-size: 1.75rem;
  }
  .bespoke-footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .brand-logo {
    max-height: 32px;
  }
}

/* RTL Support Rules */
[dir="rtl"] {
  font-family: 'Noto Sans Arabic', 'Quicksand', sans-serif;
}

[dir="rtl"] .hero-search-input {
  border-radius: 0 30px 30px 0 !important;
}

[dir="rtl"] .hero-search-btn {
  border-radius: 30px 0 0 30px !important;
}

[dir="rtl"] .bi-arrow-right {
  transform: scaleX(-1);
  display: inline-block;
}

[dir="rtl"] .bi-chevron-right {
  transform: scaleX(-1);
  display: inline-block;
}

[dir="rtl"] .bi-chevron-left {
  transform: scaleX(-1);
  display: inline-block;
}

[dir="rtl"] .price-notice-box {
  border-left: none;
  border-right: 4px solid var(--accent-gold);
}

.lang-switch-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-switch-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
}
