:root {
  font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif;
  color: #25231e;
  background: #f9f6ef;
  --paper: #f9f6ef;
  --ink: #25231e;
  --muted: #655e54;
  --line: #e3dbce;
  --accent: #9b3326;
  --accent-dark: #78251c;
  --tile: #eee8dc;
  scroll-behavior: smooth;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 4rem, 1260px); margin-inline: auto; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.35rem; height: 1.35rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.notice { display: flex; gap: .55rem; justify-content: center; align-items: center; min-height: 34px; padding: .25rem .75rem; background: #332a23; color: #f6ecde; font-size: .84rem; }
.notice span { color: #e5ae91; }
.header { display: grid; grid-template-columns: 1fr minmax(230px, 2fr) 1fr; align-items: center; gap: 1.5rem; padding-block: 1.05rem; }
.brand { display: inline-flex; justify-self: start; align-items: center; gap: .6rem; white-space: nowrap; }
.store-logo { display: block; width: 57px; height: auto; border-radius: 9px; }
.brand-icon { display: grid; place-items: center; width: 45px; aspect-ratio: 1; background: var(--accent); color: white; border-radius: 12px; }
.brand strong { display: block; font-size: 1.85rem; line-height: 1; letter-spacing: -.06em; }
.brand-dot { color: var(--accent); }
.brand small { display: block; margin-top: .25rem; color: var(--muted); font: 700 .59rem/1.1 Inter, sans-serif; letter-spacing: .12em; }
.search { display: flex; align-items: center; min-width: 0; background: #f2ede4; border: 1px solid var(--line); border-radius: 11px; }
.search:focus-within { border-color: var(--accent); }
.search input { width: 100%; min-width: 0; min-height: 45px; padding: .55rem .85rem; background: transparent; border: 0; }
.search input:focus { outline: 0; }
.search button, .icon-button { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; }
.search button:hover, .icon-button:hover { background: #e9dfd0; }
.cart-trigger { display: flex; align-items: center; justify-self: end; gap: .5rem; min-height: 44px; padding: .4rem .65rem; border: 1px solid var(--line); border-radius: 9px; background: transparent; font-weight: 600; }
.cart-trigger:hover { border-color: var(--accent); }
.header-actions { display: flex; justify-self: end; gap: .5rem; align-items: center; }
.profile-trigger { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; background: transparent; border: 1px solid var(--line); border-radius: 9px; color: var(--accent-dark); }
.profile-trigger:hover { border-color: var(--accent); background: #f5ebe2; }
.product-media { position: relative; min-width: 0; }
.product-media .product-image-button { width: 100%; }
.favorite-toggle { position: absolute; inset-block-start: .5rem; inset-inline-start: .5rem; background: #fffdf8; color: var(--accent); border: 1px solid var(--line); border-radius: 50%; }
.product-edit-link { position: absolute; inset-block-start: .5rem; inset-inline-start: .5rem; border: 1px solid var(--line); background: #fffdf8; color: var(--accent-dark); }
.product-edit-link:hover { color: var(--accent-dark); }
.favorite-toggle[aria-pressed="true"] .icon { fill: currentColor; }
.favorite-toggle:disabled { cursor: wait; }
.profile-content { padding: 1rem; }
.profile-nav { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.profile-nav [aria-pressed="true"] { background: #f5ebe2; border-color: var(--accent); color: var(--accent-dark); }
.profile-nav .button { flex: 1; white-space: nowrap; }
.profile-logout { margin-top: 1rem; }
#profile-message { color: var(--accent-dark); margin-bottom: .8rem; }
.profile-item { display: flex; gap: .7rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.profile-item .product-photo { width: 64px; flex: 0 0 64px; border-radius: 8px; }
.profile-item > div { flex: 1; min-width: 0; }
.profile-item h3, .profile-order h3 { font-size: 1rem; overflow-wrap: anywhere; }
.profile-item .icon-button { color: var(--accent-dark); }
.profile-order { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.profile-order ul { margin-block: .4rem; padding-inline-start: 1.2rem; }
.profile-order .button { margin-top: .4rem; }
.profile-pagination { margin-top: .9rem; }
.admin-link { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem; min-height: 44px; border: 1px solid var(--line); border-radius: 9px; color: var(--accent-dark); white-space: nowrap; }
.admin-link:hover { border-color: var(--accent); }
.product-photo.custom-photo { background: var(--tile); object-fit: cover; }
.product-photo.photo-placeholder { display: grid; place-items: center; background: var(--tile); color: var(--muted); }
.cart-count { display: grid; min-width: 1.45rem; height: 1.45rem; padding-inline: .2rem; place-items: center; border-radius: 30px; color: #fff; background: var(--accent); font-size: .82rem; }
.nav { border-block: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: clamp(.8rem, 2.9vw, 2.4rem); overflow: auto; scrollbar-width: thin; }
.nav a { flex: none; padding-block: .7rem .62rem; border-bottom: 2px solid transparent; font-size: .92rem; color: var(--muted); }
.nav a:hover, .nav a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }
.hero { display: grid; grid-template-columns: .94fr 1.06fr; margin-block: 1.85rem 0; overflow: hidden; border: 1px solid #e7d9c8; border-radius: 20px; background: #f0e5d4; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; align-items: start; padding: clamp(1.9rem, 4.4vw, 4.6rem); }
.eyebrow { display: flex; align-items: center; gap: .55rem; font-size: .89rem; font-weight: 600; color: var(--accent-dark); }
.eyebrow span { width: .48rem; height: .48rem; border-radius: 50%; background: var(--accent); }
h1 { margin-block: .65rem .9rem; font-size: clamp(3.3rem, 6.9vw, 6.65rem); line-height: .99; letter-spacing: -.055em; }
h1 em { color: var(--accent); font-style: normal; }
.hero-copy p { max-width: 37ch; color: #5a4c3d; font-size: clamp(.99rem, 1.35vw, 1.19rem); line-height: 1.68; }
.hero-copy .button { margin-top: 1.3rem; }
.hero-image { width: 100%; height: 100%; min-height: 355px; object-fit: cover; object-position: 48% 58%; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: .75rem; padding: .52rem 1rem; border: 1px solid transparent; border-radius: 8px; font-weight: 600; text-align: center; }
.primary { background: var(--accent); color: white; }
.primary:hover { background: var(--accent-dark); }
.secondary { background: transparent; border-color: var(--line); }
.secondary:hover { border-color: var(--accent); }
.section { margin-block: 2.3rem; }
.section-header { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.45rem); line-height: 1.14; letter-spacing: -.035em; }
.product-photo { display: block; width: 100%; aspect-ratio: 1; background-color: var(--tile); background-image: url(catalog.jpg); background-size: 400% 200%; background-repeat: no-repeat; }
.photo-air-fryer { background-position: 0 0; }
.photo-casserole { background-position: 33.3333% 0; }
.photo-chair { background-position: 66.6667% 0; }
.photo-lamp { background-position: 100% 0; }
.photo-headphones { background-position: 0 100%; }
.photo-tool-kit { background-position: 33.3333% 100%; }
.photo-charger { background-position: 66.6667% 100%; }
.photo-coffee-maker { background-position: 100% 100%; }
.products-section { padding-block: 1.9rem .6rem; border-top: 1px solid var(--line); scroll-margin-top: 1.25rem; }
#result-count { margin-top: .3rem; color: var(--muted); font-size: .93rem; }
.sort { display: flex; gap: .5rem; align-items: center; color: var(--muted); font-size: .9rem; }
.sort select { max-width: 100%; min-height: 43px; padding: .42rem .55rem; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; color: var(--ink); }
.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.product { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fffdf8; }
.product-image-button { display: block; padding: 0; border: 0; background: var(--tile); }
.product-image-button:focus-visible { outline-offset: -4px; }
.product-image-button:hover .product-photo { opacity: .86; }
.product-info { display: grid; grid-template-rows: 1fr auto; gap: .45rem; padding: .8rem .9rem .65rem; }
.product h3 { font-size: 1.06rem; }
.product h3 a { padding: 0; background: transparent; border: 0; text-align: start; font-weight: 600; }
.product h3 a:hover { color: var(--accent); }
.product-bottom { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.product-bottom strong, .product-detail-price { color: var(--accent-dark); }
.add-button { width: 42px; height: 42px; background: #f5ebe2; color: var(--accent); border: 1px solid #eedccd; }
.empty { display: grid; justify-items: center; gap: .7rem; padding: 2.25rem 1rem; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); }
.footer { margin-top: 2.6rem; padding-block: 1.4rem; border-top: 1px solid var(--line); background: #f2ece0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem 1.25rem; }
.footer p, .footer-inner > a:last-child { color: var(--muted); font-size: .88rem; }
dialog { width: min(100% - 2rem, 470px); max-height: calc(100% - 2rem); padding: 0; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: #221a12a0; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 1.45rem; }
.cart-dialog { width: min(100%, 450px); max-width: 100%; height: 100%; max-height: 100%; margin: 0 auto 0 0; border-radius: 0 12px 12px 0; }
.cart-empty { padding: 1.25rem 1rem; color: var(--muted); }
.cart-line { display: grid; grid-template-columns: 56px 1fr auto; gap: .65rem; align-items: center; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.cart-line .product-photo { border-radius: 6px; }
.cart-line h3 { font-size: .98rem; line-height: 1.2; }
.cart-line div > span { color: var(--muted); font-size: .88rem; }
.quantity { display: flex; gap: .35rem; align-items: center; }
.quantity button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 7px; background: #fffdf8; }
.quantity button:hover { background: #f0e5d4; }
.cart-footer { display: grid; gap: .85rem; padding: 1rem; }
.cart-total { display: flex; justify-content: space-between; gap: 1rem; }
#order-message { padding: .65rem; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); }
.checkout { display: grid; gap: .85rem; padding: 1rem; }
.checkout-steps { display: flex; justify-content: space-between; gap: .4rem; padding: 0; margin: 0; list-style: none; }
.checkout-steps li { flex: 1; text-align: center; border-bottom: 2px solid var(--line); padding: .4rem; color: var(--muted); }
.checkout-steps [aria-current] { border-color: var(--accent); color: var(--accent-dark); font-weight: 700; }
.checkout-form { display: grid; gap: .7rem; }
.checkout-form label { display: grid; gap: .25rem; font-weight: 600; }
.checkout-form input, .checkout-form select { width: 100%; min-height: 45px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; padding: .55rem .65rem; }
.payment-choice { border: 1px solid var(--line); border-radius: 8px; padding: .65rem; }
.payment-choice span { color: var(--accent); }
.button:disabled { opacity: .6; cursor: wait; }
.toast { position: fixed; z-index: 2; inset-inline-end: 1rem; bottom: 1rem; max-width: calc(100% - 2rem); padding: .75rem 1rem; border-radius: 8px; color: white; background: #332a23; box-shadow: 0 8px 25px #23191128; }
@media (max-width: 950px) {
  .wrap { width: calc(100% - 2.5rem); }
  .hero-image { min-height: 330px; }
  .products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .wrap { width: calc(100% - 1.5rem); }
  .header { grid-template-columns: 1fr 1fr; gap: .65rem; padding-block: .75rem; }
  .admin-link > span { display: none; }
  .search { grid-column: 1 / -1; grid-row: 2; }
  .hero { grid-template-columns: 1fr; margin-top: .9rem; border-radius: 14px; }
  .hero-copy { padding: 1.55rem 1.2rem; }
  h1 { font-size: clamp(3rem, 13vw, 4.3rem); }
  .hero-image { height: auto; min-height: 0; aspect-ratio: 1.75; object-position: 45% 56%; }
  .section { margin-block: 1.65rem; }
  .products { gap: .55rem; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-info { padding-inline: .55rem; }
  .product h3 { font-size: .94rem; }
  .sort > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .sort select { font-size: .83rem; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}

.product-page { padding-block: clamp(1.5rem, 4vw, 3rem); }
.product-back { display: inline-block; color: var(--accent-dark); margin-block-end: 1rem; }
.product-back:hover { text-decoration: underline; }
.product-page h1 { font-size: clamp(1.85rem, 4.2vw, 3.2rem); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; margin-block-end: 1.15rem; }
.product-detail-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1rem, 4vw, 2.75rem); align-items: start; }
.product-gallery-stage { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--tile); }
.product-gallery-slide { aspect-ratio: 4 / 3; }
.product-gallery-slide img, .product-gallery-slide video { display: block; width: 100%; height: 100%; object-fit: contain; }
.product-gallery-slide video { background: #201d19; }
.product-gallery-slide:has(.product-video-download) { aspect-ratio: auto; }
.product-gallery-slide:has(.product-video-download) video { aspect-ratio: 4 / 3; height: auto; }
.product-video-download { display: block; padding: .6rem .85rem; color: var(--accent-dark); text-decoration: underline; }
.product-gallery-placeholder { display: grid; aspect-ratio: 4 / 3; place-items: center; color: var(--muted); padding: 1rem; text-align: center; }
.product-gallery-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: .5rem; margin-block-start: .7rem; }
.product-gallery-picker button { display: grid; place-items: center; overflow: hidden; padding: 0; min-height: 58px; aspect-ratio: 1; border: 2px solid var(--line); border-radius: 9px; background: var(--tile); color: var(--ink); line-height: 1.15; }
.product-gallery-picker button[aria-pressed="true"] { border-color: var(--accent); }
.product-gallery-picker img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-info { display: grid; gap: .8rem; padding: clamp(1rem, 3vw, 1.75rem); border: 1px solid var(--line); border-radius: 14px; background: #fffdf8; }
.product-detail-price { font-size: 1.65rem; }
.product-detail-info h2 { font-size: 1.15rem; }
.product-description { color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.product-specs { display: grid; gap: .4rem; margin: 0; }
.product-specs div { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: baseline; }
.product-specs dt { font-weight: 700; }
.product-specs dd { margin: 0; overflow-wrap: anywhere; }
.product-purchase { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-block-start: .5rem; }
.product-purchase input { width: 5rem; min-height: 44px; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.product-purchase button:disabled { opacity: .55; }
@media (max-width: 700px) {
  .product-detail-layout { grid-template-columns: minmax(0, 1fr); }
}

