
/* =========================================================
   AMATEO SHOP — LIGHT / DARK THEME
   ========================================================= */

:root{
  color-scheme:light;

  --amateo-bg:#f8f8fb;
  --amateo-bg-soft:#f3f2f7;
  --amateo-card:#ffffff;
  --amateo-card-soft:#faf9fc;

  --amateo-text:#1f1b26;
  --amateo-text-soft:#6f6977;
  --amateo-muted:#97919d;

  --amateo-border:#e7e3ea;
  --amateo-border-soft:#efedf2;

  --amateo-input:#ffffff;

  --amateo-shadow:0 12px 40px rgba(35,28,55,.07);

  --amateo-purple:#6853ed;
  --amateo-purple-soft:#f0edff;
}

html[data-theme="dark"]{
  color-scheme:dark;

  --amateo-bg:#111116;
  --amateo-bg-soft:#17171e;
  --amateo-card:#1b1b23;
  --amateo-card-soft:#202029;

  --amateo-text:#f3f2f7;
  --amateo-text-soft:#c2bec9;
  --amateo-muted:#928d9b;

  --amateo-border:#30303a;
  --amateo-border-soft:#292932;

  --amateo-input:#202029;

  --amateo-shadow:0 14px 45px rgba(0,0,0,.22);

  --amateo-purple:#8a76ff;
  --amateo-purple-soft:#29233f;
}


/* PAGE */

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

html[data-theme="dark"] body{
  transition:
    background-color .22s ease,
    color .22s ease;
}


/* MAIN SURFACES */

html[data-theme="dark"] header,
html[data-theme="dark"] nav,
html[data-theme="dark"] .header,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .navbar,
html[data-theme="dark"] .site-header{
  background-color:rgba(17,17,22,.94) !important;
  border-color:var(--amateo-border) !important;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .catalog-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .side-card,
html[data-theme="dark"] .order,
html[data-theme="dark"] .item,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .account-card,
html[data-theme="dark"] .filter-bar,
html[data-theme="dark"] .filters,
html[data-theme="dark"] .cart,
html[data-theme="dark"] .cart-panel,
html[data-theme="dark"] .checkout-card,
html[data-theme="dark"] .review-card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu{
  background:var(--amateo-card) !important;
  border-color:var(--amateo-border) !important;
  color:var(--amateo-text) !important;
  box-shadow:var(--amateo-shadow);
}


/* GENERIC WHITE SURFACES */

html[data-theme="dark"] main [style*="background:#fff"],
html[data-theme="dark"] main [style*="background: #fff"],
html[data-theme="dark"] main [style*="background:white"],
html[data-theme="dark"] main [style*="background: white"]{
  background:var(--amateo-card) !important;
}


/* TEXT */

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"] strong,
html[data-theme="dark"] .title,
html[data-theme="dark"] .product-title,
html[data-theme="dark"] .order-title,
html[data-theme="dark"] .order-name,
html[data-theme="dark"] .price,
html[data-theme="dark"] .order-price,
html[data-theme="dark"] .stat-value{
  color:var(--amateo-text) !important;
}

html[data-theme="dark"] p,
html[data-theme="dark"] small,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .subtitle,
html[data-theme="dark"] .description,
html[data-theme="dark"] .order-meta,
html[data-theme="dark"] .email,
html[data-theme="dark"] .meta{
  color:var(--amateo-text-soft) !important;
}


/* LINKS */

html[data-theme="dark"] a:not(.primary-btn):not(.buy-btn):not(.get){
  color:inherit;
}


/* INPUTS */

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{
  background:var(--amateo-input) !important;
  border-color:var(--amateo-border) !important;
  color:var(--amateo-text) !important;
}

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


/* SECONDARY BUTTONS */

html[data-theme="dark"] button:not(.amateo-theme-choice):not(.submit):not(.get),
html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .secondary-action{
  border-color:var(--amateo-border) !important;
}


/* LIGHT/PURPLE SOFT ELEMENTS */

html[data-theme="dark"] .side-link,
html[data-theme="dark"] .profile-save{
  background:var(--amateo-purple-soft) !important;
  color:#aa9cff !important;
}


/* PRODUCT SUB AREAS */

html[data-theme="dark"] .item,
html[data-theme="dark"] .order-items > *,
html[data-theme="dark"] .product-info,
html[data-theme="dark"] .product-meta{
  background-color:var(--amateo-card-soft) !important;
}


/* DIVIDERS */

html[data-theme="dark"] hr{
  border-color:var(--amateo-border) !important;
}

html[data-theme="dark"] *{
  scrollbar-color:#454450 #17171d;
}


/* =========================================================
   THEME SWITCHER
   ========================================================= */

.amateo-theme-switcher{
  position:fixed;
  left:18px;
  bottom:18px;
  z-index:99998;

  display:flex;
  align-items:center;
  gap:4px;

  padding:5px;

  border:1px solid rgba(120,110,140,.16);
  border-radius:16px;

  background:rgba(255,255,255,.91);
  box-shadow:
    0 12px 38px rgba(30,25,45,.13),
    0 2px 8px rgba(30,25,45,.05);

  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);

  transition:
    background .2s ease,
    border-color .2s ease;
}

html[data-theme="dark"] .amateo-theme-switcher{
  background:rgba(28,28,36,.93);
  border-color:#373641;
  box-shadow:0 14px 40px rgba(0,0,0,.30);
}

.amateo-theme-choice{
  width:38px;
  height:34px;
  padding:0;

  display:grid;
  place-items:center;

  border:0 !important;
  border-radius:11px;

  background:transparent !important;
  color:#817b88;

  font-size:15px;
  line-height:1;

  cursor:pointer;

  transition:
    background .18s ease,
    color .18s ease,
    transform .18s ease;
}

.amateo-theme-choice:hover{
  transform:translateY(-1px);
}

