/* Newshop UI 1.1.2 — independent presentation layer; no rebuild required.
   Keep this file after the original styles. Do not merge into main.css:
   its checked-in output and SCSS source already differ in the supplied archive. */
:root, [data-ui-theme^="light-"] {
  --ui-bg: #f6f7f9; --ui-surface: #ffffff; --ui-raised: #ffffff; --ui-soft: #f0f2f5;
  --ui-text: #202634; --ui-muted: #596475; --ui-line: #dce1e8;
  --ui-accent: #c9253d; --ui-hover: #ac1e33; --ui-tint: #fff0f2; --ui-on-accent: #ffffff;
  --ui-success: #176944; --ui-success-bg: #eaf8f0; --ui-danger: #b42239; --ui-danger-bg: #fff0f2;
  --ui-shadow: 0 8px 32px #15233808; --ui-overlay: #0a10236e;
  color-scheme: light;
}
[data-ui-theme="light-blue"] { --ui-accent: #155fbd; --ui-hover: #114d99; --ui-tint: #eaf3ff; --ui-bg: #f5f8fc; }
[data-ui-theme="light-emerald"] { --ui-accent: #087755; --ui-hover: #065d43; --ui-tint: #e7f7f0; --ui-bg: #f5f9f8; }
[data-ui-theme="light-violet"] { --ui-accent: #713dc5; --ui-hover: #592ba3; --ui-tint: #f4eeff; --ui-bg: #f8f7fb; }
[data-ui-theme="light-amber"] { --ui-accent: #985506; --ui-hover: #7a4404; --ui-tint: #fff5e3; --ui-bg: #faf9f6; }
[data-ui-theme^="dark-"] {
  --ui-bg: #101319; --ui-surface: #1a1f28; --ui-raised: #222936; --ui-soft: #252d39;
  --ui-text: #f1f4fa; --ui-muted: #b0bdcf; --ui-line: #3c4658;
  --ui-accent: #ff8091; --ui-hover: #ffa1ad; --ui-tint: #38232e; --ui-on-accent: #171b24;
  --ui-success: #7fdfb0; --ui-success-bg: #17352a; --ui-danger: #ff9da8; --ui-danger-bg: #3b232d;
  --ui-shadow: 0 8px 32px #00000020; --ui-overlay: #02050ab3;
  color-scheme: dark;
}
[data-ui-theme="dark-blue"] { --ui-bg: #0e1520; --ui-surface: #172231; --ui-raised: #1d2b3e; --ui-soft: #233348; --ui-accent: #80b9ff; --ui-hover: #a5ceff; --ui-tint: #203652; }
[data-ui-theme="dark-emerald"] { --ui-bg: #0e1816; --ui-surface: #182723; --ui-raised: #20332d; --ui-soft: #273c34; --ui-accent: #77deaf; --ui-hover: #a0edc8; --ui-tint: #204136; }
[data-ui-theme="dark-violet"] { --ui-bg: #17121f; --ui-surface: #231d30; --ui-raised: #2c243b; --ui-soft: #352b46; --ui-accent: #c2a0ff; --ui-hover: #d5bcff; --ui-tint: #382953; }
[data-ui-theme="dark-amber"] { --ui-bg: #191815; --ui-surface: #25241f; --ui-raised: #302e27; --ui-soft: #3b372e; --ui-accent: #edc36d; --ui-hover: #f5d99e; --ui-tint: #423621; }

html { scroll-padding-top: 1rem; }
body.shop-ui { margin: 0; min-height: 100vh; background: var(--ui-bg); color: var(--ui-text); font: 400 1rem/1.8 Peyda, Tahoma, sans-serif; -webkit-tap-highlight-color: transparent; }
.shop-ui *, .shop-ui *::before, .shop-ui *::after { box-sizing: border-box; }
.shop-ui [hidden] { display: none !important; }
.shop-ui .container { width: 100%; max-width: 1400px; padding: 20px 28px; }
.shop-ui main { min-height: 42vh; padding-block: 10px 40px; }
.shop-ui main > .container { padding-top: 24px; }
.shop-ui .row > * { min-width: 0; }
.shop-ui p { color: var(--ui-muted); font-size: 1rem; line-height: 1.9; }
.shop-ui h1, .shop-ui h2, .shop-ui h3, .shop-ui h4 { color: var(--ui-text); line-height: 1.6; }
.shop-ui h1 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
.shop-ui h2 { font-size: 1.5rem; font-weight: 700; }
.shop-ui a { color: var(--ui-accent); text-underline-offset: 4px; }
.shop-ui button, .shop-ui input, .shop-ui textarea, .shop-ui select { font: inherit; }
.shop-ui button, .shop-ui [role="button"] { cursor: pointer; }
.shop-ui button, .shop-ui a, .shop-ui input, .shop-ui textarea, .shop-ui select { transition: background-color .16s, border-color .16s, box-shadow .16s; }
.shop-ui :is(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid var(--ui-accent) !important; outline-offset: 3px; }
.shop-ui :is(button:disabled, [aria-disabled="true"]) { opacity: .48; cursor: not-allowed; }
.shop-ui input:where(:not([type="hidden"]):not([type="radio"]):not([type="checkbox"])), .shop-ui textarea, .shop-ui select { color: var(--ui-text); background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: 12px; padding: 10px 14px; min-height: 46px; }
.shop-ui input::placeholder, .shop-ui textarea::placeholder { color: var(--ui-muted); opacity: 1; }
.shop-ui input:focus, .shop-ui textarea:focus { border-color: var(--ui-accent); }
.shop-ui input[type="radio"], .shop-ui input[type="checkbox"] { accent-color: var(--ui-accent); }
.shop-ui small { font-size: .875rem; }
.shop-ui .ui-skip-link { position: fixed; z-index: 1000005; inset: 8px 16px auto auto; transform: translateY(-160%); padding: 10px 18px; border-radius: 10px; background: var(--ui-accent); color: var(--ui-on-accent); }
.shop-ui .ui-skip-link:focus { transform: translateY(0); }

/* Header: search is always visible; links retain their original destinations. */
.shop-ui > header { background: var(--ui-surface); border-top: 3px solid var(--ui-accent); border-bottom: 1px solid var(--ui-line); }
.shop-ui > header > .container { padding-bottom: 0; }
.shop-ui > header .row:first-child { display: grid; grid-template-columns: minmax(100px, 190px) minmax(180px, 1fr) auto; gap: 24px; padding-bottom: 16px; align-items: center; }
.shop-ui header .logo-wrapper { width: auto; margin: 0; padding: 0; }
.shop-ui header .logo-wrapper img { max-height: 60px; width: auto; max-width: 180px; object-fit: contain; border-radius: 10px; background: var(--ui-surface); }
.shop-ui header .search-header { width: 100%; min-width: 0; padding: 0; margin: 0; }
.shop-ui header .search-header form { padding: 4px 6px 4px 14px; border: 1px solid var(--ui-line); border-radius: 14px; background: var(--ui-bg); gap: 8px; align-items: center; }
.shop-ui header .search-header form:focus-within { border-color: var(--ui-accent); box-shadow: 0 0 0 3px var(--ui-tint); }
.shop-ui header .search-header form input { width: 100%; min-width: 0; padding: 9px 8px; min-height: 42px; border: 0; background: transparent; font-size: 1rem; color: var(--ui-text); }
.shop-ui header .search-header .search-btn { display: grid; place-items: center; flex: 0 0 42px; height: 42px; padding: 0; border-radius: 10px; background: var(--ui-accent); color: var(--ui-on-accent); }
.shop-ui header .contact-header { width: auto; margin: 0; gap: 10px; }
.shop-ui header .contact-header .login-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 16px; border: 1px solid var(--ui-line); border-radius: 12px; background: var(--ui-surface); color: var(--ui-text); font-size: .9375rem; white-space: nowrap; }
.shop-ui header .contact-header .login-btn:hover { background: var(--ui-tint); border-color: var(--ui-accent); color: var(--ui-accent); }
.shop-ui header .contact-header i { font-size: 22px; }
.shop-ui header #main-menu { border-radius: 0; background: transparent; border-top: 1px solid var(--ui-line); margin: 0; padding: 10px 0; display: flex; gap: 16px; flex-wrap: nowrap; }
.shop-ui header #main-menu > ul { display: flex; gap: 6px; flex-wrap: wrap; }
.shop-ui header #main-menu > ul > li > a { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 10px; color: var(--ui-muted); font-size: .9375rem; font-weight: 600; white-space: nowrap; }
.shop-ui header #main-menu > ul > li > a:hover, .shop-ui header #main-menu > ul > li > a[aria-current="page"] { background: var(--ui-tint); color: var(--ui-accent); }
.shop-ui .ui-nav-actions { display: flex; gap: 10px; align-items: center; margin-inline-start: auto; flex-shrink: 0; }
.shop-ui .ui-theme-trigger { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 38px; width: 38px; height: 38px; min-height: 38px; padding: 0; background: var(--ui-surface); color: var(--ui-text); border: 1px solid var(--ui-line); border-radius: 10px; line-height: 1; }
.shop-ui .ui-theme-trigger i { color: var(--ui-accent); font-size: 20px; }
.shop-ui .ui-theme-trigger:hover { border-color: var(--ui-accent); background: var(--ui-tint); }
.shop-ui header .cart-icon { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ui-accent); border: 1px solid var(--ui-line); border-radius: 12px; padding: 7px 13px; background: var(--ui-tint); text-decoration: none; font-size: .875rem; font-weight: 600; }
.shop-ui header .cart-badge { position: static; min-width: 22px; height: 22px; align-items: center; justify-content: center; line-height: 22px; font-size: .8125rem; background: var(--ui-accent); color: var(--ui-on-accent); }
.shop-ui .user-info { position: relative; }
.shop-ui .profile-hover-menu { z-index: 60; inset-inline-end: 0; inset-inline-start: auto; min-width: 220px; padding: 8px !important; background: var(--ui-raised) !important; border: 1px solid var(--ui-line); border-radius: 14px; box-shadow: var(--ui-shadow); }
.shop-ui .profile-hover-menu a { color: var(--ui-text) !important; display: flex; padding: 10px; gap: 20px; border-radius: 8px; }
.shop-ui .profile-hover-menu a:hover { background: var(--ui-tint); }
.shop-ui .user-info:focus-within .profile-hover-menu, .shop-ui .user-info.ui-profile-open .profile-hover-menu { display: block; opacity: 1; visibility: visible; }

/* Banner content and images still come from the existing API. */
.shop-ui #home-slider { margin: 14px auto 8px; max-width: 1400px; }
.shop-ui #home-slider .swiper-slide { border-radius: 22px; aspect-ratio: auto; height: clamp(164px,28vw,320px); align-self: center; background: var(--ui-soft); }
.shop-ui #home-slider .swiper-slide img { width: 100%; height: 100%; min-height: 0; border-radius: 22px; max-height: none; object-fit: contain; }
.shop-ui #home-slider .swiper-slide > a { display: block; width: 100%; height: 100%; }
.shop-ui #home-slider .caption { max-width: 90%; }
.shop-ui #home-slider .caption h2 { font-size: clamp(1.1rem, 2.4vw, 2rem); color: inherit; }
.shop-ui #home-slider .caption h3 { font-size: clamp(.875rem, 1.5vw, 1.125rem); color: inherit; }
.shop-ui .swiper-button-next, .shop-ui .swiper-button-prev { background: var(--ui-raised); color: var(--ui-text); border: 1px solid var(--ui-line); width: 40px; height: 40px; border-radius: 50%; padding: 10px; box-shadow: var(--ui-shadow); }
.shop-ui #home-slider .swiper-navigation-icon, .shop-ui #cats-slider .swiper-navigation-icon { filter: none; color: var(--ui-text); }
.shop-ui #cats-slider .swiper-button-prev:empty::before, .shop-ui #cats-slider .swiper-button-next:empty::before { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.shop-ui #cats-slider .swiper-button-prev:empty::before { transform: rotate(-45deg); }
.shop-ui #cats-slider .swiper-button-next:empty::before { transform: rotate(135deg); }
.shop-ui #iscard .banners-wrapper { display: grid; grid-template-columns: repeat(auto-fill,minmax(112px,132px)); gap: 12px; }
.shop-ui #iscard .banners-wrapper .hbanner { display: block; position: relative; width: 100%; min-width: 0; height: 118px; border: 1px solid var(--ui-line); background: var(--ui-surface); border-radius: 14px; overflow: hidden; }
.shop-ui #iscard .banners-wrapper .hbanner img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 13px; }
.shop-ui #iscard .banners-wrapper .hbanner .caption { inset: auto 0 0; width: 100%; max-width: 100%; max-height: 100%; padding: 10px; overflow: auto; }
.shop-ui #iscard .hbanner .caption h2, .shop-ui #iscard .hbanner .caption h3 { color: inherit; font-size: .875rem; line-height: 1.6; }
.shop-ui #cats-slider > .container { padding-block: 16px; }
.shop-ui #cats-slider .ui-category-heading, .shop-ui #iscard .ui-cards-heading { margin: 0 0 14px; font-size: 1.125rem; font-weight: 700; padding-inline-start: 10px; border-inline-start: 3px solid var(--ui-accent); }
.shop-ui #cats-slider .swiper-slide { width: 112px; min-width: 96px; padding: 4px; }
.shop-ui #cats-slider .swiper-slide a { color: var(--ui-text); font-size: .8125rem; font-weight: 600; line-height: 1.7; margin: 4px; }
.shop-ui #cats-slider .swiper-slide a img { background: var(--ui-surface); display: block; width: 100%; height: 88px; min-height: 0; object-fit: contain; border-radius: 14px; border: 1px solid var(--ui-line); padding: 6px; }
.shop-ui #cats-slider .swiper-slide a:hover img { border-color: var(--ui-accent); }
.shop-ui #catsublist { padding: 12px 0 0; gap: 8px; }
.shop-ui #catsublist li { margin: 4px 0; }
.shop-ui #catsublist li a { color: var(--ui-text); border-color: var(--ui-line); background: var(--ui-surface); font-size: .9375rem; padding: 8px 16px; border-radius: 10px; }
.shop-ui #catsublist li a:hover { background: var(--ui-tint); border-color: var(--ui-accent); }

/* Product cards. data-* attributes and cart forms are untouched. */
.shop-ui .offers .top, .shop-ui .cat-one-row .top, .shop-ui #archive-page .top { align-items: center; margin-bottom: 18px; }
.shop-ui .offers .top .right p, .shop-ui .cat-one-row .top .right p, .shop-ui #archive-page .top .right p { color: var(--ui-text); font-size: 1.375rem; font-weight: 700; line-height: 1.6; border-inline-start: 4px solid var(--ui-accent); padding-inline-start: 12px; }
.shop-ui .offers .top .right h2:empty { display: none; }
.shop-ui :is(.offers, .cat-one-row) .product-list .box-title { display: none; } /* duplicate section title */
.shop-ui .offers .product-list, .shop-ui .cat-one-row .product-list, .shop-ui #archive-page .product-list { min-width: 0; }
.shop-ui #archive-page .product-list .box-product { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); width: 100%; gap: 12px; overflow: visible; min-width: 0; }
.shop-ui .offers .product-list .box-product .card, .shop-ui .cat-one-row .product-list .box-product .card, .shop-ui #archive-page .product-list .box-product .card { position: relative; display: flex; flex-direction: column; width: auto; min-width: 0; flex: initial; height: auto; min-height: 19.5rem; padding: 10px; border-radius: 14px; border: 1px solid var(--ui-line); background: var(--ui-surface); text-align: right; box-shadow: var(--ui-shadow); overflow-wrap: anywhere; }
/* Cards whose quantity widget can show both "واحد" and "جزء" rows together need a little
   more reserved room than a single-row (یا بدون کنترل) card; only add it where it's needed. */
.shop-ui .offers .product-list .box-product .card:has(.cart-qty .qty-row ~ .qty-row), .shop-ui .cat-one-row .product-list .box-product .card:has(.cart-qty .qty-row ~ .qty-row), .shop-ui #archive-page .product-list .box-product .card:has(.cart-qty .qty-row ~ .qty-row) { min-height: 21.75rem; }
.shop-ui .offers .product-list .box-product .card:hover, .shop-ui .cat-one-row .product-list .box-product .card:hover, .shop-ui #archive-page .product-list .box-product .card:hover { border-color: var(--ui-accent); }
.shop-ui .offers .product-list .box-product .card .thumb, .shop-ui .cat-one-row .product-list .box-product .card .thumb, .shop-ui #archive-page .product-list .box-product .card .thumb { position: relative; display: grid; place-items: center; padding: 6px; aspect-ratio: auto; height: 112px; width: 100%; background: var(--ui-surface); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.shop-ui .offers .product-list .box-product .card .thumb img, .shop-ui .cat-one-row .product-list .box-product .card .thumb img, .shop-ui #archive-page .product-list .box-product .card .thumb img { width: 100%; height: 100%; object-fit: contain; min-height: 0; max-height: 100px; }
.shop-ui .offers .product-list .box-product .card .thumb .offer, .shop-ui .cat-one-row .product-list .box-product .card .thumb .offer, .shop-ui #archive-page .product-list .box-product .card .thumb .offer { z-index: 1; inset: 4px auto auto 4px; padding: 3px 8px; border-radius: 8px; background: var(--ui-accent); color: var(--ui-on-accent); font-size: .8125rem; font-weight: 700; }
.shop-ui .offers .product-list .box-product .card a.title, .shop-ui .cat-one-row .product-list .box-product .card a.title, .shop-ui #archive-page .product-list .box-product .card a.title { color: var(--ui-text); font-size: .875rem; font-weight: 600; line-height: 1.9; margin: 0 0 8px; padding: 0; height: auto; min-height: 3.8em; max-height: none; word-break: normal; overflow-wrap: break-word; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; cursor: pointer; }
.shop-ui .offers .product-list .box-product .card .price, .shop-ui .cat-one-row .product-list .box-product .card .price, .shop-ui #archive-page .product-list .box-product .card .price { display: flex; flex-direction: column; gap: 3px; min-height: 3.25rem; justify-content: flex-end; text-align: end; margin-top: 0; margin-bottom: 8px; }
.shop-ui .offers .product-list .box-product .card .price .normal, .shop-ui .cat-one-row .product-list .box-product .card .price .normal, .shop-ui #archive-page .product-list .box-product .card .price .normal { color: var(--ui-muted); font-size: .875rem; line-height: 1.6; }
.shop-ui .offers .product-list .box-product .card .price .discount, .shop-ui .cat-one-row .product-list .box-product .card .price .discount, .shop-ui #archive-page .product-list .box-product .card .price .discount { color: var(--ui-text); font-size: .9375rem; font-weight: 700; line-height: 1.7; }
.shop-ui .card .stock-info { font-size: .8125rem !important; line-height: 1.7; color: var(--ui-muted); background: var(--ui-soft); border-radius: 7px; padding: 4px 8px; margin: 0 0 10px; }
.shop-ui .card .stock-info span { color: var(--ui-muted) !important; }
.shop-ui .addtocartm { position: static; inset: auto; width: 100%; margin-top: 2px; }
.shop-ui .cart-inline { display: block; width: 100%; }
.shop-ui .cart-widget .btn.add-first { display: inline-flex; width: 100%; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--ui-accent); border-radius: 10px; color: var(--ui-accent); background: var(--ui-tint); font-size: .9375rem; line-height: 1.6; font-weight: 600; }
.shop-ui .cart-widget .btn.add-first:hover { color: var(--ui-on-accent); background: var(--ui-accent); }
.shop-ui .cart-widget .qty-wrap { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 0; background: transparent; border-radius: 0; }
.shop-ui .cart-widget .qty-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; width: 100%; min-width: 0; background: var(--ui-tint); padding: 4px; border: 1px solid var(--ui-line); border-radius: 10px; }
.shop-ui .cart-widget .qty-label { color: var(--ui-muted); min-width: 28px; font-size: .8125rem; padding-inline-start: 3px; }
.shop-ui .cart-widget .qty-btn { flex: 0 0 36px; display: grid; place-items: center; min-height: 36px; width: 36px; padding: 0; font-size: 1.25rem; border: 0; border-radius: 8px; background: var(--ui-surface); color: var(--ui-accent); line-height: 1; }
.shop-ui .cart-widget .qty-btn:hover { background: var(--ui-accent); color: var(--ui-on-accent); }
.shop-ui .cart-widget .qty-input { width: 44px; min-width: 24px; flex: 1 1 44px; min-height: 36px; max-width: 70px; padding: 2px; text-align: center; font-size: 1rem; line-height: 1.8; background: transparent; color: var(--ui-text); border: 0; border-radius: 6px; }
.shop-ui .box-product > p { grid-column: 1 / -1; text-align: center; padding: 48px 20px; border: 1px dashed var(--ui-line); background: var(--ui-surface); border-radius: 18px; width: 100%; }

/* Home collections remain a single row at EVERY width, including wide desktop.
   The ellipsis takes its own space and never covers prices or cart controls. */
.shop-ui .offers .product-list .box-product, .shop-ui .cat-one-row .product-list .box-product { display: flex; flex: 1 1 auto; flex-wrap: nowrap; align-items: stretch; overflow-x: auto; overflow-y: hidden; gap: 12px; padding: 4px 2px 10px; scroll-padding-inline: 2px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--ui-line) transparent; }
.shop-ui .offers .product-list .box-product .card, .shop-ui .cat-one-row .product-list .box-product .card { flex: 0 0 clamp(160px,12vw,164px); width: clamp(160px,12vw,164px); scroll-snap-align: start; }
.shop-ui .ui-product-rail { display: flex; align-items: center; gap: 8px; }
.shop-ui .ui-rail-more { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 44px; padding: 0; border: 1px solid var(--ui-line); border-radius: 12px; background: var(--ui-surface); color: var(--ui-accent); box-shadow: var(--ui-shadow); }
.shop-ui .ui-rail-more span { font-family: Tahoma,sans-serif; font-size: 15px; letter-spacing: 1px; direction: ltr; line-height: 1; }
.shop-ui .ui-rail-more:hover { border-color: var(--ui-accent); background: var(--ui-tint); }

/* Product detail dialog: all selectors used by the original JS are preserved. */
body.shop-ui .modal-wrapper { background: var(--ui-overlay); padding: 24px; backdrop-filter: blur(4px); }
body.shop-ui .modal-wrapper .modal-content { width: min(880px,100%); max-height: calc(100dvh - 48px); overflow-y: auto; display: grid; grid-template-columns: 1fr 1.15fr; gap: 20px; padding: 24px; background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: 24px; box-shadow: 0 24px 70px #0003; }
body.shop-ui .modal-wrapper .modal-content .top { grid-column: 1/-1; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--ui-line); }
body.shop-ui .modal-wrapper .modal-content .top h4 { color: var(--ui-muted); font-size: .9375rem; margin: 0; }
body.shop-ui .modal-wrapper .modal-content .top .btn-close { width: 40px; height: 40px; border-radius: 10px; background: var(--ui-soft); color: var(--ui-text); }
body.shop-ui .modal-wrapper .modal-content .img-box { min-width: 0; align-content: center; background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: 16px; margin: 0; padding: 20px; }
body.shop-ui .modal-wrapper .modal-content .img-box .swiper-slide img { width: 100%; max-height: 310px; object-fit: contain; }
body.shop-ui .modal-wrapper .modal-content .bottom { padding: 0; min-width: 0; background: transparent; }
body.shop-ui .modal-wrapper .modal-content .bottom .title h2 { color: var(--ui-text); font-size: 1.375rem; font-weight: 700; line-height: 1.8; }
body.shop-ui .modal-wrapper .modal-content .bottom .information { padding: 16px; background: var(--ui-soft); border-radius: 12px; gap: 12px; justify-content: space-between; margin: 20px 0; }
body.shop-ui .modal-wrapper .modal-content .bottom .information div { width: 50%; }
body.shop-ui .modal-wrapper .modal-content .bottom .information p { font-size: .9375rem; line-height: 1.8; color: var(--ui-text); }
body.shop-ui .modal-wrapper .modal-content .bottom .information p.cat { color: var(--ui-muted); font-size: .8125rem; margin-bottom: 4px; }
body.shop-ui .modal-wrapper .modal-content .bottom .information hr { height: auto; background: var(--ui-line); flex-shrink: 0; }
body.shop-ui .modal-wrapper .modal-content .bottom .more-add { flex-direction: column-reverse; gap: 18px; align-items: stretch; }
body.shop-ui .modal-wrapper .modal-content .bottom .more-add .price { text-align: end; font-size: 1.125rem; color: var(--ui-text); }
body.shop-ui .modal-wrapper .modal-content .bottom .more-add .price [data-price] { color: var(--ui-muted); font-size: .875rem; text-decoration: line-through; }
body.shop-ui .modal-wrapper .modal-content .bottom .more-add .price [data-discount] { color: var(--ui-text); font-size: 1.25rem; font-weight: 700; text-decoration: none; }

/* Basket: totals and original columns remain visible. Horizontal scrolling stays inside the basket. */
.shop-ui .shoping-cart-wrapper { padding: 24px; background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: 20px; box-shadow: var(--ui-shadow); }
.shop-ui .shoping-cart-wrapper .header { gap: 16px; flex-wrap: wrap; }
.shop-ui .shoping-cart-wrapper .header h2 { font-size: 1.5rem; font-weight: 700; margin: 0; }
.shop-ui .shoping-cart-wrapper .header .more { color: var(--ui-danger); background: var(--ui-danger-bg); border: 1px solid currentColor; border-radius: 10px; font-size: .875rem; padding: 8px 12px; }
.shop-ui .shoping-cart-wrapper table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9375rem; margin-block: 24px; }
.shop-ui .shoping-cart-wrapper table :is(td,th) { border-color: var(--ui-line); padding: 14px 10px; color: var(--ui-text); font-size: .875rem; line-height: 1.8; }
.shop-ui .shoping-cart-wrapper table thead th { color: var(--ui-muted); background: var(--ui-soft); white-space: nowrap; font-weight: 600; }
.shop-ui .shoping-cart-wrapper table tbody tr:nth-child(odd) { background: var(--ui-surface); }
.shop-ui .shoping-cart-wrapper table tbody tr:nth-child(even) { background: var(--ui-bg); }
.shop-ui #cart-page .cart-qty .qty-row .qty-label { color: var(--ui-muted); margin-bottom: 0; }
.shop-ui .shoping-cart-wrapper .cart-product img { min-width: 60px; width: 60px; height: 60px; object-fit: contain; background: var(--ui-surface); border-radius: 10px; padding: 4px; }
.shop-ui .shoping-cart-wrapper .cart-widget { min-width: 150px; }
.shop-ui .shoping-cart-wrapper table .line-total { min-width: 130px !important; font-weight: 700; }
.shop-ui .shoping-cart-wrapper table tfoot th { font-weight: 600; background: var(--ui-soft); }
.shop-ui .shoping-cart-wrapper table tfoot tr:last-child th { background: var(--ui-tint); color: var(--ui-accent); font-size: 1.125rem; border-bottom: 0; }
.shop-ui .shoping-cart-wrapper table .trash { width: 40px; height: 40px; border-radius: 10px; background: var(--ui-danger-bg); color: var(--ui-danger); }
.shop-ui .shoping-cart-wrapper table .trash i { color: inherit; }
.shop-ui #factor-explain { display: block; width: 100%; min-height: 110px; resize: vertical; border-radius: 12px; color: var(--ui-text); background: var(--ui-surface); border: 1px solid var(--ui-line); }
.shop-ui #btn-checkout, .shop-ui #login-wrapper #login-form #loginBtn, .shop-ui #register-wrapper #submitBtn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 11px 24px; border: 1px solid var(--ui-accent); border-radius: 12px; background: var(--ui-accent); color: var(--ui-on-accent); font-size: 1rem; font-weight: 700; line-height: 1.7; }
.shop-ui #btn-checkout:hover:not(:disabled), .shop-ui #loginBtn:hover:not(:disabled), .shop-ui #submitBtn:hover:not(:disabled) { background: var(--ui-hover); }
.shop-ui .cdm-overlay { background: var(--ui-overlay); backdrop-filter: blur(4px); }
.shop-ui .cdm-box { width: min(440px,calc(100vw - 32px)); background: var(--ui-raised); color: var(--ui-text); border: 1px solid var(--ui-line); border-radius: 20px; padding: 24px; box-shadow: var(--ui-shadow); }
.shop-ui .cdm-box h3 { font-size: 1.25rem; }
.shop-ui .cdm-box p { color: var(--ui-muted); font-size: 1rem; }
.shop-ui .cdm-btn { font-size: 1rem; min-height: 44px; border-radius: 10px; }
.shop-ui .cdm-cancel { background: var(--ui-soft); color: var(--ui-text); border: 1px solid var(--ui-line); }
.shop-ui .cdm-ok { background: var(--ui-danger); color: var(--ui-surface); }

/* Account pages. No new authentication or registration handling. */
.shop-ui.ui-auth-page { background: var(--ui-bg); }
.shop-ui .ui-auth-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; max-width: 1200px; margin: auto; padding: 24px 28px; }
.shop-ui .ui-auth-back { color: var(--ui-muted); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; font-size: .9375rem; }
.shop-ui.ui-auth-page main { display: grid; align-content: center; min-height: calc(100vh - 125px); padding-bottom: 50px; }
.shop-ui #login-wrapper { width: 100%; max-width: 460px; margin: 20px auto; height: auto; padding: 36px; border-radius: 24px; border: 1px solid var(--ui-line); background: var(--ui-surface); box-shadow: var(--ui-shadow); }
.shop-ui .ui-auth-mark { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--ui-tint); color: var(--ui-accent); margin-bottom: 16px; }
.shop-ui .ui-auth-mark i { font-size: 28px; }
.shop-ui #login-wrapper h1 { margin: 0 0 8px; font-size: 1.625rem; }
.shop-ui #login-wrapper .ui-auth-intro { color: var(--ui-muted); margin-bottom: 24px; font-size: .9375rem; }
.shop-ui #login-wrapper #login-form { display: flex; flex-direction: column; gap: 8px; }
.shop-ui #login-wrapper #login-form label { color: var(--ui-text); font-size: .9375rem; font-weight: 600; margin-top: 8px; }
.shop-ui #login-wrapper #login-form input:not([type="hidden"]) { width: 100%; min-height: 48px; border: 1px solid var(--ui-line); border-radius: 12px; color: var(--ui-text); background: var(--ui-bg); padding: 10px 14px; font-size: 1rem; line-height: 1.8; }
.shop-ui #login-wrapper #login-form #loginBtn { width: 100%; margin-top: 18px; }
.shop-ui #login-wrapper #loginResult { color: var(--ui-muted); font-size: .9375rem; min-height: 28px; margin: 8px 0; overflow-wrap: anywhere; }
.shop-ui #login-wrapper > a { display: block; text-align: center; padding-top: 20px; border-top: 1px solid var(--ui-line); text-decoration: none; font-size: .9375rem; font-weight: 600; }
.shop-ui #register-wrapper { max-width: 1030px; margin: 20px auto 60px; padding: 0 24px; }
.shop-ui #register-wrapper > .card { background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: 24px; padding: 32px; box-shadow: var(--ui-shadow); }
.shop-ui #register-wrapper h1 { font-size: 1.625rem; margin-bottom: 6px; }
.shop-ui #register-wrapper .hint { color: var(--ui-muted); margin-bottom: 28px; }
.shop-ui #register-wrapper .grid { gap: 20px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.shop-ui #register-wrapper .row2 { gap: 20px; margin-top: 22px; }
.shop-ui #register-wrapper .field label { display: block; margin-bottom: 8px; font-size: .9375rem; font-weight: 600; }
.shop-ui #register-wrapper .field input, .shop-ui #register-wrapper .field textarea { min-height: 48px; font-size: 1rem; line-height: 1.8; background: var(--ui-bg); color: var(--ui-text); border: 1px solid var(--ui-line); border-radius: 12px; padding: 10px 14px; }
.shop-ui #register-wrapper .field textarea { min-height: 110px; }
.shop-ui #register-wrapper .actions { border-top: 1px solid var(--ui-line); padding-top: 24px; margin-top: 24px; gap: 24px; }
.shop-ui #register-wrapper .link { color: var(--ui-accent); }
.shop-ui #register-wrapper .alert.bad, .shop-ui .alert-danger { background: var(--ui-danger-bg) !important; color: var(--ui-danger) !important; border-color: var(--ui-danger) !important; }
.shop-ui #register-wrapper .alert.ok { background: var(--ui-success-bg); color: var(--ui-success); border-color: var(--ui-success); }
.shop-ui #register-wrapper .alert ul { list-style: disc; padding-inline-start: 22px; }

