/* Youcef Store — professional Arabic storefront */

*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --ys-primary: #7e3af2;
  --ys-primary-dark: #6c2bd9;
  --ys-header: #0b0b0f;
  --ys-text: #111827;
  --ys-muted: #6b7280;
  --ys-bg: #f6f5f8;
  --ys-card: #ffffff;
  --ys-line: #ece8f4;
  --ys-radius: 16px;
  --ys-radius-sm: 12px;
  --ys-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
  --ys-shadow-lg: 0 18px 40px rgba(126, 58, 242, 0.18);
  --ys-space: 8px;
  --ys-font: "Cairo", Tahoma, "Segoe UI", "Noto Sans Arabic", Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body.ys-theme {
  margin: 0;
  font-family: var(--ys-font);
  font-size: 16px;
  font-weight: 500;
  color: var(--ys-text);
  background: var(--ys-bg);
  line-height: 1.75;
  letter-spacing: 0;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .ys-brand, .ys-page-title {
  font-family: var(--ys-font);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ys-text);
}

p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font-family: inherit; }

.ys-container {
  width: min(1160px, calc(100% - 32px));
  margin-inline: auto;
}

/* Buttons */
.ys-btn,
.ys-search button,
.woocommerce ul.products li.product .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce button.button.alt,
.woocommerce input.button,
.woocommerce #respond input#submit,
.acod-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px 26px;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--ys-primary) !important;
  color: #fff !important;
  font-family: var(--ys-font) !important;
  font-size: 0.98rem !important;
  font-weight: 700 !important;
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: var(--ys-shadow-lg);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
}

.ys-btn:hover,
.ys-search button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce ul.products li.product .button:hover,
.acod-submit:hover {
  background: var(--ys-primary-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(108, 43, 217, 0.28);
}

.ys-btn:active,
.woocommerce a.button:active,
.acod-submit:active {
  transform: translateY(0);
}

.ys-link {
  color: var(--ys-primary);
  font-weight: 700;
  font-size: 0.95rem;
  position: relative;
}
.ys-link::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 2px;
  background: currentColor;
  margin-inline-start: 2px;
  transition: width .2s ease;
  vertical-align: middle;
}
.ys-link:hover::after { width: 14px; }

/* Header */
.ys-header {
  background: var(--ys-header);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

.ys-header-inner {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
}

.ys-logo-wrap { text-align: center; }
.ys-brand,
.ys-logo-wrap .custom-logo-link {
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 1.2rem;
}
.ys-logo-wrap img { max-height: 40px; width: auto; margin-inline: auto; }

.ys-icon-btn,
.ys-icon-link {
  width: 44px;
  height: 44px;
  border: 0;
  background: rgba(255,255,255,.06);
  border-radius: 12px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: background .18s ease;
}
.ys-icon-btn:hover,
.ys-icon-link:hover { background: rgba(255,255,255,.14); }

.ys-menu-toggle { flex-direction: column; gap: 5px; }
.ys-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.ys-header-actions { display: flex; gap: 8px; }
.ys-cart-badge {
  position: absolute;
  top: -3px;
  left: -3px;
  background: var(--ys-primary);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #0b0b0f;
}

.ys-nav {
  background: #141418;
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 16px 0 20px;
}
.ys-nav[hidden] { display: none !important; }
.ys-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-bottom: 16px;
}
.ys-menu a {
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 6px 0;
}
.ys-menu a:hover { color: #d8b4fe; }

.ys-search {
  display: flex;
  gap: 10px;
}
.ys-search input {
  flex: 1;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  font: inherit;
  font-size: 0.98rem;
  background: #fff;
}
.ys-search input:focus {
  outline: 2px solid color-mix(in srgb, var(--ys-primary) 40%, white);
}

/* Slider */
.ys-slider {
  position: relative;
  overflow: hidden;
  background: #160b2b;
  min-height: 320px;
}
.ys-slide {
  display: none;
  position: relative;
  min-height: 320px;
  background-size: cover;
  background-position: center;
  background-color: #160b2b;
}
.ys-slide.is-active { display: block; animation: ysFade .45s ease; }
@keyframes ysFade {
  from { opacity: .4; }
  to { opacity: 1; }
}
.ys-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(10,6,20,.25), rgba(10,6,20,.72));
}
.ys-slide-content {
  position: relative;
  z-index: 1;
  padding: 64px 0 72px;
  color: #fff;
  max-width: 680px;
}
.ys-slide-content h1 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(1.7rem, 4.4vw, 2.7rem);
}
.ys-slide-content p {
  margin: 0 0 26px;
  color: rgba(255,255,255,.86);
  font-size: 1.05rem;
  max-width: 34em;
}
.ys-slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: #111;
  font-size: 24px;
  cursor: pointer;
  z-index: 2;
  box-shadow: var(--ys-shadow);
  transition: transform .15s ease;
}
.ys-slider-nav:hover { transform: translateY(-50%) scale(1.06); }
.ys-prev { right: 16px; }
.ys-next { left: 16px; }
.ys-slider-dots {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}
.ys-slider-dots button {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  padding: 0;
  transition: width .2s ease, background .2s ease;
}
.ys-slider-dots button.is-active {
  width: 22px;
  background: #fff;
}

