/*
Theme Name: التاريخية للعود - Al-Tareekhiyah
Theme URI: https://altareekhiyah.com
Author: Antigravity
Author URI: https://altareekhiyah.com
Description: قالب ووردبريس احترافي متكامل ومتوافق 100% مع ووكومرس (WooCommerce) لمتجر التاريخية للعود والبخور والمباخر الفاخرة، يدعم اللغة العربية بشكل كامل (RTL) مع تصميم عصري وأداء فائق السرعة.
Version: 1.7.2
Tested up to: 6.7
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: altareekhiyah
Domain Path: /languages
Tags: e-commerce, custom-menu, featured-images, full-width-template, rtl-language-support, right-to-left, theme-options
*/

:root {
  --font-main: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --color-primary: #9d7b0b;
  --color-primary-dark: #775500;
  --color-primary-light: #c3a131;
  --color-primary-reverse: #ffffd7;
  
  --bg-primary: #F8F5EF;
  --bg-secondary: #E8DFD2;
  --header-bg: #411017;
  --header-text-color: #F8F5EF;
  --store-text-primary: #411017;
  --store-text-secondary: #625A50;
  --product-bg: #FFFFFF;
  --product-border-color: #ECE7DE;
  --product-enhanced-btn-bg: #411017;
  --product-enhanced-btn-color: #F8F5EF;
  
  --footer-bg: #411017;
  --footer-text-color: #F8F5EF;
  --bottom-footer-bg: #2c0a0f;
  
  --wa-btn-bg: #25D366;
  --wa-btn-text-color: #ffffff;
  --s-radius: 0.75rem;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--store-text-primary);
  margin: 0;
  padding: 0;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

/* Custom Helper Utilities */
.alt-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Header Tweaks */
.alt-header {
  background-color: var(--header-bg);
  color: var(--header-text-color);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.alt-header a {
  color: var(--header-text-color);
  text-decoration: none;
}

.alt-nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.alt-nav-menu li a {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.alt-nav-menu li a:hover,
.alt-nav-menu li.current-menu-item > a {
  color: var(--color-primary-light);
  background: rgba(255, 255, 255, 0.05);
}

/* Enhanced Section Titles */
.alt-section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.alt-section-title h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--store-text-primary);
  margin-bottom: 0.5rem;
}

.alt-section-title p {
  color: var(--store-text-secondary);
  font-size: 1.1rem;
  margin: 0 auto;
  max-width: 600px;
}

.alt-title-divider {
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--color-primary);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

/* Salla-Style Luxury Product Card Container */
.alt-product-card {
  background: #ffffff !important;
  border: 1px solid #ECE7DE !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  transition: all 0.25s ease-in-out !important;
  position: relative !important;
  text-decoration: none !important;
  color: inherit !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.alt-product-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 24px rgba(65, 16, 23, 0.09) !important;
  border-color: #CDBA9E !important;
}

/* Salla Product Thumbnail Container - CONTAINED, NO CROPPING OR ZOOMING */
.alt-product-thumb {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  background: #FCFAF6 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 14px !important; /* Generous breathing space like Salla */
  overflow: hidden !important;
  border-bottom: 1px solid #F4EFE6 !important;
}

.alt-product-thumb a {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.alt-product-thumb img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important; /* Crucial: No zoom or clipping */
  object-position: center !important;
  transition: transform 0.3s ease !important;
}

.alt-product-card:hover .alt-product-thumb img {
  transform: scale(1.03) !important; /* Subtle elegance */
}

/* Salla Sale Badge */
.alt-badge-sale {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  background: #d9383a !important;
  color: #ffffff !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 0.2rem 0.55rem !important;
  border-radius: 6px !important;
  z-index: 5 !important;
  box-shadow: 0 2px 5px rgba(217, 56, 58, 0.25) !important;
}

/* Salla Card Details */
.alt-product-details {
  padding: 12px 14px 14px !important;
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1 !important;
}

.alt-product-category {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #9d7b0b !important;
  margin-bottom: 4px !important;
  display: block !important;
}

.alt-product-title {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #411017 !important;
  margin: 0 0 8px !important;
  line-height: 1.45 !important;
  height: 2.75rem !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
}