.amateo-theme-choice.is-active{
  background:#eeeaff !important;
  color:#644de7 !important;
}

html[data-theme="dark"] .amateo-theme-choice{
  color:#aaa5b0;
}

html[data-theme="dark"] .amateo-theme-choice.is-active{
  background:#383047 !important;
  color:#b7a9ff !important;
}

.amateo-theme-choice svg{
  width:17px;
  height:17px;
}

.amateo-theme-tooltip{
  position:absolute;
  left:0;
  bottom:48px;

  width:max-content;
  max-width:220px;

  padding:7px 10px;

  border-radius:9px;

  background:#211d28;
  color:#fff;

  font-size:10px;
  font-weight:700;

  opacity:0;
  visibility:hidden;
  transform:translateY(4px);

  pointer-events:none;

  transition:.18s ease;
}

.amateo-theme-switcher:hover .amateo-theme-tooltip{
  opacity:1;
  visibility:visible;
  transform:none;
}

html[data-theme="dark"] .amateo-theme-tooltip{
  background:#f4f2f7;
  color:#211d28;
}


/* NO FLASH WHILE PAGE LOADS */

html.amateo-theme-loading body{
  visibility:hidden;
}


/* MOBILE */

@media(max-width:600px){
  .amateo-theme-switcher{
    left:12px;
    bottom:12px;
  }

  .amateo-theme-choice{
    width:36px;
    height:32px;
  }

  .amateo-theme-tooltip{
    display:none;
  }
}

/* =========================================================
   AMATEO DARK THEME V2 — STOREFRONT FIX
   ========================================================= */

html[data-theme="dark"] body,
html[data-theme="dark"] .homepage,
html[data-theme="dark"] .catalog-page{
  background:#111116 !important;
  color:#f4f3f7 !important;
}


/* ---------- HEADER ---------- */

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .market-nav,
html[data-theme="dark"] .catalog-page .topbar{
  background:#15151b !important;
  border-bottom:1px solid #292932 !important;
  box-shadow:0 5px 22px rgba(0,0,0,.18) !important;
}

html[data-theme="dark"] .logo,
html[data-theme="dark"] .navlinks a{
  color:#f4f3f7 !important;
}

html[data-theme="dark"] .navlinks .active-link{
  background:#282331 !important;
  color:#a996ff !important;
}


/* ---------- SEARCH ---------- */

html[data-theme="dark"] .search,
html[data-theme="dark"] .catalog-search,
html[data-theme="dark"] .market-search input{
  background:#202027 !important;
  border-color:#34343d !important;
  color:#f6f5f8 !important;
}

html[data-theme="dark"] .search::placeholder,
html[data-theme="dark"] .catalog-search::placeholder,
html[data-theme="dark"] .market-search input::placeholder{
  color:#77737e !important;
}


/* ---------- PAGE HEADINGS ---------- */

html[data-theme="dark"] .catalog-hero h1,
html[data-theme="dark"] .catalog-page h1{
  color:#f5f4f8 !important;
}

html[data-theme="dark"] .catalog-hero p{
  color:#aaa5b1 !important;
}

html[data-theme="dark"] .eyebrow{
  color:#8c78ff !important;
}


/* ---------- TOOLBAR ---------- */

html[data-theme="dark"] .catalog-toolbar{
  background:#1b1b22 !important;
  border-color:#303039 !important;
  box-shadow:0 10px 30px rgba(0,0,0,.13) !important;
}

html[data-theme="dark"] .catalog-tools .filter{
  background:transparent !important;
  border-color:transparent !important;
  color:#bdb8c4 !important;
}

html[data-theme="dark"] .catalog-tools .filter:hover{
  background:#27262e !important;
  color:#fff !important;
}

