@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap");

:root {
  --store-bg: #0d0b12;
  --store-surface: #16131c;
  --store-surface-2: #201b28;
  --store-text: #f7f4fb;
  --store-muted: #b8afc4;
  --store-line: #342d3e;
  --store-accent: #8b5cf6;
  --store-accent-2: #d8b4fe;
  --store-green: #35d399;
  --store-yellow: #f5b942;
  --store-danger: #f87171;
  --store-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  --store-radius: 8px;
}

html[data-store-theme="light"] {
  --store-bg: #f7f7f9;
  --store-surface: #ffffff;
  --store-surface-2: #f0edf5;
  --store-text: #18131f;
  --store-muted: #655c70;
  --store-line: #ded9e5;
  --store-accent: #6d28d9;
  --store-accent-2: #7c3aed;
  --store-shadow: 0 10px 24px rgba(44, 30, 60, 0.08);
}

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

html {
  width: 100%;
  max-width: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body.store-body {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  background: var(--store-bg);
  color: var(--store-text);
  font-family: "Cairo", sans-serif;
  direction: rtl;
  line-height: 1.7;
  overflow-x: hidden;
}

body.store-body a {
  color: inherit;
  text-decoration: none;
}

body.store-body button,
body.store-body input,
body.store-body select,
body.store-body textarea {
  font: inherit;
}

.store-container {
  width: min(1180px, calc(100% - 32px));
  max-width: 100%;
  margin: 0 auto;
}

.store-announcement {
  background: #2a2140;
  color: #f9f5ff;
  padding: 7px 16px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
}

.store-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--store-bg) 92%, transparent);
  border-bottom: 1px solid var(--store-line);
  backdrop-filter: blur(18px);
}

.store-header-main {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.store-header-main > *,
.store-hero-layout > *,
.store-section,
.store-category,
.store-product-card {
  min-width: 0;
}

.store-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
}

.store-logo img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  animation: logoFloat 3.6s ease-in-out infinite;
}

.store-logo strong {
  font-size: 1rem;
  font-weight: 900;
}

.store-logo span {
  display: block;
  color: var(--store-muted);
  font-size: 0.66rem;
  font-weight: 600;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(2deg); }
}

.store-search {
  position: relative;
  min-width: 0;
}

.store-search input {
  width: 100%;
  height: 44px;
  padding: 0 44px 0 14px;
  color: var(--store-text);
  background: var(--store-surface);
  border: 1px solid var(--store-line);
  border-radius: var(--store-radius);
  outline: none;
}

.store-search input:focus {
  border-color: var(--store-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--store-accent) 18%, transparent);
}

.store-search button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--store-accent-2);
  cursor: pointer;
}

.store-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.store-icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--store-text);
  background: var(--store-surface);
  border: 1px solid var(--store-line);
  border-radius: var(--store-radius);
  cursor: pointer;
  transition: 0.2s ease;
}

.store-icon-btn:hover {
  border-color: var(--store-accent);
  color: var(--store-accent-2);
  transform: translateY(-1px);
}

.store-cart-count {
  position: absolute;
  top: -5px;
  left: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--store-green);
  color: #07110d;
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 900;
}

.store-categories-nav {
  border-top: 1px solid var(--store-line);
}

.store-categories-nav .store-container {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}

.store-categories-nav a {
  flex: 0 0 auto;
  color: var(--store-muted);
  font-size: 0.82rem;
  font-weight: 700;
  transition: 0.2s ease;
}

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

.store-main {
  min-height: 60vh;
}

.store-hero {
  padding: 28px 0 10px;
}

.store-hero-layout {
  display: grid;
  grid-template-columns: 1.65fr 0.85fr;
  gap: 14px;
}

.store-banner {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 330px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 34px;
  background: var(--store-surface-2);
  border: 1px solid var(--store-line);
  border-radius: var(--store-radius);
  box-shadow: var(--store-shadow);
}

.store-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--banner-image, none);
  background-size: cover;
  background-position: center;
  opacity: 0.92;
}

.store-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 15%, rgba(8, 6, 12, 0.86) 100%);
}

html[data-store-theme="light"] .store-banner::before {
  opacity: 0.98;
}

html[data-store-theme="light"] .store-banner::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.94) 100%);
}

html[data-store-theme="light"] .store-banner h1,
html[data-store-theme="light"] .store-banner h2 {
  color: #2e1744;
}

html[data-store-theme="light"] .store-banner p {
  color: #665674;
}

html[data-store-theme="light"] .store-banner-kicker {
  color: #fff;
  background: var(--store-accent);
}

.store-banner-content {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  max-width: 520px;
  overflow: hidden;
}

.store-banner-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 9px;
  color: #16101d;
  background: var(--store-yellow);
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 900;
}