/* Sections */
.ys-section { padding: 40px 0; }
.ys-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.ys-section-head h2 {
  margin: 0;
  font-size: 1.45rem;
}

/* Categories */
.ys-cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.ys-cat-card {
  background: var(--ys-card);
  border-radius: var(--ys-radius);
  overflow: hidden;
  border: 1px solid var(--ys-line);
  text-align: center;
  padding-bottom: 16px;
  box-shadow: var(--ys-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.ys-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.1);
}
.ys-cat-thumb {
  height: 128px;
  background: #efe7ff center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.ys-cat-fallback {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ys-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.3rem;
}
.ys-cat-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.02rem;
  padding: 0 12px;
}
.ys-cat-card span {
  color: var(--ys-muted);
  font-size: 0.86rem;
}

/* Products */
.ys-products,
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ys-products::before,
.ys-products::after,
.woocommerce ul.products::before,
.woocommerce ul.products::after { display: none !important; content: none !important; }

.woocommerce ul.products li.product,
.ys-products li.product,
.ys-product-card {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
  display: flex !important;
  flex-direction: column;
  background: var(--ys-card);
  border-radius: var(--ys-radius);
  border: 1px solid var(--ys-line);
  overflow: hidden;
  padding: 0 !important;
  text-align: center;
  box-shadow: var(--ys-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.woocommerce ul.products li.product:hover,
.ys-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.1);
}

.ys-product-media {
  position: relative;
  display: block;
  overflow: hidden;
  background: #f3f0f8;
}
.ys-product-img,
.woocommerce ul.products li.product a img,
.ys-product-media img {
  margin: 0 !important;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.ys-sale,
.woocommerce span.onsale {
  position: absolute !important;
  top: 10px;
  right: 10px;
  left: auto !important;
  z-index: 2;
  background: var(--ys-primary) !important;
  color: #fff !important;
  border-radius: 999px !important;
  font-family: var(--ys-font);
  font-weight: 800;
  font-size: 12px;
  padding: 5px 10px !important;
  line-height: 1;
  min-height: 0 !important;
}

.ys-product-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 14px 16px;
  flex: 1;
}

.ys-product-title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--ys-font) !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1.4 !important;
  color: var(--ys-text);
}

.ys-product-price,
.woocommerce ul.products li.product .price {
  color: var(--ys-primary) !important;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  margin: 0 0 4px;
}
.ys-product-price del,
.woocommerce ul.products li.product .price del {
  color: #9ca3af;
  font-size: 0.86em;
  font-weight: 600;
  order: 2;
}
.ys-product-price ins,
.woocommerce ul.products li.product .price ins {
  text-decoration: none;
  color: var(--ys-primary);
  order: 1;
}

.ys-order-btn,
.woocommerce ul.products li.product .button,
.ys-product-card .ys-btn {
  width: 100%;
  min-height: 44px !important;
  padding: 10px 14px !important;
  margin: 6px 0 0 !important;
  font-size: 0.92rem !important;
  animation: ys-wiggle 1.8s ease-in-out infinite;
}

