/**
 * ATON LEATHER GOODS — MASTER STYLESHEET (COMPREHENSIVE FIX & RTL REFINEMENT)
 * Clean, balanced, light modern luxury layout
 */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Cairo:wght@300;400;500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');
@import url('variables.css');
@import url('animations.css');

/* ============================================================
   1. RESET & GLOBAL BOX MODEL
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-main, #FAFAFB);
  color: var(--text-main, #1E293B);
  font-family: var(--font-sans, "Plus Jakarta Sans", sans-serif);
  font-size: var(--text-base, 0.9375rem);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body[dir="rtl"] {
  font-family: var(--font-arabic-body, "Cairo", sans-serif);
  direction: rtl;
  text-align: right;
}

body[dir="ltr"] {
  direction: ltr;
  text-align: left;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif, "Cormorant Garamond", serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-main, #1E293B);
}

body[dir="rtl"] h1,
body[dir="rtl"] h2,
body[dir="rtl"] h3,
body[dir="rtl"] h4,
body[dir="rtl"] h5,
body[dir="rtl"] h6 {
  font-family: var(--font-arabic-heading, "Amiri", serif);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: 24px;
}

.container-narrow {
  max-width: 980px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ============================================================
   2. GLOBAL LOGO CONSTRAINT (STRICT 48PX PROTECTION)
   ============================================================ */
.header-logo, 
.header-logo img, 
.header-logo svg, 
.logo-wrapper img, 
.site-logo, 
.brand-logo-img, 
.header-logo-wrap img {
  max-height: 48px !important;
  height: 48px !important;
  width: auto !important;
  max-width: 180px !important;
  object-fit: contain !important;
  display: block !important;
  flex-shrink: 0 !important;
}

/* ============================================================
   3. FIXED / STICKY HEADER & NAVBAR
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-subtle, #E2E8F0);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  padding: 10px 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: 24px;
  gap: 20px;
}

.header-logo-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.5vw, 32px);
  flex-wrap: wrap;
}

.nav-link {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--text-main, #1E293B);
  padding: 6px 4px;
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-color, #C8A15A);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color, #C8A15A);
  transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.header-action-btn {
  color: var(--text-main, #1E293B);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 6px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.header-action-btn:hover {
  color: var(--accent-color, #C8A15A);
  transform: translateY(-1px);
}

.badge-count {
  position: absolute;
  top: -2px;
  right: -4px;
  background-color: var(--accent-color, #C8A15A);
  color: #1A120D;
  font-size: 0.625rem;
  font-weight: 700;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle {
  display: none;
}

/* ============================================================
   4. BUTTON SYSTEM
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 6px;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.btn-primary, .btn-gold {
  background-color: var(--accent-color, #C8A15A);
  color: #1A120D;
  border: 1px solid var(--accent-color, #C8A15A);
}

.btn-primary:hover, .btn-gold:hover {
  background-color: #B58F47;
  border-color: #B58F47;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 161, 90, 0.3);
}

.btn-espresso {
  background-color: var(--primary-color, #211712);
  color: #FFFFFF;
  border: 1px solid var(--primary-color, #211712);
}

.btn-espresso:hover {
  background-color: #352018;
  transform: translateY(-2px);
}

.btn-outline-gold {
  background: transparent;
  border: 1.5px solid var(--accent-color, #C8A15A);
  color: var(--accent-color, #C8A15A);
}

.btn-outline-gold:hover {
  background-color: var(--accent-color, #C8A15A);
  color: #1A120D;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.75rem;
}

.btn-block {
  width: 100%;
}

/* ============================================================
   5. HERO SECTION (FLEXBOX / BALANCED PADDING 60PX 5%)
   ============================================================ */
.hero-balanced {
  background: linear-gradient(135deg, #FAF7F2 0%, #F5EFEB 100%);
  padding: 60px 5%;
  border-bottom: 1px solid var(--border-subtle, #E2E8F0);
  width: 100%;
}

.hero-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  max-width: 1360px;
  margin: 0 auto;
  width: 100%;
}

.hero-content {
  flex: 1.1;
}

.hero-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-color, #C8A15A);
  margin-bottom: 8px;
}