.store-banner h1,
.store-banner h2 {
  max-width: 100%;
  margin-bottom: 8px;
  color: #fff;
  font-size: clamp(1.65rem, 3vw, 2.7rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.store-banner p {
  color: #ddd5e8;
  font-size: 0.9rem;
}

.store-banner-side {
  display: grid;
  gap: 14px;
}

.store-banner-side .store-banner {
  min-height: 158px;
  padding: 20px;
}

.store-banner-side .store-banner h2 {
  font-size: 1.25rem;
}

.store-section {
  padding: 36px 0;
}

.store-section + .store-section {
  border-top: 1px solid var(--store-line);
}

.store-section-head {
  margin-bottom: 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.store-section-head h2 {
  font-size: 1.3rem;
  font-weight: 900;
}

.store-section-head p {
  margin-top: 2px;
  color: var(--store-muted);
  font-size: 0.78rem;
}

.store-section-link {
  color: var(--store-accent-2);
  font-size: 0.78rem;
  font-weight: 800;
}

.store-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.store-category {
  min-height: 145px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--category-bg, var(--store-surface));
  border: 1px solid var(--store-line);
  border-radius: var(--store-radius);
  overflow: hidden;
  position: relative;
  transition: 0.22s ease;
}

.store-category::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--category-image, none);
  background-position: center;
  background-size: cover;
  opacity: 0.72;
}

.store-category::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 25%, rgba(8, 6, 12, 0.9) 100%);
}

html[data-store-theme="light"] .store-category {
  background: #fff;
}

html[data-store-theme="light"] .store-category::before {
  opacity: 0.92;
}

html[data-store-theme="light"] .store-category::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 20%, rgba(255, 255, 255, 0.96) 100%);
}

.store-category:hover {
  transform: translateY(-3px);
  border-color: var(--store-accent);
}

.store-category strong,
.store-category span {
  position: relative;
  z-index: 1;
}

.store-category strong {
  font-size: 1rem;
  font-weight: 900;
}

.store-category span {
  color: var(--store-muted);
  font-size: 0.7rem;
}

.store-products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.store-product-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: var(--store-surface);
  border: 1px solid var(--store-line);
  border-radius: var(--store-radius);
  overflow: hidden;
  transition: 0.22s ease;
}

.store-product-card:hover {
  transform: translateY(-3px);
  border-color: var(--store-accent);
  box-shadow: var(--store-shadow);
}

.store-product-image {
  aspect-ratio: 1 / 0.74;
  display: grid;
  place-items: center;
  background: var(--store-surface-2);
  border-bottom: 1px solid var(--store-line);
  background-image: var(--product-image, none);
  background-size: cover;
  background-position: center;
  color: var(--store-accent-2);
  font-size: 2rem;
  font-weight: 900;
}

.store-product-info {
  flex: 1;
  padding: 14px;
}

.store-product-category {
  color: var(--store-accent-2);
  font-size: 0.64rem;
  font-weight: 800;
}

.store-product-info h3 {
  margin: 5px 0 4px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.store-product-info p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--store-muted);
  font-size: 0.68rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.store-product-bottom {
  padding: 0 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.store-price {
  font-size: 0.9rem;
  font-weight: 900;
}

.store-price del {
  display: block;
  color: var(--store-muted);
  font-size: 0.6rem;
  font-weight: 500;
}

.store-add-btn,
.store-primary-btn,
.store-secondary-btn {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  transition: 0.2s ease;
}

.store-add-btn {
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--store-accent);
}

.store-add-btn:hover,
.store-primary-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.store-primary-btn {
  min-height: 44px;
  padding: 0 22px;
  color: #fff;
  background: var(--store-accent);
}

.store-secondary-btn {
  min-height: 44px;
  padding: 0 22px;
  color: var(--store-text);
  background: var(--store-surface-2);
  border: 1px solid var(--store-line);
}

.store-trust-strip {
  padding: 28px 0;
  background: var(--store-surface);
  border-block: 1px solid var(--store-line);
}

.store-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.store-trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.store-trust-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--store-green);
  background: color-mix(in srgb, var(--store-green) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--store-green) 35%, transparent);
  border-radius: 50%;
}

.store-trust-item strong {
  display: block;
  font-size: 0.78rem;
}

.store-trust-item span {
  color: var(--store-muted);
  font-size: 0.66rem;
}

.store-footer {
  margin-top: 40px;
  padding: 46px 0 20px;
  background: #08070a;
  color: #f5f2f8;
  border-top: 1px solid #29242f;
}

.store-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 36px;
}

