/*
Theme Name: Moaredy Commerce
Theme URI: https://example.com
Author: Moaredy
Author URI: https://example.com
Description: قالب متجر شركات مبني على تصنيفات المنتجات في WooCommerce.
Version: 1.0.0
Text Domain: moaredy
Tags: e-commerce, rtl, responsive
*/

:root {
  --orange: #f57c00;
  --orange-dark: #e86f00;
  --white: #ffffff;
  --text: #1f1f1f;
  --muted: #6b6b6b;
  --bg: #fff7f1;
  --card: #ffffff;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Tahoma", "Segoe UI", "Arial", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, #fff1e6 0%, #ffffff 45%, #ffffff 100%);
  direction: rtl;
  text-align: right;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #f0f0f0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand .site-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--orange);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 16px;
  padding: 0;
  margin: 0;
}

.main-nav a {
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.button,
.woocommerce a.button,
.woocommerce button.button {
  background: var(--orange);
  color: var(--white);
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
}

.hero {
  padding: 64px 0 40px;
}

.hero-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  display: grid;
  gap: 16px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--orange);
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.section-title {
  margin: 0 0 16px;
  font-size: 1.4rem;
  color: var(--orange);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding-bottom: 48px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 18px;
  position: relative;
}

.card-logo {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff5eb 0%, #fff 60%);
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  color: var(--orange);
}

.card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.card .button {
  justify-self: start;
}

.site-footer {
  background: #fff5ec;
  padding: 32px 0 24px;
  margin-top: 32px;
  border-top: 1px solid #f3e2d6;
}

.footer-grid {
  display: grid;
  gap: 16px;
}

.footer-grid h4 {
  margin: 0 0 6px;
  color: var(--orange);
}

.footer-grid p {
  margin: 0;
  color: var(--muted);
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  text-align: right;
}

.woocommerce div.product .product_title {
  color: var(--orange);
}

.woocommerce span.onsale {
  background: var(--orange);
}

.splash {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: grid;
  place-items: center;
  z-index: 1000;
  animation: splashHide 0.4s ease forwards;
  animation-delay: 3s;
}

.splash img {
  max-width: 240px;
  width: min(60vw, 260px);
}

@keyframes splashHide {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav ul {
    flex-wrap: wrap;
  }
}