@keyframes ys-wiggle {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
}

.ys-order-btn:hover,
.woocommerce ul.products li.product .button:hover,
.ys-product-card .ys-btn:hover {
  animation: none;
}

/* Hide default Woo add-to-cart output if template leftover */
.ys-products .add_to_cart_button:not(.ys-btn) { display: none; }

.ys-empty {
  grid-column: 1 / -1;
  background: #fff;
  border-radius: var(--ys-radius);
  padding: 32px;
  text-align: center;
  color: var(--ys-muted);
}

/* Trust */
.ys-trust-home { padding-bottom: 48px; }
.ys-trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.ys-trust-card {
  background: #fff;
  border: 1px solid var(--ys-line);
  border-radius: var(--ys-radius);
  padding: 22px 14px;
  text-align: center;
  box-shadow: var(--ys-shadow);
}
.ys-trust-card strong {
  display: block;
  color: var(--ys-primary);
  margin-bottom: 6px;
  font-size: 1rem;
}
.ys-trust-card span { color: var(--ys-muted); font-size: 0.9rem; }

/* Content pages */
.ys-content { padding: 32px 0 56px; }
.ys-page-title { margin: 0 0 18px; font-size: clamp(1.5rem, 3vw, 2rem); }
.ys-entry {
  background: #fff;
  border-radius: var(--ys-radius);
  padding: 24px;
  border: 1px solid var(--ys-line);
  box-shadow: var(--ys-shadow);
}
.ys-center { text-align: center; padding: 80px 0; }
.ys-featured { margin-bottom: 20px; border-radius: var(--ys-radius); overflow: hidden; }

/* Footer */
.ys-footer {
  background: #0b0b0f;
  color: #d1d5db;
  margin-top: 8px;
  padding-top: 40px;
}
.ys-footer-grid {
  display: grid;
  gap: 28px;
  padding-bottom: 28px;
}
.ys-footer-brand {
  color: #fff;
  font-size: 1.2rem;
  display: block;
  margin-bottom: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ys-footer h4 { margin: 0 0 12px; color: #fff; font-size: 1rem; }
.ys-footer-menu { display: grid; gap: 8px; }
.ys-footer-menu a { color: #c7c7cc; }
.ys-footer-menu a:hover { color: #fff; }
.ys-footer-trust { display: grid; gap: 8px; color: #d8b4fe; font-weight: 700; }
.ys-footer-copy {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 0;
  font-size: 0.88rem;
  color: #9ca3af;
}

/* Woo single */
.single-product .ys-woo { padding: 24px 0 56px; }
.woocommerce div.product .product_title {
  font-family: var(--ys-font);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.woocommerce div.product p.price {
  color: var(--ys-primary) !important;
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 18px;
}
.woocommerce span.onsale {
  background: var(--ys-primary) !important;
  border-radius: 999px !important;
  font-family: var(--ys-font);
  font-weight: 800;
  padding: 6px 12px !important;
  line-height: 1;
}
.woocommerce div.product form.cart {
  margin-top: 8px;
  margin-bottom: 24px;
}

.acod-wrap {
  margin-top: 20px;
  max-width: 100% !important;
  font-family: var(--ys-font);
}
.single-product .acod-header { display: none !important; }
.single-product .acod-product { display: none; }

.acod-submit,
.acod-sticky-btn {
  animation: ys-wiggle 1.8s ease-in-out infinite !important;
}
.acod-submit:hover,
.acod-sticky-btn:hover,
.acod-submit:disabled {
  animation: none !important;
}

.single-product .product_meta {
  display: none !important;
}

@media (min-width: 768px) {
  body.ys-theme { font-size: 17px; }
  .ys-container { width: min(1160px, calc(100% - 48px)); }
  .ys-cats { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .ys-products,
  .woocommerce ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .ys-trust-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .ys-slider,
  .ys-slide { min-height: 440px; }
  .ys-slide-content { padding: 92px 0 96px; }
  .ys-footer-grid { grid-template-columns: 2fr 1fr 1.2fr; }
  .ys-header-inner { min-height: 76px; }
  .ys-section { padding: 56px 0; }
  .ys-cat-thumb { height: 150px; }
}