.store-footer h3,
.store-footer h4 {
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.store-footer p,
.store-footer a,
.store-footer li {
  color: #aca4b6;
  font-size: 0.72rem;
}

.store-footer ul {
  list-style: none;
}

.store-footer li {
  margin-bottom: 7px;
}

.store-social {
  margin-top: 14px;
  display: flex;
  gap: 8px;
}

.store-social a {
  min-height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #393240;
  border-radius: 6px;
}

.store-payment-methods,
.store-verification {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.store-payment-methods span,
.store-verification a {
  min-height: 30px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  color: #e8e3ed;
  background: #151219;
  border: 1px solid #342e3b;
  border-radius: 5px;
  font-size: 0.62rem;
  font-weight: 800;
}

.store-footer-bottom {
  margin-top: 32px;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #29242f;
  color: #8d8597;
  font-size: 0.65rem;
}

.store-page-head {
  padding: 44px 0 28px;
  border-bottom: 1px solid var(--store-line);
  background: var(--store-surface);
}

.store-page-head h1 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.store-page-head p {
  color: var(--store-muted);
  font-size: 0.82rem;
}

.store-filter-row {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.store-filter-row input,
.store-filter-row select {
  min-height: 42px;
  padding: 0 12px;
  color: var(--store-text);
  background: var(--store-surface);
  border: 1px solid var(--store-line);
  border-radius: 6px;
}

.store-detail-layout,
.store-cart-layout,
.store-account-layout {
  padding: 38px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.store-detail-media {
  min-height: 380px;
  display: grid;
  place-items: center;
  background: var(--store-surface-2);
  border: 1px solid var(--store-line);
  border-radius: var(--store-radius);
  background-image: var(--product-image, none);
  background-position: center;
  background-size: cover;
  color: var(--store-accent-2);
  font-size: 4rem;
  font-weight: 900;
}

.store-panel {
  padding: 24px;
  background: var(--store-surface);
  border: 1px solid var(--store-line);
  border-radius: var(--store-radius);
}

.store-panel h1,
.store-panel h2 {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.store-panel p {
  color: var(--store-muted);
  font-size: 0.8rem;
}

.store-field {
  margin-top: 14px;
}

.store-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.72rem;
  font-weight: 800;
}

.store-field input,
.store-field select,
.store-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--store-text);
  background: var(--store-surface-2);
  border: 1px solid var(--store-line);
  border-radius: 6px;
  outline: none;
}

.store-field textarea {
  min-height: 90px;
  resize: vertical;
}

.store-actions-row {
  margin-top: 20px;
  display: flex;
  gap: 8px;
}

.store-cart-list {
  display: grid;
  gap: 10px;
}

.store-cart-item {
  padding: 12px;
  display: grid;
  grid-template-columns: 66px 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--store-surface);
  border: 1px solid var(--store-line);
  border-radius: var(--store-radius);
}

.store-cart-thumb {
  width: 66px;
  height: 58px;
  display: grid;
  place-items: center;
  background: var(--store-surface-2);
  border-radius: 5px;
  background-position: center;
  background-size: cover;
}

.store-cart-item h3 {
  font-size: 0.78rem;
}

.store-cart-item p {
  color: var(--store-muted);
  font-size: 0.65rem;
}

.store-remove-btn {
  color: var(--store-danger);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.store-empty {
  padding: 70px 20px;
  text-align: center;
  color: var(--store-muted);
}

.store-login-providers {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.store-notice {
  margin-top: 14px;
  padding: 10px 12px;
  color: var(--store-muted);
  background: var(--store-surface-2);
  border: 1px solid var(--store-line);
  border-radius: 6px;
  font-size: 0.68rem;
}

.store-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  max-width: min(360px, calc(100% - 36px));
  padding: 11px 14px;
  color: #fff;
  background: #20182b;
  border: 1px solid #4d3868;
  border-radius: 6px;
  box-shadow: var(--store-shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 0.2s ease;
}

.store-toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  .store-header-main {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }

  .store-logo strong,
  .store-logo span {
    display: none;
  }

  .store-logo {
    min-width: auto;
  }

  .store-logo img {
    width: 44px;
    height: 44px;
  }

  .store-category-grid,
  .store-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .store-container {
    width: auto;
    max-width: none;
    margin-inline: 11px;
  }

  .store-categories-nav {
    max-width: 100%;
    overflow: hidden;
  }

  .store-categories-nav .store-container {
    width: auto;
    max-width: none;
    margin-inline: 0;
    padding-inline: 11px;
  }

  .store-header-main {
    min-height: 68px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 7px;
  }

  .store-search input {
    height: 40px;
    font-size: 0.72rem;
  }

  .store-actions .store-icon-btn:first-child {
    display: none;
  }

  .store-actions {
    gap: 5px;
  }

  .store-icon-btn {
    width: 38px;
    height: 38px;
  }

  .store-hero-layout {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
  }

  .store-banner {
    min-height: 260px;
    padding: 22px;
  }

  .store-banner-side {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .store-banner-side .store-banner {
    min-height: 130px;
  }

  .store-banner-side .store-banner p {
    display: none;
  }

  .store-category-grid,
  .store-products-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .store-category {
    min-height: 115px;
    padding: 12px;
  }

  .store-product-info,
  .store-product-bottom {
    padding: 10px;
  }

  .store-trust-grid {
    grid-template-columns: 1fr 1fr;
  }

  .store-trust-item {
    align-items: flex-start;
  }

  .store-detail-layout,
  .store-cart-layout,
  .store-account-layout {
    grid-template-columns: 1fr;
  }

  .store-detail-media {
    min-height: 270px;
  }

  .store-footer-grid {
    grid-template-columns: 1fr;
  }

  .store-footer-bottom {
    flex-direction: column;
  }
}
