/* فلو — desk fountains landing + shop */
:root {
  --bg: #060809;
  --bg-card: rgba(12, 16, 20, 0.78);
  --border: rgba(201, 169, 98, 0.1);
  --text: #ebe6dc;
  --muted: #8a8d92;
  --accent: #c9a962;
  --accent-2: #a8b8c0;
  --radius: 16px;
  --font: 'IBM Plex Sans Arabic', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(201, 169, 98, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 100%, rgba(30, 58, 66, 0.12) 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  transition: background 0.3s, backdrop-filter 0.3s;
}

.header.scrolled {
  background: rgba(10, 18, 24, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 1.75rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--accent-2);
}

.cart-trigger {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, transform 0.2s;
}

.cart-trigger:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

.cart-count {
  position: absolute;
  top: -4px;
  left: -4px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

main {
  position: relative;
  z-index: 2;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: 7rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--muted);
  max-width: 28rem;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, #d4b978, var(--accent));
  color: #0a0c0e;
  box-shadow: 0 8px 32px rgba(201, 169, 98, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(201, 169, 98, 0.28);
}

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

.btn-ghost:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.btn-block {
  width: 100%;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-fountain-preview {
  width: min(520px, 92vw);
  aspect-ratio: 16 / 10;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Products */
.products {
  padding: 4rem 2rem 6rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 3rem;
}

.section-head h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.section-head p {
  color: var(--muted);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: transform 0.3s, border-color 0.3s;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 169, 98, 0.28);
}

.product-visual {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: #080a0c;
}

.product-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

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

.product-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.product-body h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.product-tag {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.product-guide-link {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 0.75rem;
}

.product-guide-link:hover {
  text-decoration: underline;
}

.product-feats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.product-feats li {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  background: rgba(126, 200, 227, 0.1);
  border-radius: 6px;
  color: var(--accent-2);
}

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.product-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
}

.btn-add {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
}

/* Features */
.features {
  padding: 3rem 2rem 5rem;
  max-width: 1000px;
  margin: 0 auto;
}

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

.features article {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}

.feat-icon {
  color: var(--accent);
  font-size: 1.25rem;
  display: block;
  margin-bottom: 0.75rem;
}

.features h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.features p {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

.footer-contact {
  margin-top: 0.5rem;
}

.footer-contact a,
.nav-wa {
  color: var(--accent);
  text-decoration: none;
}

.footer-contact a:hover,
.nav-wa:hover {
  text-decoration: underline;
}

.wa-float {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 150;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s;
}

.wa-float:hover {
  transform: scale(1.08);
}

/* Cart — fixed to viewport; physical right/translate avoids RTL centering bug */
.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}

.cart-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

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

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

.cart-drawer-inner {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 202;
  width: min(400px, 100vw);
  height: 100%;
  height: 100dvh;
  background: #0e1820;
  border-right: 1px solid var(--border);
  transform: translate3d(-100%, 0, 0);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  box-shadow: 8px 0 40px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

.cart-drawer.open .cart-drawer-inner {
  transform: translate3d(0, 0, 0);
}

.cart-drawer:not(.open) .cart-drawer-inner {
  pointer-events: none;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.cart-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
}

.cart-items {
  list-style: none;
  flex: 1;
  overflow-y: auto;
}

.cart-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.cart-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.cart-line-info {
  flex: 1;
  min-width: 0;
}

.cart-line-info strong {
  display: block;
}

.cart-line-info span {
  color: var(--accent);
  font-size: 0.9rem;
}

.cart-line-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-line-qty button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
}

.cart-empty {
  color: var(--muted);
  text-align: center;
  padding: 2rem 0;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.cart-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Checkout */
.checkout-modal {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0e1820;
  color: var(--text);
  padding: 0;
  max-width: 440px;
  width: calc(100% - 2rem);
  margin: auto;
}

.checkout-modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.checkout-form {
  padding: 1.5rem;
}

.checkout-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.checkout-summary {
  margin: 1rem 0;
  padding: 0.75rem;
  background: rgba(201, 169, 98, 0.08);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 600;
}

.checkout-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.75rem;
  text-align: center;
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, #d4b978, var(--accent));
  color: #0a0c0e;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  z-index: 300;
  opacity: 0;
  transition: transform 0.35s, opacity 0.35s;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 6rem;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .nav {
    display: none;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 1rem;
  }

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

  .product-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-add {
    width: 100%;
  }
}
