/*
Theme Name: QHWH Coffee
Theme URI: https://qhwh.io
Author: Ibrahim
Author URI: https://qhwh.io
Description: ثيم قهوة فاخر لموقع qhwh.io - منتجات رقمية
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: qhwh
Tags: rtl-language, right-to-left, e-commerce, digital-products
*/

/* ===========================
   CSS Variables - Coffee Palette
   =========================== */
:root {
  --espresso:     #1a0f0a;
  --dark-roast:   #2d1a0e;
  --medium-roast: #4a2c17;
  --coffee:       #6b3a1f;
  --caramel:      #c17f3e;
  --latte:        #d4a96a;
  --cream:        #f0dfc0;
  --milk:         #faf4eb;
  --white:        #ffffff;

  --text-primary:   #1a0f0a;
  --text-secondary: #6b4c35;
  --text-muted:     #9c7a5e;

  --shadow-sm: 0 2px 8px rgba(26,15,10,0.08);
  --shadow-md: 0 8px 32px rgba(26,15,10,0.14);
  --shadow-lg: 0 20px 60px rgba(26,15,10,0.20);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  --font-arabic: 'Tajawal', 'Cairo', sans-serif;
  --font-display: 'Playfair Display', serif;
}

/* ===========================
   Reset & Base
   =========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-arabic);
  background-color: var(--milk);
  color: var(--text-primary);
  line-height: 1.7;
  direction: rtl;
}

a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--caramel); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===========================
   Typography
   =========================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.3;
  color: var(--espresso);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.75rem); }

p { margin-bottom: 1rem; color: var(--text-secondary); }

/* ===========================
   Layout
   =========================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 80px 0; }
.section--lg { padding: 120px 0; }

/* ===========================
   Header / Navigation
   =========================== */
#masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 244, 235, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(193, 127, 62, 0.15);
  box-shadow: var(--shadow-sm);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo img { height: 40px; width: auto; }

.site-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--espresso);
  letter-spacing: -0.02em;
}

.site-title span { color: var(--caramel); }

/* Navigation */
.main-navigation ul {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.main-navigation a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.4rem 0;
  position: relative;
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 0; height: 2px;
  background: var(--caramel);
  transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item > a::after { width: 100%; }

.nav-cta {
  background: var(--caramel) !important;
  color: var(--white) !important;
  padding: 0.6rem 1.4rem !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.2s !important;
}

.nav-cta:hover {
  background: var(--coffee) !important;
  transform: translateY(-1px) !important;
}

.nav-cta::after { display: none !important; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--espresso);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===========================
   Hero Section
   =========================== */
.hero {
  background: var(--espresso);
  color: var(--white);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -20%;
  width: 140%; height: 200%;
  background: radial-gradient(ellipse at 60% 40%, rgba(193,127,62,0.18) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(74,44,23,0.5) 0%, transparent 50%);
  pointer-events: none;
}

/* Decorative coffee rings */
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 400px; height: 400px;
  border: 60px solid rgba(193,127,62,0.06);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 700px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(193,127,62,0.2);
  border: 1px solid rgba(193,127,62,0.3);
  color: var(--latte);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

.hero h1 em {
  font-style: normal;
  color: var(--latte);
}

.hero p {
  color: rgba(240,223,192,0.8);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  max-width: 540px;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

/* ===========================
   Buttons
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--font-arabic);
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  text-align: center;
}

.btn-primary {
  background: var(--caramel);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(193,127,62,0.4);
}

.btn-primary:hover {
  background: var(--latte);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(193,127,62,0.5);
  color: var(--espresso);
}

.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1.5px solid rgba(240,223,192,0.4);
}

.btn-outline:hover {
  background: rgba(240,223,192,0.08);
  border-color: var(--cream);
  color: var(--white);
}

.btn-dark {
  background: var(--espresso);
  color: var(--cream);
}

.btn-dark:hover {
  background: var(--dark-roast);
  transform: translateY(-2px);
}

/* ===========================
   Section Headers
   =========================== */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  background: rgba(193,127,62,0.1);
  color: var(--caramel);
  padding: 0.3rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-header h2 { margin-bottom: 0.75rem; }
.section-header p { max-width: 500px; margin: 0 auto; }

/* ===========================
   Products Grid
   =========================== */
.products-section { background: var(--white); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

/* Product Card */
.product-card {
  background: var(--milk);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(193,127,62,0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-card__image {
  aspect-ratio: 16/10;
  background: var(--dark-roast);
  position: relative;
  overflow: hidden;
}

.product-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.product-card__badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--caramel);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
}

.product-card__body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card__category {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--caramel);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.product-card__title {
  font-size: 1.3rem;
  color: var(--espresso);
  margin-bottom: 0.6rem;
}

.product-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.25rem;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(193,127,62,0.1);
}

.product-price {
  display: flex;
  flex-direction: column;
}

.product-price__amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--espresso);
  line-height: 1;
}

.product-price__period {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.product-price--sale .product-price__amount { color: var(--caramel); }

.btn-buy {
  background: var(--espresso);
  color: var(--cream);
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: var(--font-arabic);
}

.btn-buy:hover {
  background: var(--caramel);
  transform: translateY(-1px);
  color: var(--white);
}

/* ===========================
   Features / Why Us
   =========================== */
.features-section { background: var(--milk); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--white);
  padding: 2rem 1.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(193,127,62,0.1);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: var(--caramel);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--caramel), var(--latte));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.4rem;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.feature-card p { font-size: 0.9rem; margin: 0; }