.hero-title {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-family: var(--font-serif, "Cormorant Garamond", serif);
  font-weight: 700;
  color: var(--text-main, #1E293B);
  line-height: 1.15;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  font-family: var(--font-serif, "Cormorant Garamond", serif);
  font-style: italic;
  color: #8A552F;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 0.9375rem;
  color: var(--text-muted, #64748B);
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-showcase-card {
  flex: 0.9;
  background: #FFFFFF;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-subtle, #E2E8F0);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-showcase-card img {
  max-height: 340px;
  width: 100%;
  object-fit: contain;
}

/* ============================================================
   6. PRODUCT GRID & CARDS (ASPECT-RATIO 1/1 & CONTAINED)
   ============================================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  width: 100%;
}

.product-card, 
.journal-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle, #E2E8F0);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.product-card:hover,
.journal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.09);
  border-color: #CBD5E1;
}

.product-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #F8F9FA;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.product-card img, 
.product-img {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  background-color: #F8F9FA;
  padding: 14px;
  transition: transform 0.4s ease;
}

.product-img-hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.product-card:hover .product-img {
  transform: scale(1.05);
}

.product-card:hover .product-img-hover {
  opacity: 1;
  transform: scale(1.05);
}

/* Discount Badge */
.product-badge-discount {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #16A34A;
  color: #FFFFFF;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 5;
}

body[dir="rtl"] .product-badge-discount {
  left: auto;
  right: 10px;
}

/* Wishlist Button */
.product-wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 32px;
  height: 32px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle, #E2E8F0);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

body[dir="rtl"] .product-wishlist-btn {
  right: auto;
  left: 10px;
}

.product-wishlist-btn:hover, .product-wishlist-btn.is-active {
  background: var(--accent-color, #C8A15A);
  border-color: var(--accent-color, #C8A15A);
  color: #1A120D;
}

.product-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8A552F;
  font-weight: 600;
  margin-bottom: 4px;
}

.product-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-main, #1E293B);
  margin-bottom: 8px;
  line-height: 1.35;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 12px;
}

.product-price {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-main, #1E293B);
}

.product-price-old {
  font-size: 0.8125rem;
  color: #94A3B8;
  text-decoration: line-through;
}

.product-quick-add {
  width: 100%;
  padding: 9px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  border: 1px solid var(--border-subtle, #E2E8F0);
  background: #FAFAFB;
  color: var(--text-main, #1E293B);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.product-card:hover .product-quick-add {
  background: var(--primary-color, #211712);
  color: #FFFFFF;
  border-color: var(--primary-color, #211712);
}

/* ============================================================
   7. FLOATING ACTIONS (WHATSAPP AT 25PX & SOCIAL RAIL)
   ============================================================ */
.floating-whatsapp-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  animation: subtlePulse 2.5s infinite;
  transition: transform 0.2s ease;
}

body[dir="rtl"] .floating-whatsapp-btn {
  right: auto;
  left: 25px;
}

.floating-whatsapp-btn:hover {
  transform: scale(1.1);
  color: #FFFFFF;
}

.floating-social-rail {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #FFFFFF;
  padding: 10px 6px;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle, #E2E8F0);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

body[dir="rtl"] .floating-social-rail {
  left: auto;
  right: 20px;
}

.floating-social-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  transition: all 0.2s ease;
}

.floating-social-icon:hover {
  background-color: var(--primary-color, #211712);
  color: #FFFFFF;
  transform: scale(1.1);
}

/* ============================================================
   8. FOOTER
   ============================================================ */
.site-footer {
  background-color: #FFFFFF;
  color: #475569;
  padding-top: 48px;
  padding-bottom: 24px;
  border-top: 1px solid var(--border-subtle, #E2E8F0);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand-logo {
  height: auto;
  max-height: 42px;
  width: auto;
  object-fit: contain;
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: #64748B;
  max-width: 320px;
  margin-bottom: 16px;
}

.footer-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary-color, #211712);
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-nav-list li {
  margin-bottom: 8px;
}

.footer-nav-list a {
  font-size: 0.8125rem;
  color: #475569;
}

.footer-nav-list a:hover {
  color: var(--accent-color, #C8A15A);
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle, #E2E8F0);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #64748B;
}

/* ============================================================
   9. RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid {
    flex-direction: column;
    text-align: center;
  }
  .hero-desc {
    margin-inline: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .header-nav-center {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .floating-social-rail {
    display: none;
  }
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .product-card {
    padding: 10px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .floating-whatsapp-btn {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }
  body[dir="rtl"] .floating-whatsapp-btn {
    right: auto;
    left: 16px;
  }
}
