﻿:root {
  --green: #1f2f2a;
  --bg: #f7f5f2;
  --muted: #6a6a6a;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--green);
  line-height: 1.7;
}

body.ltr {
  direction: ltr;
  font-family: 'Inter', 'Cairo', sans-serif;
}

body.rtl {
  direction: rtl;
  font-family: 'Cairo', 'Inter', sans-serif;
}

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

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

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

.site-header {
  padding: 24px 0;
}

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

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

.logo img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
}

.brand-text {
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

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

.nav-link {
  font-weight: 600;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.lang-switch a {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--green);
  opacity: 0.6;
}

.lang-switch a.active {
  background: var(--green);
  color: #fff;
  opacity: 1;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  margin-inline-start: 6px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
}

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

.hero-title {
  font-size: clamp(32px, 4vw, 56px);
  margin: 0 0 16px;
}

.hero-subtitle {
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
  margin: 0;
}

.section {
  padding: 40px 0;
}

.section-title {
  font-size: 24px;
  margin: 0 0 16px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
}

.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--green);
  font-size: 14px;
  color: var(--green);
  opacity: 0.7;
  transition: all 0.2s ease;
}

.chip.active,
.chip:hover {
  background: var(--green);
  color: #fff;
  opacity: 1;
}

.card {
  background: var(--card);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

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

.product-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-image {
  background: linear-gradient(135deg, #ece7e0, #f6f3ef);
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-subimage {
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid #e8e2da;
}

.product-subimage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 14px;
}

.note-label {
  color: var(--green);
  font-weight: 600;
}

.price {
  font-weight: 600;
  font-size: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.btn.outline {
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
}

.btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
}

.footer {
  padding: 32px 0 48px;
  border-top: 1px solid #e3e0da;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.muted {
  color: var(--muted);
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
}

.cart-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
}

.cart-image {
  background: #f0ede8;
  border-radius: 18px;
  overflow: hidden;
}

.cart-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.qty-button {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--green);
  background: transparent;
  color: var(--green);
  font-weight: 700;
  cursor: pointer;
}

.qty-value {
  min-width: 32px;
  text-align: center;
  font-weight: 600;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

input,
textarea {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #d7d2c9;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.alert {
  padding: 12px 16px;
  border-radius: 16px;
  background: #fff2f2;
  color: #7a1b1b;
  border: 1px solid #f0c9c9;
  margin-bottom: 16px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-weight: 600;
}

.cart-summary {
  position: sticky;
  top: 24px;
}

.detail-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.detail-images {
  display: grid;
  gap: 12px;
}

.detail-main {
  background: #f0ede8;
  border-radius: 20px;
  overflow: hidden;
}

.detail-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
}

.detail-gallery img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #e3e0da;
  background: #fff;
}

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.load-more {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 16px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e3e0da;
  text-align: start;
  vertical-align: middle;
}

.table th {
  font-weight: 600;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--green);
}

.status-pill.inactive {
  opacity: 0.5;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.help-text {
  font-size: 12px;
  color: var(--muted);
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.thumb-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid #e3e0da;
  background: #fff;
}

.thumb-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
}

body.rtl .header-actions {
  flex-direction: row-reverse;
}

body.rtl .lang-switch {
  direction: ltr;
}

body.rtl .cart-item {
  grid-template-columns: 1fr 120px;
}

body.rtl .cart-image {
  order: 2;
}

@media (max-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: static;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .detail-card {
    grid-template-columns: 1fr;
  }
}

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

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