/*
Theme Name: Ratteb SEO Store
Theme URI: https://example.com/ratteb
Author: Ratteb
Description: قالب متجر خدمات SEO عربي متجاوب، متوافق مع WooCommerce ومصمم بهوية سعودية خضراء.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
Text Domain: ratteb
Tags: rtl-language-support, e-commerce, custom-logo, custom-menu, featured-images
*/

:root {
  --cream: #f0f8f3;
  --mist: #e7f3eb;
  --sage: #9dd5af;
  --sage-soft: #dcefe2;
  --green: #006c35;
  --green-light: #008f4c;
  --ink: #10291c;
  --muted: #65766b;
  --gold: #b38a42;
  --white: #fff;
  --border: rgba(0, 108, 53, 0.12);
  --shadow: 0 24px 70px rgba(0, 70, 35, 0.1);
  --radius: 32px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 88% 8%, rgba(0, 108, 53, 0.13), transparent 420px),
    radial-gradient(circle at 8% 38%, rgba(157, 213, 175, 0.2), transparent 380px),
    linear-gradient(rgba(0, 108, 53, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 108, 53, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 40px 40px, 40px 40px;
  background-attachment: fixed;
  font-family: "Tajawal", sans-serif;
  line-height: 1.7;
}
body.admin-bar .site-header { top: 32px; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.site-header {
  position: relative;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(240, 248, 243, 0.92);
  backdrop-filter: blur(16px);
}
.header-inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px; height: 44px; display: grid; place-items: center;
  color: var(--white); background: var(--green); border-radius: 16px;
}
.brand-mark svg { width: 24px; }
.brand-name { display: block; font-size: 22px; font-weight: 900; line-height: 1.1; }
.brand-tagline { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.custom-logo { max-height: 54px; width: auto; }
.main-nav ul { display: flex; align-items: center; gap: 32px; margin: 0; padding: 0; list-style: none; }
.main-nav a { color: var(--muted); font-size: 14px; font-weight: 800; transition: color .2s; }
.main-nav a:hover, .main-nav .current-menu-item a { color: var(--green); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-button {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center;
  color: var(--green); background: var(--white); border: 1px solid var(--border); border-radius: 50%;
}
.icon-button svg { width: 21px; }
.cart-count {
  position: absolute; top: -4px; left: -4px; width: 20px; height: 20px;
  display: grid; place-items: center; color: var(--white); background: var(--gold);
  border-radius: 50%; font-size: 10px; font-weight: 900;
}
.menu-toggle { display: none; }
.button {
  min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 26px; color: var(--white); background: var(--green);
  border: 1px solid var(--green); border-radius: 999px; font-weight: 900; transition: .2s;
}
.button:hover { color: var(--white); background: var(--green-light); transform: translateY(-2px); }
.button-outline { color: var(--green); background: transparent; }
.button-outline:hover { color: var(--green); background: var(--mist); transform: none; }
.button svg { width: 18px; }

.hero { position: relative; overflow: hidden; padding: 92px 0 112px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 72px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
  color: var(--green); background: var(--white); border: 1px solid var(--border);
  border-radius: 999px; box-shadow: 0 8px 30px rgba(0, 70, 35, .06); font-size: 14px; font-weight: 800;
}
.eyebrow svg { width: 17px; }
.hero h1 { max-width: 660px; margin: 26px 0 0; font-size: clamp(48px, 6vw, 76px); line-height: 1.15; letter-spacing: -2px; font-weight: 900; }
.hero h1 span { color: var(--green); }
.hero-copy { max-width: 590px; margin: 24px 0 0; color: var(--muted); font-size: 20px; font-weight: 500; }
.hero-actions { display: flex; align-items: center; gap: 20px; margin-top: 36px; }
.trust { color: var(--muted); font-size: 14px; font-weight: 800; }
.dashboard { position: relative; padding: 26px; background: rgba(255,255,255,.84); border: 1px solid rgba(255,255,255,.9); border-radius: 40px; box-shadow: var(--shadow); }
.dashboard-head { display: flex; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.dashboard-label { color: var(--muted); font-size: 12px; font-weight: 800; }
.dashboard-title { margin: 2px 0 0; font-weight: 900; }
.dashboard-range { align-self: center; padding: 8px 12px; color: var(--green); background: var(--mist); border-radius: 12px; font-size: 12px; font-weight: 900; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.metric { min-height: 150px; padding: 20px; background: var(--sage-soft); border-radius: 24px; }
.metric.primary { color: var(--white); background: var(--green); }
.metric small { display: block; margin-top: 34px; opacity: .68; }
.metric strong { display: block; margin-top: 2px; font-size: 32px; line-height: 1.2; }
.chart-card { margin-top: 12px; padding: 20px; background: rgba(240,248,243,.8); border: 1px solid var(--border); border-radius: 24px; }
.chart-title { display: flex; justify-content: space-between; font-size: 14px; font-weight: 900; }
.bars { height: 112px; display: flex; align-items: end; gap: 8px; margin-top: 20px; }
.bars i { flex: 1; min-height: 22%; background: var(--green); border-radius: 999px; opacity: .68; }

.section { padding: 96px 0; }
.section-white { background: var(--white); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.kicker { margin: 0 0 8px; color: var(--gold); font-size: 14px; font-weight: 900; }
.section h2 { margin: 0; font-size: clamp(34px, 4vw, 50px); line-height: 1.25; font-weight: 900; }
.section-intro { max-width: 650px; margin: 12px 0 0; color: var(--muted); font-weight: 500; }
.category-list { display: flex; gap: 8px; margin-top: 36px; overflow-x: auto; }
.category-list a { flex: none; padding: 9px 20px; color: var(--muted); background: var(--cream); border-radius: 999px; font-size: 14px; font-weight: 900; }
.category-list a:hover, .category-list a.active { color: var(--white); background: var(--green); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.service-card {
  min-height: 360px; display: flex; flex-direction: column; padding: 26px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  transition: .3s;
}
.service-card:hover { transform: translateY(-5px); border-color: rgba(0,108,53,.25); box-shadow: 0 20px 50px rgba(0,70,35,.09); }
.service-icon { width: 56px; height: 56px; display: grid; place-items: center; color: var(--green); background: var(--sage-soft); border-radius: 18px; }
.service-icon svg { width: 27px; }
.service-category { margin-top: 28px; color: var(--muted); font-size: 12px; font-weight: 900; }
.service-card h3 { margin: 7px 0 0; font-size: 21px; line-height: 1.35; font-weight: 900; }
.service-excerpt { margin: 12px 0 24px; color: var(--muted); font-size: 14px; }
.service-bottom { margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between; align-items: end; border-top: 1px solid var(--border); }
.price-label { display: block; color: var(--muted); font-size: 11px; font-weight: 800; }
.price { color: var(--green); font-size: 20px; font-weight: 900; }
.detail-link { padding: 9px 16px; color: var(--green); background: var(--mist); border-radius: 999px; font-size: 13px; font-weight: 900; }
.service-card:hover .detail-link { color: var(--white); background: var(--green); }

.process-grid { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 70px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step { padding: 26px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); }
.step.featured { color: var(--white); background: var(--green); transform: translateY(30px); }
.step-number { color: var(--sage); font-size: 36px; font-weight: 900; }
.step h3 { margin: 48px 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }
.step.featured p { color: rgba(255,255,255,.66); }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; padding: 32px 0; color: var(--muted); font-size: 13px; font-weight: 800; }
.breadcrumb a:hover { color: var(--green); }
.product-layout { display: grid; grid-template-columns: .92fr 1.08fr; align-items: start; gap: 32px; padding-bottom: 75px; }
.product-visual { position: sticky; top: 28px; min-height: 570px; overflow: hidden; padding: 38px; color: var(--white); background: var(--green); border-radius: 40px; box-shadow: var(--shadow); }
.product-visual::before, .product-visual::after { content: ""; position: absolute; width: 260px; height: 260px; border: 40px solid rgba(255,255,255,.05); border-radius: 50%; }
.product-visual::before { top: -100px; left: -100px; }
.product-visual::after { bottom: -130px; right: -90px; border-color: rgba(157,213,175,.1); }
.product-visual-content { position: relative; z-index: 1; }
.product-visual .service-icon { margin-right: auto; }
.product-visual h1 { max-width: 460px; margin: 48px 0 0; font-size: clamp(38px, 5vw, 56px); line-height: 1.25; }
.product-visual p { max-width: 470px; color: rgba(255,255,255,.68); }
.product-image { margin-top: 30px; overflow: hidden; border-radius: 24px; }
.product-image img { display: block; width: 100%; max-height: 290px; object-fit: cover; }
.product-chart { position: relative; margin-top: 42px; padding: 22px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 28px; }
.product-chart .bars { height: 140px; }
.product-chart .bars i { background: var(--sage); }
.product-panel { padding: 34px; background: var(--white); border: 1px solid var(--border); border-radius: 40px; }
.stock-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; color: var(--green); background: var(--sage-soft); border-radius: 999px; font-size: 12px; font-weight: 900; }
.stock-badge::before { content: ""; width: 8px; height: 8px; background: #19a960; border-radius: 50%; }
.product-panel h2 { margin: 22px 0 0; font-size: 38px; line-height: 1.3; }
.product-summary { color: var(--muted); }
.product-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 28px 0; }
.fact { padding: 16px; background: var(--cream); border-radius: 18px; }
.fact small { display: block; color: var(--muted); font-weight: 700; }
.fact strong { display: block; margin-top: 5px; font-size: 14px; }
.product-price { padding: 24px 0; border-block: 1px solid var(--border); }
.product-price small { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.product-price .price, .product-price .woocommerce-Price-amount { font-size: 38px; }
.product-panel form.cart { display: flex; gap: 10px; margin-top: 26px; }
.product-panel .quantity input { width: 90px; height: 54px; padding: 0 12px; text-align: center; background: var(--cream); border: 1px solid var(--border); border-radius: 999px; }
.product-panel .single_add_to_cart_button { flex: 1; min-height: 54px; padding: 0 24px; color: var(--white); background: var(--green); border: 0; border-radius: 999px; font-weight: 900; }
.payment-note { margin-top: 16px; padding: 12px; color: var(--green); background: var(--mist); border-radius: 16px; text-align: center; font-size: 12px; font-weight: 800; }
.payment-note svg { width: 16px; vertical-align: middle; }
.content-panel { margin-top: 20px; padding: 32px; background: var(--white); border: 1px solid var(--border); border-radius: 32px; }
.content-panel h2 { margin-top: 0; font-size: 26px; }
.content-panel li::marker { color: var(--green); }
.related-section { padding: 70px 0 100px; border-top: 1px solid var(--border); }

.site-footer { padding: 38px 0; color: var(--white); background: var(--ink); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-copy { color: rgba(255,255,255,.55); font-size: 13px; }
.footer-email { color: var(--sage); font-weight: 800; }
.empty-state { padding: 60px; background: var(--white); border-radius: var(--radius); text-align: center; }
.woocommerce-message, .woocommerce-info { margin-bottom: 20px; padding: 16px 20px; background: var(--white); border: 1px solid var(--border); border-right: 4px solid var(--green); border-radius: 14px; }
.woocommerce-page ul.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 32px 0; padding: 0; }
.woocommerce-page ul.products::before, .woocommerce-page ul.products::after { display: none; }
.woocommerce-page ul.products li.product {
  width: auto !important; margin: 0 !important; padding: 22px; float: none !important;
  background: var(--white); border: 1px solid var(--border); border-radius: 28px;
}
.woocommerce-page ul.products li.product img { border-radius: 20px; }
.woocommerce-page ul.products li.product .woocommerce-loop-product__title { color: var(--ink); font-size: 19px; }
.woocommerce-page ul.products li.product .price { color: var(--green); font-weight: 900; }
.woocommerce-page .button, .woocommerce-page a.button, .woocommerce-page button.button {
  color: var(--white); background: var(--green); border-radius: 999px; font-weight: 900;
}
.woocommerce-page table.shop_table { overflow: hidden; background: var(--white); border: 1px solid var(--border); border-radius: 20px; }
.woocommerce-page form .form-row input.input-text, .woocommerce-page form .form-row textarea, .woocommerce-page .select2-container .select2-selection {
  min-height: 48px; padding: 10px 14px; background: var(--cream); border: 1px solid var(--border); border-radius: 12px;
}
.woocommerce-page .cart_totals, .woocommerce-page .woocommerce-checkout-review-order { padding: 24px; background: var(--white); border: 1px solid var(--border); border-radius: 24px; }

@media (max-width: 900px) {
  .main-nav { display: none; position: absolute; top: 76px; right: 20px; left: 20px; padding: 12px; background: var(--white); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow); }
  .main-nav.open { display: block; }
  .main-nav ul { align-items: stretch; flex-direction: column; gap: 2px; }
  .main-nav a { display: block; padding: 12px 14px; border-radius: 12px; }
  .main-nav a:hover { background: var(--mist); }
  .menu-toggle { display: grid; }
  .header-cta { display: none; }
  .hero-grid, .process-grid, .product-layout { grid-template-columns: 1fr; }
  .hero { padding: 65px 0 80px; }
  .hero-grid { gap: 55px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .product-visual { position: relative; top: auto; min-height: auto; }
  .step.featured { transform: none; }
}

@media (max-width: 620px) {
  body.admin-bar .site-header { top: 46px; }
  .container { width: min(100% - 28px, 1180px); }
  .header-inner { min-height: 72px; }
  .brand-tagline { display: none; }
  .hero h1 { font-size: 45px; }
  .hero-copy { font-size: 17px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .dashboard { padding: 16px; border-radius: 28px; }
  .services-grid, .steps { grid-template-columns: 1fr; }
  .woocommerce-page ul.products { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .section-heading { align-items: start; flex-direction: column; }
  .service-card { min-height: 330px; }
  .product-visual, .product-panel, .content-panel { padding: 24px; border-radius: 28px; }
  .product-visual h1, .product-panel h2 { font-size: 32px; }
  .product-facts { grid-template-columns: 1fr; }
  .product-panel form.cart { flex-direction: column; }
  .product-panel .quantity input { width: 100%; }
  .footer-inner { flex-direction: column; text-align: center; }
}