/* Reports and the existing date picker, including inline/API-created rows. */
.shop-ui main.container:has(.g-table) { margin-top: 24px !important; padding: 24px 28px 40px; }
.shop-ui main.container:has(.g-table) > .row { margin-bottom: 20px; }
.shop-ui main.container:has(.g-table) > .row:nth-child(2) { padding: 20px; background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: 16px; }
.shop-ui main.container:has(.g-table) small, .shop-ui #pageInfo, .shop-ui #detailStatus, .shop-ui #statusText { color: var(--ui-muted) !important; }
.shop-ui .g-btn { background: var(--ui-accent); border-color: var(--ui-accent); color: var(--ui-on-accent); min-height: 44px; border-radius: 10px; font-size: .9375rem; }
.shop-ui .g-btn--ghost, .shop-ui .eye-btn { border: 1px solid var(--ui-line); background: var(--ui-surface); color: var(--ui-accent); padding: 8px 14px; min-height: 42px; font-size: .9375rem; }
.shop-ui .g-input { min-width: 0; width: 185px; direction: ltr; text-align: center; }
.shop-ui .g-chip { background: var(--ui-soft); color: var(--ui-text); border-color: var(--ui-line); font-size: .875rem; }
.shop-ui main.container:has(.g-table) > div[style*="overflow:auto"], .shop-ui #modal div[style*="border"], .shop-ui #headerBox { border-color: var(--ui-line) !important; background-color: var(--ui-surface) !important; }
.shop-ui .g-table { min-width: 980px !important; }
.shop-ui :is(.g-table,#modal table) :is(th,td) { padding: 15px 18px !important; border-color: var(--ui-line) !important; font-size: .9375rem; line-height: 1.9; color: var(--ui-text) !important; }
.shop-ui :is(.g-table,#modal table) thead tr { background: var(--ui-soft) !important; }
.shop-ui :is(.g-table,#modal table) tbody tr:nth-child(even) { background: var(--ui-bg); }
.shop-ui #modal { background: var(--ui-overlay) !important; overflow: auto; backdrop-filter: blur(4px); }
.shop-ui #modal > div { background: var(--ui-raised) !important; border: 1px solid var(--ui-line); max-height: calc(100dvh - 36px); overflow: auto !important; }
.shop-ui #modal #closeModal { background: var(--ui-soft) !important; color: var(--ui-text); width: 40px; height: 40px; border-radius: 10px; }
.shop-ui #modal #headerBox { background: var(--ui-soft) !important; color: var(--ui-text); }
.shop-ui :is(.bd-main,.bd-table,.bd-calendar,.bd-title,.bd-dropdown) { background: var(--ui-raised) !important; color: var(--ui-text) !important; border-color: var(--ui-line) !important; }
.shop-ui .bd-main { width: min(300px,calc(100vw - 24px)) !important; box-shadow: var(--ui-shadow); border: 1px solid var(--ui-line); border-radius: 12px; padding: 8px; z-index: 80; }
.shop-ui .bd-table th, .shop-ui .bd-table td { color: var(--ui-text); font-size: .875rem; }
.shop-ui .bd-calendar, .shop-ui .bd-title, .shop-ui .bd-calendar table, .shop-ui .bd-goto-today { width: 100%; }
.shop-ui .bd-title { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.shop-ui .bd-table { table-layout: fixed; }
.shop-ui .bd-dropdown { flex: 1 1 0; min-width: 0; float: none; }
.shop-ui .bd-dropdown select { min-height: 38px; height: 38px; width: 100%; padding: 2px 4px; font-size: .9375rem; border-radius: 6px; background: var(--ui-surface); color: var(--ui-text); }
.shop-ui .bd-next, .shop-ui .bd-prev { float: none; flex: 0 0 30px; width: 30px; height: 38px; font-size: .75rem; border-radius: 6px; background-color: var(--ui-soft); color: var(--ui-text); }
.shop-ui .bd-next:hover, .shop-ui .bd-prev:hover { background-color: var(--ui-tint); color: var(--ui-accent); }
.shop-ui .bd-table thead, .shop-ui .bd-table thead tr { background: var(--ui-soft); color: var(--ui-text); }
.shop-ui .bd-table tbody tr, .shop-ui .bd-table tbody tr:nth-child(even), .shop-ui .bd-empty-cell { background: var(--ui-raised); }
.shop-ui .bd-table-days button { width: 100%; height: 34px; padding: 0; border-radius: 4px; background: var(--ui-surface); color: var(--ui-text); font-size: .875rem; }
.shop-ui .bd-table-days button.bd-holiday { background: var(--ui-danger-bg) !important; color: var(--ui-danger); }
.shop-ui .bd-table-days button.bd-today { background: var(--ui-tint) !important; color: var(--ui-accent); box-shadow: inset 0 0 0 1px var(--ui-accent); }
.shop-ui .bd-table-days button:hover:enabled { background: var(--ui-tint) !important; color: var(--ui-accent); }
.shop-ui .bd-table-days button.bd-selected-day { background: var(--ui-accent) !important; color: var(--ui-on-accent); font-weight: 700; }
.shop-ui .bd-table-days button:disabled { background: var(--ui-soft) !important; color: var(--ui-muted); }
.shop-ui .bd-goto-today { background: var(--ui-soft); color: var(--ui-text); border-radius: 6px; }

/* Existing informational pages and footer. */
.shop-ui #profile-detail { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 32px; border: 1px solid var(--ui-line); border-radius: 20px; background: var(--ui-surface); gap: 24px; }
.shop-ui #profile-detail h1 { grid-column: 1/-1; margin: 0; }
.shop-ui #profile-detail p { font-size: 1.0625rem; color: var(--ui-text); overflow-wrap: anywhere; }
.shop-ui .ui-profile-label { display: block; color: var(--ui-muted); font-size: .875rem; margin-bottom: 6px; }
.shop-ui #faq-wrapper { max-width: 940px; margin: auto; gap: 12px; }
.shop-ui #faq-wrapper .accordion { min-height: 60px; padding: 16px 20px; border-radius: 12px; border: 1px solid var(--ui-line); color: var(--ui-text); background: var(--ui-surface); font-size: 1rem; }
.shop-ui #faq-wrapper .accordion::after { content: '+'; float: left; color: var(--ui-accent); font-size: 1.5rem; }
.shop-ui #faq-wrapper .accordion.active::after { content: '−'; }
.shop-ui #faq-wrapper .accordion.active { color: var(--ui-accent); border-color: var(--ui-accent); background: var(--ui-tint); }
.shop-ui #faq-wrapper .panel { width: 100%; padding: 20px; background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: 12px; }
.shop-ui #faq-wrapper .panel p { color: var(--ui-muted); }
.shop-ui .contact-detail h3 { font-size: 1.5rem; }
.shop-ui .contact-detail ul { gap: 20px; }
.shop-ui .contact-detail ul li { padding: 32px 20px; border-radius: 18px; background: var(--ui-surface); border: 1px solid var(--ui-line); color: var(--ui-text); overflow-wrap: anywhere; }
.shop-ui .contact-detail ul i { color: var(--ui-accent); }
.shop-ui .ui-empty-page { display: flex; align-items: center; text-align: center; flex-direction: column; gap: 14px; padding-block: 50px; }
.shop-ui .ui-empty-page h1 { color: var(--ui-accent); font-size: 5rem; margin: 0; }
.shop-ui .ui-empty-page a { display: inline-flex; padding: 10px 20px; border-radius: 12px; color: var(--ui-on-accent); background: var(--ui-accent); text-decoration: none; }
.shop-ui > footer { margin-top: 30px; background: var(--ui-surface); border-top: 1px solid var(--ui-line); color: var(--ui-text); }
.shop-ui > footer > .container { padding-top: 40px; padding-bottom: 40px; }
.shop-ui footer .row { gap: 40px; align-items: start; }
.shop-ui footer .logo-about-footer { flex: 1 1 300px; width: auto; }
.shop-ui footer .logo-about-footer img { max-height: 70px; max-width: 180px; object-fit: contain; background: var(--ui-surface); border-radius: 10px; margin-bottom: 20px; }
.shop-ui footer .logo-about-footer p { max-width: 560px; color: var(--ui-muted); font-size: .9375rem; line-height: 2; }
.shop-ui footer .social-contact-footer { flex: 1 1 360px; width: auto; }
.shop-ui footer h3 { color: var(--ui-text); font-size: 1rem; margin: 0 0 16px; }
.shop-ui footer .contact-detail-footer a { color: var(--ui-muted); font-size: .9375rem; display: inline-flex; gap: 10px; align-items: center; text-decoration: none; padding-block: 5px; overflow-wrap: anywhere; }
.shop-ui footer .contact-detail-footer a i { color: var(--ui-accent); }
.shop-ui footer .social ul { display: flex; gap: 10px; flex-wrap: wrap; }
.shop-ui footer .social ul li a { display: grid; place-items: center; width: 42px; height: 42px; color: var(--ui-accent); background: var(--ui-tint); border: 1px solid var(--ui-line); border-radius: 12px; text-decoration: none; }

/* Palette chooser: a native dialog + radio inputs for keyboard and touch. */
.shop-ui .ui-theme-dialog { width: min(720px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 28px; margin: auto; color: var(--ui-text); background: var(--ui-raised); border: 1px solid var(--ui-line); border-radius: 24px; box-shadow: 0 32px 90px #0004; overflow: auto; }
.shop-ui .ui-theme-dialog:not([open]) { display: none; }
.shop-ui .ui-theme-dialog::backdrop { background: var(--ui-overlay); backdrop-filter: blur(5px); }
.shop-ui .ui-theme-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.shop-ui .ui-eyebrow { font-size: .8125rem; color: var(--ui-accent); font-weight: 600; }
.shop-ui .ui-theme-heading h2 { font-size: 1.375rem; margin: 4px 0 10px; }
.shop-ui .ui-icon-button { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; background: var(--ui-soft); color: var(--ui-text); border: 1px solid var(--ui-line); border-radius: 10px; }
.shop-ui .ui-theme-dialog p { color: var(--ui-muted); font-size: .9375rem; }
.shop-ui .ui-theme-group { margin: 24px 0 0; padding: 0; border: 0; min-width: 0; }
.shop-ui .ui-theme-group legend { padding: 0; font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.shop-ui .ui-theme-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.shop-ui .ui-palette { position: relative; display: flex; flex-direction: column; cursor: pointer; min-width: 0; gap: 8px; text-align: center; }
.shop-ui .ui-palette input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.shop-ui .ui-palette-preview { display: block; position: relative; height: 74px; border: 2px solid var(--ui-line); border-radius: 12px; background: var(--ui-bg); overflow: hidden; }
.shop-ui .ui-preview-bar { position: absolute; inset: 0 0 auto; height: 17px; background: var(--ui-surface); border-bottom: 1px solid var(--ui-line); }
.shop-ui .ui-preview-content { position: absolute; inset: 25px 10px 10px 44%; border: 1px solid var(--ui-line); border-radius: 4px; background: var(--ui-surface); }
.shop-ui .ui-preview-accent { position: absolute; inset: 25px 65% 10px 10px; border-radius: 4px; background: var(--ui-accent); }
.shop-ui .ui-palette-preview i { display: none; position: absolute; bottom: 5px; right: 5px; width: 23px; height: 23px; line-height: 23px; font-size: 17px; border-radius: 50%; color: var(--ui-on-accent); background: var(--ui-accent); }
.shop-ui .ui-palette input:checked + .ui-palette-preview { border-color: var(--ui-accent); }
.shop-ui .ui-palette input:checked + .ui-palette-preview i { display: block; }
.shop-ui .ui-palette input:focus-visible + .ui-palette-preview { outline: 3px solid var(--ui-accent); outline-offset: 3px; }
.shop-ui .ui-palette-name { color: var(--ui-text); font-size: .875rem; line-height: 1.6; }
.shop-ui .ui-theme-status { padding-top: 16px; margin-top: 20px; border-top: 1px solid var(--ui-line); }

@media (max-width: 1199px) {
  .shop-ui #archive-page .product-list .box-product { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .shop-ui header .row:first-child { grid-template-columns: 130px minmax(160px,1fr) auto; gap: 16px; }
  .shop-ui header .logo-wrapper img { max-width: 130px; }
}
@media (max-width: 900px) {
  .shop-ui .container { padding-inline: 20px; }
  .shop-ui #archive-page .product-list .box-product { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .shop-ui #register-wrapper .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shop-ui #profile-detail { grid-template-columns: 1fr; }
  .shop-ui header #main-menu > ul > li > a { padding: 8px 10px; font-size: .875rem; }
  .shop-ui .ui-cart-label { display: none; }
}
@media (max-width: 650px) {
  .shop-ui .container { padding: 16px; }
  .shop-ui main { padding-bottom: 20px; }
  .shop-ui > header > .container { padding: 14px 16px 0; }
  .shop-ui > header .row:first-child { grid-template-columns: 1fr auto; gap: 14px; }
  .shop-ui header .logo-wrapper img { max-height: 44px; max-width: 140px; }
  .shop-ui header .search-header { grid-column: 1/-1; grid-row: 2; }
  .shop-ui header .contact-header .login-btn { min-height: 42px; font-size: .875rem; padding: 7px 12px; }
  .shop-ui header #main-menu { flex-wrap: wrap; gap: 8px; padding-block: 8px; }
  .shop-ui header #main-menu > ul { flex: 1 1 100%; justify-content: space-between; flex-wrap: nowrap; gap: 0; }
  .shop-ui header #main-menu > ul > li > a { font-size: .875rem; padding: 8px; }
  .shop-ui .ui-nav-actions { width: 100%; justify-content: space-between; gap: 12px; padding-bottom: 4px; }
  .shop-ui .ui-cart-label { display: inline; }
  .shop-ui header .cart-icon { padding: 6px 12px; }
  .shop-ui .ui-theme-trigger { min-height: 38px; padding: 0; }
  .shop-ui #home-slider { margin-top: 10px; }
  .shop-ui #home-slider .swiper-slide { width: 90% !important; border-radius: 14px; }
  .shop-ui #home-slider .swiper-slide img { border-radius: 14px; }
  .shop-ui #home-slider .caption h2 { font-size: 1.125rem; }
  .shop-ui #home-slider .caption h3 { font-size: .875rem; }
  .shop-ui #home-slider .swiper-button-prev, .shop-ui #home-slider .swiper-button-next { width: 30px; height: 30px; padding: 8px; }
  .shop-ui #iscard .banners-wrapper { grid-template-columns: repeat(auto-fill,minmax(112px,132px)); gap: 10px; }
  .shop-ui #iscard .banners-wrapper .hbanner { height: 118px; }
  .shop-ui #cats-slider > .container { padding-block: 14px; }
  .shop-ui #cats-slider .swiper-slide { width: 100px; }
  .shop-ui #cats-slider .swiper-slide a { font-size: .8125rem; }
  .shop-ui .offers .product-list .box-product, .shop-ui .cat-one-row .product-list .box-product { display: flex; overflow-x: auto; overflow-y: hidden; flex-wrap: nowrap; gap: 12px; padding-bottom: 14px; scroll-padding-inline: 2px; scrollbar-width: thin; }
  .shop-ui .offers .product-list .box-product .card, .shop-ui .cat-one-row .product-list .box-product .card { flex: 0 0 160px; width: 160px; scroll-snap-align: start; }
  .shop-ui #archive-page .product-list .box-product { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .shop-ui #archive-page .product-list .box-product .card { padding: 10px; border-radius: 14px; }
  .shop-ui #archive-page .product-list .box-product .card a.title { font-size: .9375rem; }
  .shop-ui #archive-page .product-list .box-product .card .price .discount { font-size: .9375rem; }
  .shop-ui #archive-page .product-list .box-product .card .thumb { margin-bottom: 12px; padding: 4px; }
  .shop-ui .cart-widget .btn.add-first { font-size: .875rem; padding: 8px 4px; }
  .shop-ui .cart-widget .qty-row { flex-wrap: wrap; }
  .shop-ui .cart-widget .qty-label { flex: 1 0 100%; text-align: center; }
  .shop-ui .cart-widget .qty-btn { min-height: 38px; width: 38px; flex-basis: 38px; }
  .shop-ui .cart-widget .qty-input { max-width: none; }
  body.shop-ui .modal-wrapper { padding: 12px; }
  body.shop-ui .modal-wrapper .modal-content { grid-template-columns: 1fr; gap: 14px; padding: 18px; border-radius: 20px; max-height: calc(100dvh - 24px); }
  body.shop-ui .modal-wrapper .modal-content .img-box .swiper-slide img { max-height: 230px; }
  body.shop-ui .modal-wrapper .modal-content .bottom .title h2 { font-size: 1.125rem; }
  .shop-ui .shoping-cart-wrapper { padding: 16px; border-radius: 16px; }
  .shop-ui .shoping-cart-wrapper .header h2 { font-size: 1.25rem; }
  .shop-ui .shoping-cart-wrapper .header .more { font-size: .875rem; }
  .shop-ui .shoping-cart-wrapper table { display: table !important; min-width: 1050px; }
  .shop-ui .shoping-cart-wrapper table thead { display: table-header-group !important; }
  .shop-ui .shoping-cart-wrapper table tbody { display: table-row-group !important; }
  .shop-ui .shoping-cart-wrapper table tfoot { display: table-footer-group !important; }
  .shop-ui .shoping-cart-wrapper table tr { display: table-row !important; }
  .shop-ui .shoping-cart-wrapper table :is(th,td) { display: table-cell !important; width: auto !important; max-width: none; }
  .shop-ui .shoping-cart-wrapper table td::before { display: none !important; }
  .shop-ui .shoping-cart-wrapper .tshowinmob { display: none !important; }
  .shop-ui #btn-checkout { width: 100%; }
  .shop-ui #login-wrapper { margin: 12px auto; padding: 26px 22px; }
  .shop-ui .ui-auth-top { padding: 18px 16px; gap: 12px; }
  .shop-ui .ui-auth-back, .shop-ui .ui-auth-top .ui-theme-trigger { font-size: .875rem; }
  .shop-ui #register-wrapper { padding: 0 16px; margin-top: 12px; }
  .shop-ui #register-wrapper > .card { padding: 24px 20px; }
  .shop-ui #register-wrapper .grid, .shop-ui #register-wrapper .row2 { grid-template-columns: 1fr; gap: 18px; }
  .shop-ui #register-wrapper .actions { align-items: stretch; flex-direction: column; text-align: center; gap: 16px; }
  .shop-ui main.container:has(.g-table) { padding: 16px; margin-top: 10px !important; }
  .shop-ui main.container:has(.g-table) > .row:nth-child(2) { padding: 16px; }
  .shop-ui .g-input { width: 145px; }
  .shop-ui .contact-detail ul { grid-template-columns: 1fr; }
  .shop-ui footer .row { gap: 30px; }
  .shop-ui footer .social-contact-footer { flex-basis: 100%; }
  .shop-ui .ui-theme-dialog { padding: 20px; border-radius: 20px; }
  .shop-ui .ui-theme-heading h2 { font-size: 1.125rem; }
  .shop-ui .ui-theme-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px 10px; }
}
@media (max-width: 360px) {
  .shop-ui #archive-page .product-list .box-product { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shop-ui #archive-page .product-list .box-product .card { padding: 8px; }
  .shop-ui header #main-menu > ul > li > a { padding-inline: 5px; }
  .shop-ui .ui-auth-top { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .shop-ui *, .shop-ui *::before, .shop-ui *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .shop-ui > header, .shop-ui > footer, .shop-ui .ui-theme-dialog, .shop-ui .ui-theme-trigger { display: none !important; }
  body.shop-ui { color: #111; background: #fff; }
}

/* Compatibility corrections for the original compiled CSS (browser QA). */
.shop-ui #home-slider .swiper { height: auto; }
.shop-ui #home-slider .swiper-button-prev, .shop-ui #home-slider .swiper-button-next { top: 50%; height: 40px; width: 40px; margin: 0; transform: translateY(-50%); }
.shop-ui .shoping-cart-wrapper table td.tshowindesc { display: table-cell; }
.shop-ui #toast-host > div { background: var(--ui-raised) !important; color: var(--ui-text) !important; border: 1px solid var(--ui-line); }
.shop-ui.ui-unavailable-page { display: flex; flex-direction: column; min-height: 100vh; height: auto; align-items: center; justify-content: flex-start; text-align: center; }
.shop-ui.ui-unavailable-page > .ui-auth-top { width: 100%; margin: 0; }
.shop-ui.ui-unavailable-page > img { width: min(500px,calc(100% - 40px)); margin: 6vh auto 24px; border-radius: 20px; }
.shop-ui.ui-unavailable-page > p { font-family: inherit; color: var(--ui-text); }
@media (max-width: 768px) {
  .shop-ui .shoping-cart-wrapper table { display: table !important; min-width: 1050px; }
  .shop-ui .shoping-cart-wrapper table thead { display: table-header-group !important; }
  .shop-ui .shoping-cart-wrapper table tbody { display: table-row-group !important; }
  .shop-ui .shoping-cart-wrapper table tfoot { display: table-footer-group !important; }
  .shop-ui .shoping-cart-wrapper table tr { display: table-row !important; background: var(--ui-surface); }
  .shop-ui .shoping-cart-wrapper table :is(th,td) { display: table-cell !important; width: auto !important; max-width: none; }
  .shop-ui .shoping-cart-wrapper table tr.cart-item td { float: none !important; position: static !important; padding: 12px 10px !important; border-bottom: 1px solid var(--ui-line) !important; }
  .shop-ui .shoping-cart-wrapper table tr.cart-item { background: var(--ui-surface); }
  .shop-ui .shoping-cart-wrapper table tr:not(.cart-item) :is(td,th) { padding: 12px 10px !important; }
  .shop-ui .shoping-cart-wrapper table td::before, .shop-ui .shoping-cart-wrapper .tshowinmob { display: none !important; }
}
@media (max-width: 650px) {
  .shop-ui #home-slider .swiper-button-prev, .shop-ui #home-slider .swiper-button-next { width: 32px; height: 32px; }
}

/* Home collections inspired by the supplied reference. Colors inherit the chosen
   palette; validated API colors can customize the heading without replacing data. */
.shop-ui .ui-collection > .container { max-width: min(1344px,calc(100% - 56px)); padding: 18px; margin-block: 16px; border: 1px solid var(--ui-line); border-radius: 22px; background: var(--ui-tint); background: linear-gradient(175deg,var(--ui-collection-color,var(--ui-accent)),color-mix(in srgb,var(--ui-collection-color,var(--ui-accent)) 14%,var(--ui-surface))); }
.shop-ui .ui-collection .top { margin-bottom: 12px; }
.shop-ui .ui-collection .top .right p { display: flex; align-items: center; gap: 9px; padding: 0; margin: 0; border: 0; font-size: 1.125rem; color: var(--ui-collection-ink,var(--ui-on-accent)); }
.shop-ui .ui-collection-icon { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; font-size: 19px; background: #ffffff26; border-radius: 9px; }
.shop-ui .ui-collection .ui-rail-more { border-color: transparent; }
.shop-ui .offers .product-list .box-product .card, .shop-ui .cat-one-row .product-list .box-product .card { box-shadow: 0 4px 12px #15233808; }
.shop-ui .card .addtocartm:has(.cart-add-form:not([hidden])) { position: absolute; inset: 88px auto auto 10px; width: 34px; margin: 0; }
.shop-ui .card .cart-widget .btn.add-first { width: 34px; min-height: 34px; height: 34px; padding: 0; border-radius: 11px; background: var(--ui-surface); font-size: 21px; }
.shop-ui .card .cart-widget .btn.add-first span { display: none; }
.shop-ui .card .cart-widget .qty-wrap { margin-top: 4px; gap: 4px; }
.shop-ui .cart-widget .cart-qty .qty-row { flex-wrap: nowrap; gap: 2px; padding: 2px; }
.shop-ui .cart-widget .cart-qty .qty-label { flex: 0 0 26px; min-width: 26px; padding: 0; font-size: .75rem; margin: 0; white-space: nowrap; overflow-wrap: normal; word-break: normal; text-align: center; }
.shop-ui .cart-widget .cart-qty .qty-btn { flex: 0 0 26px; width: 26px; min-height: 30px; font-size: 1.0625rem; }
.shop-ui .cart-widget .cart-qty input.qty-input { width: 32px; min-width: 28px; max-width: 60px; flex: 1 1 32px; min-height: 30px; padding: 2px; border: 1px solid var(--ui-line); font-size: .9375rem; color: var(--ui-text); background: var(--ui-surface); }
.shop-ui #cart-page .cart-widget .cart-qty input.qty-input { width: 40px; min-width: 24px; padding: 2px; }
.shop-ui [data-cart-widget][aria-busy="true"] .cart-qty { border-inline-start: 2px solid var(--ui-accent); padding-inline-start: 2px; }
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .shop-ui .offers .product-list .box-product .card, .shop-ui .cat-one-row .product-list .box-product .card { transition: transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
  .shop-ui :is(.offers,.cat-one-row) .product-list .box-product .card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px #00000016; }
  .shop-ui #cats-slider .swiper-slide a img { transition: transform .18s ease,border-color .18s ease; }
  .shop-ui #cats-slider .swiper-slide a:hover img { transform: translateY(-2px); }
}
@media (max-width:650px) {
  .shop-ui .ui-collection > .container { max-width: calc(100% - 24px); padding: 12px; margin-block: 12px; border-radius: 18px; }
  .shop-ui .ui-collection .top .right p { font-size: 1rem; }
  .shop-ui .ui-collection-icon { width: 26px; height: 26px; flex-basis: 26px; font-size: 17px; }
}

/* 1.1.1: pointer gestures and transitions use one local Swiper instance. */
.shop-ui #home-slider .swiper-wrapper, .shop-ui #cats-slider .swiper-wrapper { transition-timing-function: cubic-bezier(.22,.61,.36,1); }
.shop-ui #home-slider .swiper-slide { transition: opacity .2s ease; }
.shop-ui #home-slider .swiper img, .shop-ui #cats-slider .swiper img { user-select: none; -webkit-user-drag: none; }
.shop-ui #home-slider .swiper, .shop-ui #cats-slider .swiper { touch-action: pan-y; }
.shop-ui .swiper-button-lock { display: none !important; }
.shop-ui #cats-slider .swiper-button-prev, .shop-ui #cats-slider .swiper-button-next { top: 48px; margin-top: 0; }
.shop-ui #cats-slider .swiper-button-disabled { opacity: .35; pointer-events: none; }
.shop-ui #archive-page .product-list .box-product { align-items: stretch; grid-auto-rows: 1fr; }
@media (max-width:650px) {
  .shop-ui #iscard .banners-wrapper { display: flex; flex-wrap: nowrap; gap: 10px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; scrollbar-width: thin; }
  .shop-ui #iscard .banners-wrapper .hbanner { flex: 0 0 124px; width: 124px; scroll-snap-align: start; }
}
@media (max-width:360px) {
  .shop-ui #archive-page .cart-widget .cart-qty .qty-row { padding: 1px; gap: 1px; }
  .shop-ui #archive-page .cart-widget .cart-qty .qty-label { flex-basis: 24px; min-width: 24px; font-size: .6875rem; }
  .shop-ui #archive-page .cart-widget .cart-qty .qty-btn { flex-basis: 24px; width: 24px; }
  .shop-ui #archive-page .cart-widget .cart-qty input.qty-input { font-size: .875rem; }
}

/* 1.1.3: The card's reserved minimum now matches what that specific card can
   actually grow into, instead of reserving worst-case (both قty rows) for every
   card. A card with only "جزء" — or no quantity widget yet — uses the smaller
   19.5rem floor; only cards whose widget can show "واحد" AND "جزء" together
   (matched via :has() on two sibling .qty-row) get the taller 21.75rem floor.
   Still a minimum, not a fixed height, so larger text can grow the card, and
   still stretched together within each rail/archive row so neighbours match. */
.shop-ui .box-product .card .thumb { flex-shrink: 0; }
.shop-ui .box-product .card .addtocartm:has(.cart-qty:not([hidden])) { margin-top: auto; flex-shrink: 0; }
/* Without visible quantity controls, keep the stock status at the foot of
   the card. The existing add button remains beside the product image. */
.shop-ui .box-product .card:not(:has(.cart-qty:not([hidden]))) .stock-info { margin-top: auto; margin-bottom: 0; }
