:root {
  --amas-page-bg: #ffffff;
  --amas-surface: #ffffff;
  --amas-surface-soft: #f7f9fc;
  --amas-surface-muted: #eef3fb;
  --amas-border: #dce6f4;
  --amas-text: #111827;
  --amas-text-soft: #667085;
  --amas-input-bg: #ffffff;
  --amas-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --amas-page-bg: #0b1120;
  --amas-surface: #111827;
  --amas-surface-soft: #151e2e;
  --amas-surface-muted: #1b2638;
  --amas-border: #273449;
  --amas-text: #f8fafc;
  --amas-text-soft: #aeb8c8;
  --amas-input-bg: #101827;
  --amas-shadow: 0 16px 38px rgba(0, 0, 0, .28);
}

html[data-theme="dark"],
html[data-theme="dark"] body {
  background: var(--amas-page-bg) !important;
  color: var(--amas-text) !important;
}

html[data-theme="dark"] #content,
html[data-theme="dark"] main,
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .content-wrapper,
html[data-theme="dark"] .breadcrumb-box {
  color: var(--amas-text) !important;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .well,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .offcanvas,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .product-thumb,
html[data-theme="dark"] .product-thumb-viewed,
html[data-theme="dark"] .amas-account-quick-tool,
html[data-theme="dark"] .amas-account-switcher > summary,
html[data-theme="dark"] .amas-account-switcher-menu,
html[data-theme="dark"] .amas-account-profile-card,
html[data-theme="dark"] .amas-kt-drawer-panel {
  background-color: var(--amas-surface) !important;
  border-color: var(--amas-border) !important;
  color: var(--amas-text) !important;
}

html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .bg-light-primary,
html[data-theme="dark"] .bg-light-secondary {
  background-color: var(--amas-surface-soft) !important;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] .text-dark,
html[data-theme="dark"] .text-gray-900,
html[data-theme="dark"] .text-gray-800,
html[data-theme="dark"] .text-gray-700,
html[data-theme="dark"] .product-name,
html[data-theme="dark"] .product-name a,
html[data-theme="dark"] .price {
  color: var(--amas-text) !important;
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .text-gray-600,
html[data-theme="dark"] .text-gray-500,
html[data-theme="dark"] .description {
  color: var(--amas-text-soft) !important;
}

html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .input-group-text {
  background-color: var(--amas-input-bg) !important;
  border-color: var(--amas-border) !important;
  color: var(--amas-text) !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #7f8ba0 !important;
}

.amas-kt-theme-mobile { display: none; }

@media (max-width: 1020px) {
  body:not(.amas-marketplace) .amas-kt-header .amas-kt-actions .amas-kt-theme-mobile {
    display: flex !important;
  }
  body:not(.amas-marketplace) .amas-kt-header .amas-kt-theme-mobile .amas-theme-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
  }
  body:not(.amas-marketplace) .amas-kt-header .amas-kt-theme-mobile .amas-theme-toggle-icon i {
    font-size: 22px !important;
    color: #fff !important;
  }
}

/* Home modules: native dark-theme surfaces and typography */
html[data-theme="dark"] .amasdon-shop-category {
  --asc-bg: var(--amas-page-bg) !important;
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .amasdon-shop-category .asc-section-head h2,
html[data-theme="dark"] .amasdon-shop-category .asc-hero-title,
html[data-theme="dark"] .amasdon-shop-category .asc-category-name,
html[data-theme="dark"] .amasdon-shop-category .asc-product-mini-link {
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .amasdon-shop-category .asc-section-head p,
html[data-theme="dark"] .amasdon-shop-category .asc-hero-subtitle {
  color: var(--amas-text-soft) !important;
}
html[data-theme="dark"] .amasdon-shop-category .asc-hero {
  --asc-banner-bg: #172235 !important;
  color: var(--amas-text) !important;
  box-shadow: var(--amas-shadow) !important;
}
html[data-theme="dark"] .amasdon-shop-category .asc-hero::after {
  background: linear-gradient(90deg,rgba(11,17,32,.92) 0%,rgba(11,17,32,.58) 40%,rgba(11,17,32,.08) 74%) !important;
}
html[data-theme="dark"] .amasdon-shop-category .asc-trending,
html[data-theme="dark"] .amasdon-shop-category .asc-products {
  background: rgba(17,24,39,.92) !important;
  border-color: var(--amas-border) !important;
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .amasdon-shop-category .asc-product-mini-image {
  background: var(--amas-surface-soft) !important;
}

html[data-theme="dark"] .add-daily-deals {
  background: var(--amas-surface) !important;
  border-color: var(--amas-border) !important;
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .add-daily-deals::before {
  background: linear-gradient(135deg,#111827,#151e2e) !important;
}
html[data-theme="dark"] .add-daily-deals.has-bg::before {
  background-image: linear-gradient(90deg,rgba(11,17,32,.94),rgba(17,24,39,.82)),var(--add-bg) !important;
}
html[data-theme="dark"] .add-daily-deals::after {
  background: radial-gradient(circle at 14% 9%,rgba(39,52,73,.35),transparent 30%) !important;
}
html[data-theme="dark"] .add-daily-deals .add-deals-head h2,
html[data-theme="dark"] .add-daily-deals .product-name a,
html[data-theme="dark"] .add-daily-deals .price-new {
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .add-daily-deals .add-deals-head p,
html[data-theme="dark"] .add-daily-deals .price-tax,
html[data-theme="dark"] .add-daily-deals .product-reviews {
  color: var(--amas-text-soft) !important;
}
html[data-theme="dark"] .add-daily-deals .product-thumb,
html[data-theme="dark"] .add-daily-deals .caption {
  background: var(--amas-surface-soft) !important;
  border-color: var(--amas-border) !important;
}
html[data-theme="dark"] .add-daily-deals .product-thumb .image {
  background: var(--amas-surface-muted) !important;
}
html[data-theme="dark"] .add-daily-deals .btn-wishlist {
  background: var(--amas-surface-muted) !important;
  color: var(--amas-text) !important;
}

html[data-theme="dark"] .asi {
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .asi .asi__eyebrow,
html[data-theme="dark"] .asi .asi__title {
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .asi .asi__counter-nav,
html[data-theme="dark"] .asi .asi__counter,
html[data-theme="dark"] .asi .asi__arrow {
  background: var(--amas-surface) !important;
  border-color: var(--amas-border) !important;
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .asi .asi__product {
  background: var(--amas-surface-soft) !important;
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .asi .asi__product-image {
  background: var(--amas-surface-muted) !important;
}
html[data-theme="dark"] .asi .asi__products-arrow {
  background: rgba(17,24,39,.96) !important;
  border-color: var(--amas-border) !important;
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .asi .asi__dot {
  background: #526077 !important;
}
html[data-theme="dark"] .asi .asi__dot.is-active {
  background: #344158 !important;
  box-shadow: inset 0 0 0 1px var(--amas-border) !important;
}
html[data-theme="dark"] .asi .asi__dot .asi__dot-fill {
  background: #e5e7eb !important;
}

/* Standard home product cards: keep product photography intact, theme the UI around it. */
html[data-theme="dark"] .amas-product-card {
  background: var(--amas-surface) !important;
  border-color: var(--amas-border) !important;
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .amas-product-card .caption,
html[data-theme="dark"] .amas-product-card .product-description,
html[data-theme="dark"] .amas-product-card .product-description-box {
  background: var(--amas-surface) !important;
  border-color: var(--amas-border) !important;
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .amas-product-card .product-name,
html[data-theme="dark"] .amas-product-card .product-name a,
html[data-theme="dark"] .amas-product-card .price,
html[data-theme="dark"] .amas-product-card .price-new {
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .amas-product-card .price-tax,
html[data-theme="dark"] .amas-product-card .product-model,
html[data-theme="dark"] .amas-product-card .product-reviews {
  color: var(--amas-text-soft) !important;
}
html[data-theme="dark"] .amas-product-card .image,
html[data-theme="dark"] .amas-product-card .product-image {
  background: var(--amas-surface-muted) !important;
}

/* Unified storefront dark theme — component surfaces */
html[data-theme="dark"] {
  --amas-page-bg: #0b1019;
  --amas-surface: #111827;
  --amas-surface-soft: #172033;
  --amas-surface-muted: #1d293b;
  --amas-border: #2a374b;
  --amas-text: #f8fafc;
  --amas-text-soft: #aeb8c8;
  --amas-input-bg: #101827;
}

html[data-theme="dark"] body,
html[data-theme="dark"] #content,
html[data-theme="dark"] .container-module,
html[data-theme="dark"] .home-page-content-top,
html[data-theme="dark"] .row-flex {
  background-color: var(--amas-page-bg) !important;
}

/* Header drawers: wishlist, viewed, account/settings and their native content. */
html[data-theme="dark"] .amas-kt-drawer-panel,
html[data-theme="dark"] .amas-kt-wishlist-panel,
html[data-theme="dark"] .amas-kt-wishlist-top,
html[data-theme="dark"] .amas-kt-wishlist-head,
html[data-theme="dark"] .amas-kt-wishlist-list,
html[data-theme="dark"] .amas-kt-settings-panel,
html[data-theme="dark"] .amas-kt-settings-top,
html[data-theme="dark"] .amas-kt-settings-body,
html[data-theme="dark"] .header-cart-fix-right,
html[data-theme="dark"] .header-cart-title,
html[data-theme="dark"] .header-cart-scroll {
  background-color: var(--amas-surface) !important;
  border-color: var(--amas-border) !important;
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .amas-kt-drawer-title,
html[data-theme="dark"] .amas-kt-wishlist-head,
html[data-theme="dark"] .amas-kt-wishlist-copy strong,
html[data-theme="dark"] .amas-kt-settings-panel strong,
html[data-theme="dark"] .header-cart-title {
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .amas-kt-wishlist-head span,
html[data-theme="dark"] .amas-kt-wishlist-copy,
html[data-theme="dark"] .amas-kt-wishlist-price del,
html[data-theme="dark"] .amas-kt-wishlist-empty,
html[data-theme="dark"] .amas-kt-settings-panel span {
  color: var(--amas-text-soft) !important;
}
html[data-theme="dark"] .amas-kt-wishlist-item {
  background: var(--amas-surface-soft) !important;
  border-color: var(--amas-border) !important;
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .amas-kt-wishlist-item:hover,
html[data-theme="dark"] .amas-kt-wishlist-item:focus {
  background: var(--amas-surface-muted) !important;
}
html[data-theme="dark"] .amas-kt-wishlist-item img {
  background: #fff !important;
}
html[data-theme="dark"] .amas-kt-wishlist-price,
html[data-theme="dark"] .amas-kt-wishlist-price em {
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .amas-kt-drawer-panel .header-cart-close,
html[data-theme="dark"] .amas-kt-drawer-switch,
html[data-theme="dark"] .amas-kt-wishlist-view {
  background: var(--amas-surface-muted) !important;
  border-color: var(--amas-border) !important;
  color: var(--amas-text) !important;
}

/* Viewed-product native UpStore sheet. */
html[data-theme="dark"] .product-thumb-viewed,
html[data-theme="dark"] .product-thumb-viewed .caption,
html[data-theme="dark"] .product-thumb-viewed .product-description {
  background: var(--amas-surface) !important;
  border-color: var(--amas-border) !important;
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .product-thumb-viewed .product-name,
html[data-theme="dark"] .product-thumb-viewed .product-name a,
html[data-theme="dark"] .product-thumb-viewed .price,
html[data-theme="dark"] .product-thumb-viewed .price-new {
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .product-thumb-viewed .price-old,
html[data-theme="dark"] .product-thumb-viewed .price-tax {
  color: var(--amas-text-soft) !important;
}

/* Category/navigation surfaces. */
html[data-theme="dark"] .amas-kt-menu-shell.active-m,
html[data-theme="dark"] .amas-kt-menu-shell.mm_open_hp,
html[data-theme="dark"] .amas-kt-menu-shell .menu-box,
html[data-theme="dark"] .amas-kt-menu-shell #menu-vertical,
html[data-theme="dark"] .amas-kt-menu-shell #menu-vertical-list,
html[data-theme="dark"] .amas-kt-menu-shell .ns-dd,
html[data-theme="dark"] .amas-kt-menu-shell .dropdown-menu-simple,
html[data-theme="dark"] .amas-kt-menu-shell .dropdown-menu-full,
html[data-theme="dark"] .amas-kt-menu-shell .dropdown-menu-full-image,
html[data-theme="dark"] .amas-kt-menu-shell .dropdown-menu-information,
html[data-theme="dark"] .amas-kt-menu-shell .dropdown-menu-product,
html[data-theme="dark"] .amas-kt-menu-shell .dropdown-menu-manufacturer,
html[data-theme="dark"] .amas-kt-menu-shell .dropdown-menu-html-block {
  background-color: var(--amas-surface) !important;
  border-color: var(--amas-border) !important;
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .amas-kt-menu-shell #menu-vertical > ul > li > a,
html[data-theme="dark"] .amas-kt-menu-shell .dropdown-menu a,
html[data-theme="dark"] .amas-kt-menu-shell .item-name {
  color: var(--amas-text) !important;
}

/* Product lists/tabs: dark UI, but never tint product photography. */
html[data-theme="dark"] .product-thumb,
html[data-theme="dark"] .amas-product-card,
html[data-theme="dark"] .product-thumb .caption,
html[data-theme="dark"] .amas-product-card .caption,
html[data-theme="dark"] .product-thumb .product-description,
html[data-theme="dark"] .amas-product-card .product-description {
  background-color: var(--amas-surface) !important;
  border-color: var(--amas-border) !important;
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .product-thumb .image,
html[data-theme="dark"] .amas-product-card .image,
html[data-theme="dark"] .product-thumb .product-image,
html[data-theme="dark"] .amas-product-card .product-image {
  background-color: #fff !important;
}
html[data-theme="dark"] .product-thumb .product-name a,
html[data-theme="dark"] .amas-product-card .product-name a,
html[data-theme="dark"] .product-thumb .price-new,
html[data-theme="dark"] .amas-product-card .price-new {
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .product-thumb .price-old,
html[data-theme="dark"] .amas-product-card .price-old,
html[data-theme="dark"] .product-thumb .price-tax,
html[data-theme="dark"] .amas-product-card .price-tax,
html[data-theme="dark"] .product-thumb .product-reviews,
html[data-theme="dark"] .amas-product-card .product-reviews {
  color: var(--amas-text-soft) !important;
}
html[data-theme="dark"] .nav-tabs,
html[data-theme="dark"] .nav-tabs > li > a,
html[data-theme="dark"] .tab-content,
html[data-theme="dark"] .tabs-product,
html[data-theme="dark"] .tabs-product .tab-content {
  background-color: var(--amas-surface) !important;
  border-color: var(--amas-border) !important;
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .nav-tabs > li.active > a,
html[data-theme="dark"] .nav-tabs > li.active > a:hover,
html[data-theme="dark"] .nav-tabs > li.active > a:focus {
  background-color: var(--amas-surface-muted) !important;
  border-color: var(--amas-border) !important;
  color: var(--amas-text) !important;
}

/* Home module shells and controls that retained light hard-coded colors. */
html[data-theme="dark"] .add-daily-deals .add-view-product,
html[data-theme="dark"] .add-daily-deals .add-nav,
html[data-theme="dark"] .asi__counter-nav,
html[data-theme="dark"] .asi__counter,
html[data-theme="dark"] .asi__arrow,
html[data-theme="dark"] .asi__products-arrow {
  background-color: var(--amas-surface-soft) !important;
  border-color: var(--amas-border) !important;
  color: var(--amas-text) !important;
}
html[data-theme="dark"] .add-daily-deals .product-thumb .image,
html[data-theme="dark"] .asi__product-image {
  background: #fff !important;
}
html[data-theme="dark"] .asi__product {
  background: var(--amas-surface-soft) !important;
  color: var(--amas-text) !important;
}

/* Generic UpStore light utility surfaces used inside storefront modules. */
html[data-theme="dark"] .bg-white:not(.image):not(.product-image),
html[data-theme="dark"] .bg-light:not(.image):not(.product-image),
html[data-theme="dark"] .bg-light-primary,
html[data-theme="dark"] .bg-light-secondary {
  background-color: var(--amas-surface-soft) !important;
  color: var(--amas-text) !important;
}