/* ===========================
   Stats Bar
   =========================== */
.stats-bar {
  background: var(--dark-roast);
  padding: 40px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat-item { padding: 1rem; }

.stat-number {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--latte);
  display: block;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(212,169,106,0.7);
}

/* ===========================
   Testimonials
   =========================== */
.testimonials-section { background: var(--white); }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--milk);
  padding: 1.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(193,127,62,0.1);
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 1rem; left: 1.5rem;
  font-size: 4rem;
  color: var(--caramel);
  opacity: 0.3;
  font-family: var(--font-display);
  line-height: 1;
}

.testimonial-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  margin-top: 1rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.testimonial-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--caramel), var(--medium-roast));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.testimonial-name { font-weight: 600; font-size: 0.9rem; color: var(--espresso); }
.testimonial-role { font-size: 0.78rem; color: var(--text-muted); }

/* Stars */
.stars { color: var(--caramel); font-size: 0.85rem; margin-bottom: 0.5rem; }

/* ===========================
   CTA Section
   =========================== */
.cta-section {
  background: linear-gradient(135deg, var(--espresso) 0%, var(--medium-roast) 100%);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(193,127,62,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section h2 { color: var(--white); position: relative; }
.cta-section p { color: rgba(240,223,192,0.75); position: relative; max-width: 500px; margin: 0.75rem auto 2rem; }
.cta-section .btn-primary { position: relative; }

/* ===========================
   Footer
   =========================== */
#colophon {
  background: var(--espresso);
  color: rgba(240,223,192,0.7);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(193,127,62,0.15);
  margin-bottom: 30px;
}

.footer-brand .site-title { color: var(--cream); margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.9rem; color: rgba(240,223,192,0.6); margin: 0; }

.footer-col h4 {
  color: var(--latte);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col a { font-size: 0.9rem; color: rgba(240,223,192,0.6); transition: color 0.2s; }
.footer-col a:hover { color: var(--latte); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.footer-social { display: flex; gap: 1rem; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(193,127,62,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--latte);
  transition: background 0.2s;
  font-size: 0.9rem;
}

.footer-social a:hover { background: var(--caramel); color: var(--white); }

/* ===========================
   Single Product Page
   =========================== */
.product-hero {
  background: var(--espresso);
  padding: 60px 0;
  color: var(--white);
}

.product-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.product-hero-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.product-hero-content h1 { color: var(--white); margin-bottom: 1rem; }
.product-hero-content p { color: rgba(240,223,192,0.8); margin-bottom: 2rem; }

.product-pricing-box {
  background: rgba(193,127,62,0.12);
  border: 1px solid rgba(193,127,62,0.25);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.product-pricing-box .price-big {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--latte);
  line-height: 1;
}

.product-pricing-box .price-period {
  font-size: 0.9rem;
  color: rgba(212,169,106,0.7);
  margin-top: 4px;
}

.product-features-list { margin: 1.5rem 0; }
.product-features-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.5rem 0;
  color: rgba(240,223,192,0.85);
  font-size: 0.95rem;
}

.product-features-list li::before {
  content: '✓';
  width: 22px; height: 22px;
  background: rgba(193,127,62,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--caramel);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===========================
   WooCommerce Overrides
   =========================== */
.woocommerce .button,
.woocommerce button.button {
  background: var(--caramel) !important;
  color: var(--white) !important;
  border-radius: 50px !important;
  padding: 0.75rem 1.75rem !important;
  font-family: var(--font-arabic) !important;
  font-weight: 600 !important;
  transition: background 0.2s !important;
}

.woocommerce .button:hover,
.woocommerce button.button:hover {
  background: var(--coffee) !important;
  color: var(--white) !important;
}

.woocommerce-cart table.cart td.actions .coupon .input-text,
.woocommerce form .form-row input.input-text {
  border: 1.5px solid rgba(193,127,62,0.25) !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.6rem 1rem !important;
  font-family: var(--font-arabic) !important;
}

.woocommerce-cart table.cart td.actions .coupon .input-text:focus,
.woocommerce form .form-row input.input-text:focus {
  border-color: var(--caramel) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(193,127,62,0.12) !important;
}

.woocommerce span.onsale {
  background: var(--caramel) !important;
  border-radius: 50px !important;
}

.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: var(--caramel) !important;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .main-navigation {
    display: none;
    position: absolute;
    top: 70px; right: 0; left: 0;
    background: var(--milk);
    border-bottom: 1px solid rgba(193,127,62,0.15);
    padding: 1rem 1.5rem;
  }

  .main-navigation.is-open { display: block; }
  .main-navigation ul { flex-direction: column; gap: 0.5rem; }
  .main-navigation a { display: block; padding: 0.6rem 0; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }

  .product-hero-grid { grid-template-columns: 1fr; }

  .hero-actions { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .section { padding: 50px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-up {
  animation: fadeUp 0.6s ease forwards;
  opacity: 0;
}

.animate-up:nth-child(1) { animation-delay: 0.1s; }
.animate-up:nth-child(2) { animation-delay: 0.2s; }
.animate-up:nth-child(3) { animation-delay: 0.3s; }
.animate-up:nth-child(4) { animation-delay: 0.4s; }

/* ===========================
   Utility
   =========================== */
.text-center { text-align: center; }
.text-caramel { color: var(--caramel); }
.bg-dark { background: var(--espresso); }
.bg-cream { background: var(--milk); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