.alt-product-price {
  font-size: 1.1rem !important;
  font-weight: 800 !important;
  color: #411017 !important;
  margin-top: auto !important;
  margin-bottom: 10px !important;
  display: flex !important;
  align-items: baseline !important;
  gap: 6px !important;
}

.alt-product-price del {
  color: #9ca3af !important;
  font-size: 0.8rem !important;
  font-weight: 400 !important;
}

.alt-product-price ins {
  text-decoration: none !important;
  color: #411017 !important;
}

/* Salla Add To Cart Button */
.alt-btn-cart {
  background-color: #411017 !important;
  color: #F8F5EF !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  width: 100% !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
}

.alt-btn-cart:hover {
  background-color: #9d7b0b !important;
  color: #ffffff !important;
}

.alt-btn-cart i {
  font-size: 1rem !important;
}

/* Single Product Page Gallery - Salla Style Contain */
.woocommerce-product-gallery__image img,
.product-gallery-wrapper img {
  max-height: 480px !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  background: #FCFAF6 !important;
  border-radius: 12px !important;
}

/* Floating WhatsApp Button */
.alt-whatsapp-float {
  position: fixed;
  bottom: 25px;
  left: 25px;
  width: 60px;
  height: 60px;
  background: var(--wa-btn-bg);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  z-index: 99;
  font-size: 30px;
  transition: transform 0.3s ease;
  text-decoration: none;
}

.alt-whatsapp-float:hover {
  transform: scale(1.1);
  color: white;
}

/* Drawer styles */
.alt-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 380px;
  max-width: 85%;
  background: #fff;
  z-index: 1000;
  box-shadow: 0 0 30px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.alt-drawer-cart {
  left: 0;
  transform: translateX(-100%);
}

.alt-drawer-cart.open {
  transform: translateX(0);
}

.alt-drawer-menu {
  right: 0;
  transform: translateX(100%);
}

.alt-drawer-menu.open {
  transform: translateX(0);
}

.alt-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.alt-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   Luxury RTL Pagination (WooCommerce & WordPress)
   ========================================================================== */
.woocommerce-pagination,
.navigation.pagination,
.pagination {
  margin: 3.5rem auto 2rem;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.woocommerce-pagination ul.page-numbers,
.navigation.pagination .nav-links,
ul.page-numbers {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-wrap: wrap;
}

.woocommerce-pagination ul.page-numbers li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex;
}

.woocommerce-pagination .page-numbers,
.navigation.pagination .nav-links .page-numbers,
a.page-numbers,
span.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.85rem;
  border-radius: 12px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none !important;
  background: #ffffff;
  color: #411017;
  border: 1px solid #ECE7DE;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  user-select: none;
}

.woocommerce-pagination a.page-numbers:hover,
.navigation.pagination a.page-numbers:hover,
a.page-numbers:hover {
  background: #FCFAF6;
  border-color: #9d7b0b;
  color: #9d7b0b !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(157, 123, 11, 0.15);
}

.woocommerce-pagination .page-numbers.current,
.navigation.pagination .nav-links .page-numbers.current,
span.page-numbers.current {
  background: #411017 !important;
  color: #F8F5EF !important;
  border-color: #411017 !important;
  box-shadow: 0 4px 14px rgba(65, 16, 23, 0.3);
  font-weight: 800;
}

.woocommerce-pagination .page-numbers.dots,
.navigation.pagination .nav-links .page-numbers.dots,
span.page-numbers.dots {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #9CA3AF;
  min-width: 24px;
  padding: 0;
  cursor: default;
}

.woocommerce-pagination .page-numbers.prev,
.woocommerce-pagination .page-numbers.next,
.navigation.pagination .nav-links .prev,
.navigation.pagination .nav-links .next {
  background: #FDFBF7;
  border-color: #E2D9CC;
  font-size: 1.1rem;
  color: #411017;
}

.woocommerce-pagination .page-numbers.prev:hover,
.woocommerce-pagination .page-numbers.next:hover,
.navigation.pagination .nav-links .prev:hover,
.navigation.pagination .nav-links .next:hover {
  background: #411017 !important;
  border-color: #411017 !important;
  color: #F8F5EF !important;
}