html[data-theme="dark"] .catalog-tools .filter.active{
  background:linear-gradient(135deg,#725cff,#5d49e4) !important;
  color:#fff !important;
}

html[data-theme="dark"] .catalog-toolbar select{
  background:#222229 !important;
  border-color:#33333c !important;
  color:#f3f2f5 !important;
}


/* ---------- PRODUCT CARDS ---------- */

html[data-theme="dark"] .catalog-page .product-card,
html[data-theme="dark"] .product-card{
  background:#1b1b22 !important;
  border:1px solid #2d2d36 !important;
  box-shadow:0 10px 30px rgba(0,0,0,.20) !important;
}

html[data-theme="dark"] .catalog-page .product-card:hover,
html[data-theme="dark"] .product-card:hover{
  border-color:#3b3650 !important;
  box-shadow:0 18px 42px rgba(0,0,0,.32) !important;
}


/* ---------- PRODUCT TEXT ---------- */

html[data-theme="dark"] .product-card .product-title,
html[data-theme="dark"] .catalog-page .product-title{
  color:#f5f4f8 !important;
}

html[data-theme="dark"] .product-card .product-desc,
html[data-theme="dark"] .catalog-page .product-desc{
  color:#9e99a6 !important;
}

html[data-theme="dark"] .product-card .price,
html[data-theme="dark"] .catalog-page .price{
  color:#fff !important;
}

html[data-theme="dark"] .old-price{
  color:#77727e !important;
}

html[data-theme="dark"] .product-price-wrap small{
  color:#898490 !important;
}


/* ---------- CHIPS ---------- */

html[data-theme="dark"] .product-card .chip,
html[data-theme="dark"] .catalog-page .chip{
  background:#28272f !important;
  color:#bbb6c2 !important;
  border-color:#34333c !important;
}


/* ---------- STOCK ---------- */

html[data-theme="dark"] .stock{
  color:#53c986 !important;
}

html[data-theme="dark"] .stock-empty{
  color:#e17682 !important;
}


/* ---------- PRODUCT DIVIDER ---------- */

html[data-theme="dark"] .product-bottom{
  border-top-color:#303039 !important;
}


/* ---------- HEART ---------- */

html[data-theme="dark"] .heart{
  background:#24242b !important;
  border:1px solid #35353e !important;
  color:#f4f3f7 !important;
  box-shadow:0 4px 15px rgba(0,0,0,.22) !important;
}

html[data-theme="dark"] .heart:hover{
  background:#302b40 !important;
  color:#aa98ff !important;
}


/* ---------- BUTTONS ---------- */

html[data-theme="dark"] .buy-now-btn{
  background:linear-gradient(135deg,#765fff,#5c49e4) !important;
  color:#fff !important;
  border-color:transparent !important;
}

html[data-theme="dark"] .add-cart-btn{
  background:#24242b !important;
  border:1px solid #3a3942 !important;
  color:#eeeef2 !important;
}

html[data-theme="dark"] .add-cart-btn:hover{
  background:#2d2c35 !important;
}

html[data-theme="dark"] .details-btn{
  background:#29243a !important;
  color:#a996ff !important;
  border-color:#312b46 !important;
}


/* ---------- BADGES ---------- */

html[data-theme="dark"] .badge{
  background:#f4f3f7 !important;
  color:#6550e4 !important;
}


/* ---------- FOOTER ---------- */

html[data-theme="dark"] .footer{
  background:#15151b !important;
  border-color:#292932 !important;
  color:#aaa5b1 !important;
}


/* ---------- ACCOUNT BUTTON ---------- */

html[data-theme="dark"] .login-action{
  background:#27232f !important;
  color:#b2a3ff !important;
  border-color:#353040 !important;
}


/* ---------- CART / FAVORITES TOP BUTTONS ---------- */

html[data-theme="dark"] .cart-btn,
html[data-theme="dark"] .favorites-btn{
  background:#222229 !important;
  color:#f2f1f5 !important;
  border-color:#34343d !important;
}


/* ---------- AMATEO15 POPUP ---------- */

html[data-theme="dark"] .amateo15-promo{
  background:rgba(27,27,34,.96) !important;
  border-color:#35343e !important;
  box-shadow:0 20px 55px rgba(0,0,0,.35) !important;
}

html[data-theme="dark"] .amateo15-promo-content,
html[data-theme="dark"] .amateo15-text,
html[data-theme="dark"] .amateo15-text strong{
  color:#f5f4f8 !important;
}

html[data-theme="dark"] .amateo15-text span,
html[data-theme="dark"] .amateo15-text small{
  color:#aaa5b1 !important;
}

html[data-theme="dark"] .amateo15-code{
  background:#2d2940 !important;
  color:#b3a3ff !important;
}


/* ---------- ACCOUNT PAGE ---------- */

html[data-theme="dark"] .stat,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .side-card,
html[data-theme="dark"] .order{
  background:#1b1b22 !important;
  border-color:#303039 !important;
}

html[data-theme="dark"] .item{
  background:#222229 !important;
}

html[data-theme="dark"] .profile-input{
  background:#222229 !important;
  border-color:#383741 !important;
  color:#fff !important;
}


/* ---------- SMOOTHER TRANSITION ---------- */

body,
.product-card,
.catalog-toolbar,
.topbar,
.side-card,
.order,
.stat{
  transition:
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease,
    box-shadow .18s ease;
}


/* =========================================================
   AMATEO DARK THEME V3 — MARKETPLACE HOME
   ========================================================= */

html[data-theme="dark"] body.homepage.marketplace-home{
    background:
      radial-gradient(circle at 8% 0%, rgba(111,84,255,.10), transparent 27%),
      radial-gradient(circle at 94% 8%, rgba(110,72,160,.08), transparent 24%),
      #101014 !important;

    color:#f4f2f7 !important;
}


/* ===== HEADER ===== */

html[data-theme="dark"] .marketplace-home .market-header{
    background:rgba(17,17,22,.96) !important;
    border-bottom:1px solid #292831 !important;
    box-shadow:0 8px 28px rgba(0,0,0,.20) !important;
}

html[data-theme="dark"] .marketplace-home .market-brand{
    color:#f6f4f8 !important;
}

html[data-theme="dark"] .marketplace-home .brand-copy strong{
    color:#f6f4f8 !important;
}

html[data-theme="dark"] .marketplace-home .brand-copy small{
    color:#85808c !important;
}

html[data-theme="dark"] .marketplace-home .market-links a{
    color:#bbb6c2 !important;
}

html[data-theme="dark"] .marketplace-home .market-links a:hover{
    background:#24232b !important;
    color:#fff !important;
}

html[data-theme="dark"] .marketplace-home .market-links a.active{
    background:#29243b !important;
    color:#ab9bff !important;
}


/* ===== SEARCH ===== */

html[data-theme="dark"] .marketplace-home .market-search{
    background:#1d1d24 !important;
    border:1px solid #303039 !important;
    box-shadow:none !important;
}

html[data-theme="dark"] .marketplace-home .market-search:focus-within{
    background:#222229 !important;
    border-color:#5b4b91 !important;
    box-shadow:0 0 0 3px rgba(120,95,255,.09) !important;
}

html[data-theme="dark"] .marketplace-home .market-search span{
    color:#96909d !important;
}

html[data-theme="dark"] .marketplace-home .market-search input{
    background:transparent !important;
    color:#f2f0f5 !important;
}

html[data-theme="dark"] .marketplace-home .market-search input::placeholder{
    color:#77727f !important;
}


/* ===== HEADER ACTIONS ===== */

html[data-theme="dark"] .marketplace-home .icon-action{
    background:#1f1f26 !important;
    border:1px solid #303039 !important;
    color:#eeeaf2 !important;
}

html[data-theme="dark"] .marketplace-home .icon-action:hover{
    background:#2a2737 !important;
    border-color:#423a5d !important;
}

html[data-theme="dark"] .marketplace-home .login-action{
    background:#29243b !important;
    border:1px solid #39314d !important;
    color:#b2a4ff !important;
}

html[data-theme="dark"] .marketplace-home .login-action:hover{
    background:#322b49 !important;
}


/* ===== CATALOG AREA ===== */

html[data-theme="dark"] .marketplace-home .market-catalog{
    background:transparent !important;
}

html[data-theme="dark"] .marketplace-home .section-head h2{
    color:#f6f4f8 !important;
}

html[data-theme="dark"] .marketplace-home .section-head p{
    color:#aaa5b1 !important;
}

html[data-theme="dark"] .marketplace-home .eyebrow{
    color:#9b87ff !important;
}


/* ===== CATEGORY BAR ===== */

html[data-theme="dark"] .marketplace-home .category-row{
    background:#19191f !important;
    border:1px solid #292932 !important;
    border-radius:18px !important;
    padding:8px !important;
    box-shadow:0 10px 28px rgba(0,0,0,.14) !important;
}

html[data-theme="dark"] .marketplace-home .category-chip{
    background:transparent !important;
    border-color:transparent !important;
    color:#aaa5b0 !important;
}

html[data-theme="dark"] .marketplace-home .category-chip:hover{
    background:#24242b !important;
    border-color:#24242b !important;
    color:#f5f3f7 !important;
}

html[data-theme="dark"] .marketplace-home .category-chip.active{
    background:linear-gradient(135deg,#735cff,#5a46df) !important;
    color:#fff !important;
    border-color:transparent !important;
    box-shadow:0 9px 22px rgba(81,59,210,.24) !important;
}

html[data-theme="dark"] .marketplace-home .market-sort{
    background:#222229 !important;
    border-color:#33333c !important;
    color:#f2eff5 !important;
}


/* ===== PRODUCT CARDS ===== */

html[data-theme="dark"] .marketplace-home .market-card{
    background:#19191f !important;
    border:1px solid #2b2b33 !important;
    box-shadow:0 3px 14px rgba(0,0,0,.20) !important;
}

html[data-theme="dark"] .marketplace-home .market-card:hover{
    border-color:#3d3850 !important;
    box-shadow:0 16px 42px rgba(0,0,0,.34) !important;
}


/* ===== CARD BODY ===== */

html[data-theme="dark"] .marketplace-home .market-card-body{
    background:#19191f !important;
}

html[data-theme="dark"] .marketplace-home .market-card-body h3,
html[data-theme="dark"] .marketplace-home .market-title-link{
    color:#f5f3f7 !important;
}

html[data-theme="dark"] .marketplace-home .market-card-body p{
    color:#9994a0 !important;
}


/* ===== TAGS ===== */

html[data-theme="dark"] .marketplace-home .market-tag-row span{
    background:#25252c !important;
    color:#b1acb8 !important;
}


/* ===== STOCK ===== */

html[data-theme="dark"] .marketplace-home .market-stock{
    color:#4fc783 !important;
}

html[data-theme="dark"] .marketplace-home .market-stock.empty{
    color:#e16c80 !important;
}


/* ===== CARD FOOTER ===== */

html[data-theme="dark"] .marketplace-home .market-card-footer{
    background:#19191f !important;
    border-top:1px solid #2d2d35 !important;
}

html[data-theme="dark"] .marketplace-home .market-price strong{
    color:#f7f5f8 !important;
}

html[data-theme="dark"] .marketplace-home .market-price del{
    color:#77727e !important;
}


/* ===== BUTTONS ===== */

html[data-theme="dark"] .marketplace-home .market-btn.primary{
    background:linear-gradient(135deg,#745cff,#5945df) !important;
    color:#fff !important;
    border-color:transparent !important;
}

html[data-theme="dark"] .marketplace-home .market-btn.secondary{
    background:#23232a !important;
    border-color:#3a3942 !important;
    color:#eeeaf2 !important;
}

html[data-theme="dark"] .marketplace-home .market-btn.secondary:hover{
    background:#2b2a32 !important;
}

html[data-theme="dark"] .marketplace-home .market-btn.pale{
    background:#29243a !important;
    color:#ad9dff !important;
}


/* ===== HEART / DISCOUNT ===== */

html[data-theme="dark"] .marketplace-home .market-heart{
    background:#202027 !important;
    color:#f1eef4 !important;
    border:1px solid #37363f !important;
    box-shadow:0 5px 16px rgba(0,0,0,.25) !important;
}

html[data-theme="dark"] .marketplace-home .market-heart.on{
    background:#312a47 !important;
    color:#b39fff !important;
}

html[data-theme="dark"] .marketplace-home .discount-badge{
    background:#202027 !important;
    color:#b09fff !important;
    border:1px solid #383641 !important;
    box-shadow:0 5px 16px rgba(0,0,0,.22) !important;
}


/* ===== FALLBACK COVER ===== */

html[data-theme="dark"] .marketplace-home .market-fallback{
    background:linear-gradient(145deg,#25232d,#1b1b22) !important;
}

html[data-theme="dark"] .marketplace-home .market-fallback b{
    color:#8e80d8 !important;
}


/* ===== FOOTER ===== */

html[data-theme="dark"] .marketplace-home .footer{
    background:#141419 !important;
    border-color:#292831 !important;
    color:#918c98 !important;
}


/* ===== MAIN POPUP ===== */

html[data-theme="dark"] .amateo15-promo{
    background:rgba(28,28,35,.97) !important;
    border-color:#383741 !important;
}

html[data-theme="dark"] .amateo15-text strong{
    color:#f5f3f7 !important;
}

html[data-theme="dark"] .amateo15-text span,
html[data-theme="dark"] .amateo15-text small{
    color:#aaa5b0 !important;
}


/* ===== IMPORTANT OVERRIDES FROM OLD LIGHT RULES ===== */

html[data-theme="dark"] .marketplace-home .market-card *,
html[data-theme="dark"] .marketplace-home .section-head *{
    text-shadow:none !important;
}

html[data-theme="dark"] .marketplace-home .market-card-body h3 a{
    opacity:1 !important;
}


/* =========================================================
   DARK THEME — HOW TO BUY SECTION FIX
   ========================================================= */

html[data-theme="dark"] .amateo-howto-theme-fix{
    background:#141419 !important;
    color:#f4f2f7 !important;
    border-color:#292831 !important;
}

html[data-theme="dark"] .amateo-howto-theme-fix h1,
html[data-theme="dark"] .amateo-howto-theme-fix h2,
html[data-theme="dark"] .amateo-howto-theme-fix h3,
html[data-theme="dark"] .amateo-howto-theme-fix h4,
html[data-theme="dark"] .amateo-howto-theme-fix strong{
    color:#f5f3f7 !important;
}

html[data-theme="dark"] .amateo-howto-theme-fix p,
html[data-theme="dark"] .amateo-howto-theme-fix span,
html[data-theme="dark"] .amateo-howto-theme-fix small{
    color:#aaa5b1 !important;
}

html[data-theme="dark"] .amateo-howto-theme-fix > *,
html[data-theme="dark"] .amateo-howto-theme-fix div{
    border-color:#303039 !important;
}

html[data-theme="dark"] .amateo-howto-theme-fix [class*="step"],
html[data-theme="dark"] .amateo-howto-theme-fix [class*="item"]{
    background:transparent !important;
}

html[data-theme="dark"] .amateo-howto-theme-fix [class*="number"],
html[data-theme="dark"] .amateo-howto-theme-fix [class*="num"]{
    color:#9b87ff !important;
}


/* =========================================================
   DARK THEME — CART PANEL FIX
   ========================================================= */

html[data-theme="dark"] .cart-panel,
html[data-theme="dark"] .cart-drawer,
html[data-theme="dark"] .cart-modal,
html[data-theme="dark"] .cart-sheet,
html[data-theme="dark"] .market-cart,
html[data-theme="dark"] .cart-content,
html[data-theme="dark"] [class*="cart-panel"],
html[data-theme="dark"] [class*="cart-drawer"]{
    background:#17171d !important;
    color:#f4f2f7 !important;
    border-color:#303039 !important;
    box-shadow:-18px 0 55px rgba(0,0,0,.34) !important;
}


/* CART HEADER */

html[data-theme="dark"] .cart-panel h1,
html[data-theme="dark"] .cart-panel h2,
html[data-theme="dark"] .cart-panel h3,
html[data-theme="dark"] .cart-drawer h1,
html[data-theme="dark"] .cart-drawer h2,
html[data-theme="dark"] .cart-drawer h3{
    color:#f5f3f7 !important;
}


/* CART ITEMS */

html[data-theme="dark"] .cart-item,
html[data-theme="dark"] .cart-row,
html[data-theme="dark"] .cart-product,
html[data-theme="dark"] [class*="cart-item"]{
    background:#202027 !important;
    border-color:#303039 !important;
    color:#f2f0f5 !important;
}

html[data-theme="dark"] .cart-item strong,
html[data-theme="dark"] .cart-row strong,
html[data-theme="dark"] .cart-product strong{
    color:#f4f2f7 !important;
}

html[data-theme="dark"] .cart-item small,
html[data-theme="dark"] .cart-row small,
html[data-theme="dark"] .cart-product small{
    color:#aaa5b0 !important;
}


/* QUANTITY BUTTONS */

html[data-theme="dark"] .cart-panel button,
html[data-theme="dark"] .cart-drawer button{
    border-color:#3a3942 !important;
}

html[data-theme="dark"] .qty-btn,
html[data-theme="dark"] .cart-qty button,
html[data-theme="dark"] [class*="quantity"] button{
    background:#25252c !important;
    color:#f5f3f7 !important;
    border-color:#3a3942 !important;
}


/* TOTAL */

html[data-theme="dark"] .cart-total,
html[data-theme="dark"] .cart-summary,
html[data-theme="dark"] [class*="cart-total"]{
    color:#f5f3f7 !important;
    border-color:#303039 !important;
}

html[data-theme="dark"] .cart-total strong,
html[data-theme="dark"] .cart-summary strong{
    color:#fff !important;
}


/* INPUTS */

html[data-theme="dark"] .cart-panel input,
html[data-theme="dark"] .cart-drawer input,
html[data-theme="dark"] .cart-panel textarea,
html[data-theme="dark"] .cart-drawer textarea{
    background:#202027 !important;
    color:#f4f2f7 !important;
    border-color:#383741 !important;
}

html[data-theme="dark"] .cart-panel input::placeholder,
html[data-theme="dark"] .cart-drawer input::placeholder{
    color:#827d88 !important;
}


/* PROMO CHECK BUTTON */

html[data-theme="dark"] .cart-panel .promo-check,
html[data-theme="dark"] .cart-drawer .promo-check,
html[data-theme="dark"] .cart-panel button[type="button"]:not(.market-btn):not(.buy-now-btn){
    background:#25252c !important;
    color:#f4f2f7 !important;
}


/* PAY BUTTON */

html[data-theme="dark"] .cart-panel .checkout-btn,
html[data-theme="dark"] .cart-panel .pay-btn,
html[data-theme="dark"] .cart-drawer .checkout-btn,
html[data-theme="dark"] .cart-drawer .pay-btn{
    background:linear-gradient(135deg,#745cff,#5a46df) !important;
    color:#fff !important;
    border-color:transparent !important;
}


/* FOOTNOTE */

html[data-theme="dark"] .cart-panel p,
html[data-theme="dark"] .cart-panel small,
html[data-theme="dark"] .cart-drawer p,
html[data-theme="dark"] .cart-drawer small{
    color:#aaa5b0 !important;
}


/* DIVIDERS */

html[data-theme="dark"] .cart-panel hr,
html[data-theme="dark"] .cart-drawer hr{
    border-color:#303039 !important;
}


/* CLOSE BUTTON */

html[data-theme="dark"] .cart-close,
html[data-theme="dark"] [class*="cart-close"]{
    background:#25252c !important;
    color:#f5f3f7 !important;
    border-color:#3b3a43 !important;
}


/* =========================================================
   CART POSITION FIX — KEEP BELOW HEADER
   ========================================================= */

.cart-panel,
.cart-drawer,
.cart-sheet,
.market-cart,
[class*="cart-drawer"],
[class*="cart-panel"]{
    top:68px !important;
    height:calc(100vh - 68px) !important;
    height:calc(100dvh - 68px) !important;
    max-height:calc(100vh - 68px) !important;
    max-height:calc(100dvh - 68px) !important;
}


/* Содержимое корзины прокручивается внутри панели */

.cart-panel,
.cart-drawer,
.cart-sheet,
.market-cart{
    overflow-y:auto !important;
    overscroll-behavior:contain;
}


/* Шапка магазина всегда выше корзины */

.market-header,
.site-header,
.topbar,
header{
    position:relative;
    z-index:10001 !important;
}


/* Корзина ниже шапки */

.cart-panel,
.cart-drawer,
.cart-sheet,
.market-cart,
[class*="cart-drawer"],
[class*="cart-panel"]{
    z-index:10000 !important;
}


/* Если затемнение страницы тоже начинается сверху —
   оставляем шапку открытой */

.cart-overlay,
.cart-backdrop,
[class*="cart-overlay"],
[class*="cart-backdrop"]{
    top:68px !important;
    height:calc(100vh - 68px) !important;
    height:calc(100dvh - 68px) !important;
}


/* MOBILE */

@media(max-width:700px){

    .cart-panel,
    .cart-drawer,
    .cart-sheet,
    .market-cart,
    [class*="cart-drawer"],
    [class*="cart-panel"]{
        top:68px !important;
        height:calc(100dvh - 68px) !important;
        max-height:calc(100dvh - 68px) !important;
    }

}


/* =========================================================
   DARK THEME — CART QUANTITY CONTROLS
   ========================================================= */

/* контейнер управления количеством */
html[data-theme="dark"] .cart-qty,
html[data-theme="dark"] .quantity-controls,
html[data-theme="dark"] [class*="cart-qty"],
html[data-theme="dark"] [class*="quantity-controls"]{
    display:flex !important;
    align-items:center !important;
    gap:7px !important;
}


/* кнопки минус / плюс / удалить */
html[data-theme="dark"] .cart-qty button,
html[data-theme="dark"] .quantity-controls button,
html[data-theme="dark"] [class*="cart-qty"] button,
html[data-theme="dark"] [class*="quantity-controls"] button{
    width:30px !important;
    min-width:30px !important;
    height:30px !important;
    min-height:30px !important;

    padding:0 !important;

    display:grid !important;
    place-items:center !important;

    border:1px solid #3a3943 !important;
    border-radius:9px !important;

    background:#27272f !important;
    color:#f4f2f7 !important;

    font-size:16px !important;
    font-weight:800 !important;
    line-height:1 !important;

    box-shadow:none !important;
}

html[data-theme="dark"] .cart-qty button:hover,
html[data-theme="dark"] .quantity-controls button:hover,
html[data-theme="dark"] [class*="cart-qty"] button:hover,
html[data-theme="dark"] [class*="quantity-controls"] button:hover{
    background:#32313b !important;
    border-color:#51496a !important;
    color:#b9aaff !important;
}


/* число между кнопками */
html[data-theme="dark"] .cart-qty input,
html[data-theme="dark"] .quantity-controls input,
html[data-theme="dark"] [class*="cart-qty"] input,
html[data-theme="dark"] [class*="quantity-controls"] input{
    width:30px !important;
    min-width:30px !important;
    height:30px !important;

    padding:0 !important;

    border:0 !important;
    outline:0 !important;

    background:transparent !important;
    color:#f5f3f7 !important;

    text-align:center !important;
    font-size:13px !important;
    font-weight:900 !important;

    box-shadow:none !important;
}


/* если количество отображается обычным span */
html[data-theme="dark"] .cart-qty span,
html[data-theme="dark"] .quantity-controls span{
    min-width:20px;
    text-align:center;
    color:#f5f3f7 !important;
    font-size:13px;
    font-weight:900;
}


/* отдельная кнопка удаления */
html[data-theme="dark"] .cart-remove,
html[data-theme="dark"] .remove-item,
html[data-theme="dark"] [class*="cart-remove"],
html[data-theme="dark"] [class*="remove-item"]{
    background:#2b2228 !important;
    border-color:#493038 !important;
    color:#e98591 !important;
}

html[data-theme="dark"] .cart-remove:hover,
html[data-theme="dark"] .remove-item:hover,
html[data-theme="dark"] [class*="cart-remove"]:hover,
html[data-theme="dark"] [class*="remove-item"]:hover{
    background:#3a252c !important;
    color:#ff9ca8 !important;
}


/* светлая тема — тоже чуть аккуратнее */
html[data-theme="light"] .cart-qty button,
html[data-theme="light"] .quantity-controls button,
html[data-theme="light"] [class*="cart-qty"] button,
html[data-theme="light"] [class*="quantity-controls"] button{
    width:30px !important;
    min-width:30px !important;
    height:30px !important;
    min-height:30px !important;

    padding:0 !important;

    display:grid !important;
    place-items:center !important;

    border:1px solid #dfdbe5 !important;
    border-radius:9px !important;

    background:#f8f7fb !important;
    color:#39333f !important;

    font-size:16px !important;
    font-weight:800 !important;

    box-shadow:none !important;
}

html[data-theme="light"] .cart-qty input,
html[data-theme="light"] .quantity-controls input,
html[data-theme="light"] [class*="cart-qty"] input,
html[data-theme="light"] [class*="quantity-controls"] input{
    width:30px !important;
    height:30px !important;
    padding:0 !important;
    border:0 !important;
    background:transparent !important;
    text-align:center !important;
    font-weight:900 !important;
    box-shadow:none !important;
}


/* =========================================================
   CART REAL QTY CONTROLS FIX
   ========================================================= */

html[data-theme="dark"] .cart-item .qty{
    display:flex !important;
    align-items:center !important;
    gap:6px !important;
}

html[data-theme="dark"] .cart-item .qty button{
    width:28px !important;
    min-width:28px !important;
    height:28px !important;
    min-height:28px !important;

    padding:0 !important;

    display:flex !important;
    align-items:center !important;
    justify-content:center !important;

    background:#292930 !important;
    color:#f5f3f7 !important;

    border:1px solid #3d3c46 !important;
    border-radius:8px !important;

    font-family:Arial,sans-serif !important;
    font-size:17px !important;
    font-weight:700 !important;
    line-height:1 !important;

    opacity:1 !important;
    visibility:visible !important;

    box-shadow:none !important;
    text-indent:0 !important;
}

html[data-theme="dark"] .cart-item .qty button:hover{
    background:#34333d !important;
    border-color:#62577e !important;
    color:#bbaeff !important;
}

/* число количества */

html[data-theme="dark"] .cart-item .qty b{
    min-width:14px !important;

    display:inline-block !important;

    color:#f5f3f7 !important;

    text-align:center !important;
    font-size:13px !important;
    font-weight:900 !important;

    opacity:1 !important;
}

/* последняя кнопка — удалить */

html[data-theme="dark"] .cart-item .qty button:last-child{
    margin-left:2px !important;

    background:#312329 !important;
    border-color:#50343d !important;
    color:#ee8b98 !important;
}

html[data-theme="dark"] .cart-item .qty button:last-child:hover{
    background:#42282f !important;
    border-color:#70424d !important;
    color:#ffacb6 !important;
}


/* LIGHT THEME */

html[data-theme="light"] .cart-item .qty{
    display:flex !important;
    align-items:center !important;
    gap:6px !important;
}

html[data-theme="light"] .cart-item .qty button{
    width:28px !important;
    min-width:28px !important;
    height:28px !important;
    min-height:28px !important;

    padding:0 !important;

    display:flex !important;
    align-items:center !important;
    justify-content:center !important;

    background:#f7f6fa !important;
    color:#332e39 !important;

    border:1px solid #dedbe4 !important;
    border-radius:8px !important;

    font-size:17px !important;
    font-weight:700 !important;
    line-height:1 !important;

    opacity:1 !important;
    visibility:visible !important;

    box-shadow:none !important;
}

html[data-theme="light"] .cart-item .qty b{
    min-width:14px !important;
    color:#27222d !important;
    text-align:center !important;
    font-size:13px !important;
    font-weight:900 !important;
}

html[data-theme="light"] .cart-item .qty button:last-child{
    background:#fff3f4 !important;
    border-color:#f0d9dd !important;
    color:#c85161 !important;
}



/* =========================================================
   AMATEO CHECKOUT DARK V1
   /buy/<slug>
   ========================================================= */

html[data-theme="dark"] .checkout-page{
    background:#101014 !important;
    color:#f4f2f7 !important;
}


/* HEADER */

html[data-theme="dark"] .checkout-page .market-header{
    background:#15151b !important;
    border-bottom-color:#2d2c35 !important;
}

html[data-theme="dark"] .checkout-page .market-brand,
html[data-theme="dark"] .checkout-page .checkout-back{
    color:#f4f2f7 !important;
}

html[data-theme="dark"] .checkout-page .brand-copy small{
    color:#96919f !important;
}


/* MAIN CARDS */

html[data-theme="dark"] .checkout-product-card,
html[data-theme="dark"] .checkout-summary{
    background:#19191f !important;
    border-color:#303039 !important;
    color:#f4f2f7 !important;
    box-shadow:
        0 18px 50px rgba(0,0,0,.24) !important;
}


/* PRODUCT */

html[data-theme="dark"] .checkout-product-info{
    background:#19191f !important;
}

html[data-theme="dark"] .checkout-kicker{
    color:#9d89ff !important;
}

html[data-theme="dark"] .checkout-product-info h1{
    color:#f5f3f8 !important;
}

html[data-theme="dark"] .checkout-product-info p{
    color:#aaa5b2 !important;
}


/* CHIPS */

html[data-theme="dark"] .checkout-chips span{
    background:#24232c !important;
    color:#d8d4df !important;
    border:1px solid #34323d !important;
}


/* SUMMARY */

html[data-theme="dark"] .checkout-summary-head{
    border-bottom-color:#32313a !important;
}

html[data-theme="dark"] .checkout-summary-head > span{
    color:#aaa5b2 !important;
}

html[data-theme="dark"] .checkout-price strong{
    color:#f5f3f8 !important;
}

html[data-theme="dark"] .checkout-price del{
    color:#77727f !important;
}


/* STOCK */

html[data-theme="dark"] .checkout-stock.ok{
    color:#55d58f !important;
}

html[data-theme="dark"] .checkout-stock.bad{
    color:#ff8295 !important;
}


/* FORM LABELS */

html[data-theme="dark"] .checkout-form label{
    color:#d8d4df !important;
}

html[data-theme="dark"] .checkout-form label span{
    color:#77727f !important;
}


/* INPUTS */

html[data-theme="dark"] .checkout-form input{
    background:#222129 !important;
    border-color:#383640 !important;
    color:#f5f3f8 !important;
}

html[data-theme="dark"] .checkout-form input::placeholder{
    color:#7f7a87 !important;
}

html[data-theme="dark"] .checkout-form input:focus{
    border-color:#715cff !important;
    box-shadow:
        0 0 0 3px rgba(113,92,255,.12) !important;
}


/* PROMO BUTTON */

html[data-theme="dark"] .checkout-promo .btn{
    background:#292830 !important;
    border-color:#3c3a45 !important;
    color:#f4f2f7 !important;
}

html[data-theme="dark"] .checkout-promo .btn:hover{
    background:#313039 !important;
}


/* PAYMENT BUTTON */

html[data-theme="dark"] .checkout-pay-btn{
    background:
        linear-gradient(
            135deg,
            #735cff,
            #5947e4
        ) !important;

    color:#fff !important;
    border:0 !important;

    box-shadow:
        0 10px 28px rgba(93,75,228,.22) !important;
}


/* SAFE PAYMENT */

html[data-theme="dark"] .checkout-safe{
    background:#1d2723 !important;
    border:1px solid #293a32 !important;
}

html[data-theme="dark"] .checkout-safe > span{
    color:#58d894 !important;
}

html[data-theme="dark"] .checkout-safe b{
    color:#e8f3ed !important;
}

html[data-theme="dark"] .checkout-safe small{
    color:#929e97 !important;
}


/* PROMO RESULT */

html[data-theme="dark"] .promo-note{
    color:#aaa5b2 !important;
}


/* COVER PLACEHOLDER */

html[data-theme="dark"] .checkout-cover{
    background:#202027 !important;
}


/* /AMATEO CHECKOUT DARK V1 */



/* =========================================================
   AMATEO PRODUCT HEART DARK V1
   Product page favorite button
   ========================================================= */

/* DARK THEME */

html[data-theme="dark"] .product-market-page .pm-heart{
    display:grid !important;
    place-items:center !important;

    width:42px !important;
    height:42px !important;

    padding:0 !important;

    border:1px solid rgba(255,255,255,.14) !important;
    border-radius:50% !important;

    background:rgba(20,20,27,.82) !important;
    color:#fff !important;

    font-family:
        Arial,
        "Segoe UI Symbol",
        sans-serif !important;

    font-size:22px !important;
    line-height:1 !important;

    cursor:pointer !important;

    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);

    box-shadow:
        0 5px 18px rgba(0,0,0,.28) !important;

    transition:
        transform .18s ease,
        background .18s ease,
        border-color .18s ease,
        box-shadow .18s ease !important;
}


html[data-theme="dark"] .product-market-page .pm-heart:hover{
    transform:scale(1.08);

    background:rgba(31,30,40,.94) !important;

    border-color:
        rgba(255,255,255,.24) !important;

    box-shadow:
        0 7px 22px rgba(0,0,0,.34) !important;
}


/* ADDED TO FAVORITES */

html[data-theme="dark"] .product-market-page .pm-heart.on{
    background:#6d55f5 !important;
    border-color:#806cff !important;
    color:#fff !important;

    box-shadow:
        0 7px 22px rgba(109,85,245,.32) !important;
}


/* LIGHT THEME */

html[data-theme="light"] .product-market-page .pm-heart{
    display:grid !important;
    place-items:center !important;

    padding:0 !important;

    color:#272432 !important;

    border:
        1px solid rgba(32,28,45,.08) !important;

    background:
        rgba(255,255,255,.94) !important;

    cursor:pointer !important;

    transition:
        transform .18s ease,
        background .18s ease,
        color .18s ease !important;
}


html[data-theme="light"] .product-market-page .pm-heart:hover{
    transform:scale(1.08);

    background:#f3f0ff !important;
    color:#6652ef !important;
}


html[data-theme="light"] .product-market-page .pm-heart.on{
    background:#6d55f5 !important;
    border-color:#6d55f5 !important;
    color:#fff !important;
}


/* /AMATEO PRODUCT HEART DARK V1 */



/* =========================================================
   AMATEO HOME HOW DARK FIX V1
   Главная / → секция "Как купить"
   ========================================================= */

html[data-theme="dark"]
.marketplace-home .soft-how{
    background:#111116 !important;
    color:#f4f2f7 !important;

    border-top:
        1px solid rgba(255,255,255,.04) !important;

    border-bottom:
        1px solid rgba(255,255,255,.04) !important;
}


/* Заголовок */

html[data-theme="dark"]
.marketplace-home .soft-how .eyebrow{
    color:#917cff !important;
}


html[data-theme="dark"]
.marketplace-home .soft-how h2{
    color:#f5f3f8 !important;
}


html[data-theme="dark"]
.marketplace-home .soft-how .soft-section-head p{
    color:#9a95a3 !important;
}


/* Шаги */

html[data-theme="dark"]
.marketplace-home .soft-how .soft-steps article{
    background:transparent !important;

    border-top:
        1px solid #32313a !important;

    color:#f3f1f6 !important;

    box-shadow:none !important;
}


html[data-theme="dark"]
.marketplace-home .soft-how .soft-steps span{
    color:#8f7bff !important;
}


html[data-theme="dark"]
.marketplace-home .soft-how .soft-steps b{
    color:#f4f2f7 !important;
}


html[data-theme="dark"]
.marketplace-home .soft-how .soft-steps p{
    color:#9994a2 !important;
}


/* Убираем возможные светлые наследуемые слои */

html[data-theme="dark"]
.marketplace-home #how,
html[data-theme="dark"]
.marketplace-home #how .shell,
html[data-theme="dark"]
.marketplace-home #how .reveal{
    color:#f4f2f7 !important;
}


/* /AMATEO HOME HOW DARK FIX V1 */