@media (max-width: 640px) {
  .woocommerce-pagination ul.page-numbers,
  .navigation.pagination .nav-links {
    gap: 0.35rem;
  }
  .woocommerce-pagination .page-numbers,
  .navigation.pagination .nav-links .page-numbers {
    min-width: 38px;
    height: 38px;
    font-size: 0.85rem;
    padding: 0 0.5rem;
    border-radius: 10px;
  }
}


/* ==========================================================================
   Header & Footer shell — explicit fallbacks
   (some Tailwind arbitrary utilities are not present in the compiled CSS,
   so these rules guarantee the store shell always renders correctly)
   ========================================================================== */
.alt-announce {
  background: #2a0a0f;
  color: #F8F5EF;
  border-bottom: 1px solid #521b23;
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 500;
  text-align: center;
}

.alt-announce .container {
  max-width: 1280px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.alt-announce i {
  color: #eab308;
}

.alt-cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.alt-cart-count-badge {
  position: absolute;
  top: -2px;
  inset-inline-end: -4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #eab308;
  color: #411017;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

.alt-cart-count-badge.is-empty {
  display: none;
}

.alt-footer {
  background: #411017;
  color: #F8F5EF;
}

.alt-footer-wave {
  color: #411017;
}

.alt-footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.alt-footer-title {
  color: #facc15;
  font-size: 16px;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(94, 28, 37, .7);
  margin: 0;
}

.alt-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 13.5px;
  color: #E8DFD2;
}

.alt-footer-links a {
  color: #E8DFD2;
  text-decoration: none;
  transition: color .2s ease;
}

.alt-footer-links a:hover {
  color: #facc15;
}

.alt-footer-tax {
  background: #2c0a0f;
  border: 1px solid #5e1c25;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 11.5px;
  line-height: 1.7;
}

.alt-footer-tax b {
  color: #facc15;
  letter-spacing: .04em;
}

.alt-footer-social {
  border-bottom: 1px solid #5e1c25;
}

.alt-footer-bottom {
  background: #2c0a0f;
  border-top: 1px solid #5e1c25;
  color: #d1d5db;
  font-size: 11.5px;
}

.alt-footer-bottom .container {
  max-width: 1280px;
  margin-inline: auto;
}

@media (max-width: 640px) {
  .alt-footer-title {
    font-size: 15px;
  }
  .alt-announce {
    font-size: 11.5px;
  }
}


/* Sold-out product card button */
.alt-btn-soldout,
.alt-btn-soldout:hover {
  background: #cfc7ba !important;
  color: #fff !important;
  border-color: #cfc7ba !important;
  cursor: not-allowed;
  box-shadow: none !important;
}

/* Global WooCommerce notices (shop, archives, cart, checkout) */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.wc-block-components-notice-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid;
  background: #fff;
  font-family: 'Cairo', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.7;
  list-style: none;
}

.woocommerce-message { border-color: rgba(31, 122, 77, .3); color: #1f6b46; background: #f4fbf7; }
.woocommerce-info { border-color: rgba(169, 130, 43, .3); color: #8a6a1e; background: #fdfaf3; }
.woocommerce-error { border-color: rgba(192, 72, 63, .3); color: #a33737; background: #fdf5f4; }

.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button,
.wc-block-components-notice-banner .button {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 9px;
  background: #411017;
  color: #fff !important;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
}

.woocommerce-message .button:hover,
.woocommerce-info .button:hover,
.woocommerce-error .button:hover {
  background: #9d7b0b;
}

/* Footer brand column (Salla layout) */
.alt-footer-brand {
  align-items: flex-start;
  text-align: start;
}

.alt-footer-logo {
  display: block;
  max-height: 80px;
  width: auto;
}

.alt-footer-social-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #E8DFD2;
  margin-bottom: 10px;
}

.alt-footer-social-icons a {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #F8F5EF;
  font-size: 17px;
  text-decoration: none;
  transition: all .2s ease;
}

.alt-footer-social-icons a:hover {
  border-color: #facc15;
  color: #facc15;
}

@media (max-width: 1023px) {
  .alt-footer-brand {
    align-items: center;
    text-align: center;
  }

  .alt-footer-brand p {
    margin-inline: auto;
  }
}
