/* Amerce family — platform glue (anything that is not the template's own CSS). */

/* Top bar background follows "Top Bar Background" in Appearance → Colors */
.am-topbar.bg-dark { background-color: var(--am-topbar, #000) !important; }
.am-topbar a { color: inherit; }

/* Logo: theme_logo_html() wraps an <img>; keep the template's 150×30 box */
.tf-header .logo-site img, .tf-footer .logo-site img { max-height: 40px; width: auto; }

/* Live search results inside the search popup */
.am-search-results { list-style: none; padding: 0; margin: 16px 0 0; max-height: 50vh; overflow: auto; }
.am-search-results li { border-bottom: 1px solid var(--line); }
.am-search-results li:last-child { border-bottom: 0; }
.am-search-empty { padding: 12px 0; color: var(--text-2); }

/* Cart drawer quantity control (the template's drawer only had "Remove") */
.am-qty { display: inline-flex; margin-top: 6px; }
.am-qty .btn-quantity { background: none; border: 0; width: 28px; }
.am-qty input { width: 32px; text-align: center; border: 0; background: transparent; }

/* Newsletter feedback */
.am-nl-msg[data-type="error"] { color: var(--critical); }
.am-nl-msg[data-type="success"] { color: var(--success); }

/* Payment badges come from the footer widget area: lay them out like the template's list */
.am-payments, .am-payments ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; align-items: center; }
.am-payments img { height: 24px; width: auto; }

/* the platform's footer-style.css colours any .footer-heading blue */
.tf-footer .footer-heading { color: var(--text) !important; }

/* Shop listing */
.am-price { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.am-price input { width: 90px; height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; }
.am-shop-empty { grid-column: 1 / -1; padding: 60px 0; }
.am-sort { position: relative; }
.am-sort .dropdown-menu.show { display: block; position: absolute; inset-inline-end: 0; top: 100%; }

/* ---- Product page ---------------------------------------------------------------------------------
   The core variant script needs ul.size-lists > li (active / disabled classes); styled here like Amerce's
   .size-btn (rounded boxes) and .color-btn (round swatches). */
.tf-product-variant .size-lists { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.tf-product-variant .am-size-list li {
    min-width: 48px; height: 48px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 99px; cursor: pointer; font-weight: 500; transition: all .2s;
}
.tf-product-variant .am-size-list li:hover { border-color: var(--text); }
.tf-product-variant .am-size-list li.active { background: var(--text); border-color: var(--text); color: #fff; }
.tf-product-variant .am-color-list li {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); padding: 3px; cursor: pointer; position: relative;
}
.tf-product-variant .am-color-list li .am-swatch { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--am-swatch); border: 1px solid rgba(0,0,0,.08); }
.tf-product-variant .am-color-list li.active { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.tf-product-variant .size-lists li.disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.tf-product-variant .variant-picker-label input.value-size { border: 0; background: transparent; padding: 0; width: auto; max-width: 160px; font-weight: 600; color: var(--text); }
.tf-product-variant .variant-picker-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
/* the shared size-guide partial adds its own link; the sizes row already shows one */
.variant-size ~ .am-size-guide-holder .ec-size-guide-link { display: none; }
.am-spec-table { width: 100%; border-collapse: collapse; }
.am-spec-table th, .am-spec-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; }
.am-spec-table th { width: 40%; color: var(--text-2); font-weight: 500; }
.am-star-off { opacity: .25; }
.tf-product-total-quantity #item_left { display: block; margin-top: 8px; }

/* one-photo product: the thumbs slider exists for zoom.js but is not shown */
.tf-product-media-thumbs.am-thumbs-hidden { display: none !important; }
.product-thumbs-slider:has(.am-thumbs-hidden) .flat-wrap-media-product { width: 100%; }

/* product quantity: a real number input (the core script reads #quantity) dressed like Amerce's */
.tf-product-total-quantity .wg-quantity input.quantity-input { border: 0; background: transparent; width: 44px; text-align: center; font-weight: 600; -moz-appearance: textfield; }
.tf-product-total-quantity .wg-quantity input.quantity-input::-webkit-outer-spin-button,
.tf-product-total-quantity .wg-quantity input.quantity-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Cart page */
.tf-table-page-cart input.am-cart-qty-input { border: 0; background: transparent; width: 44px; text-align: center; font-weight: 600; -moz-appearance: textfield; }
.tf-table-page-cart input.am-cart-qty-input::-webkit-outer-spin-button, .tf-table-page-cart input.am-cart-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.am-empty { max-width: 520px; margin: 0 auto; }
.am-empty .shop-empty_bot { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
#ar-coupon-msg .text-danger, #ar-coupon-msg .text-success { font-size: 14px; }

/* ---- Checkout -------------------------------------------------------------------------------------
   The checkout views are the Ecomus family's (all logic: tax, cities, shipping AJAX, coupon, gateways,
   WhatsApp); this layer gives their markup Amerce's look. */
.am-checkout .tf-page-cart-wrap.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 48px; align-items: start; }
@media (max-width: 991px) { .am-checkout .tf-page-cart-wrap.layout-2 { grid-template-columns: 1fr; gap: 32px; } }
.am-checkout h5, .am-checkout .title { font-weight: 600; }
.am-checkout fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.am-checkout fieldset label, .am-checkout .form-group > label { display: block; font-weight: 500; margin-bottom: 8px; color: var(--text); }
.am-checkout input[type=text], .am-checkout input[type=email], .am-checkout input[type=tel], .am-checkout input[type=number],
.am-checkout input[type=password], .am-checkout select, .am-checkout textarea {
    width: 100%; height: 50px; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; background: #fff; color: var(--text); font-size: 15px;
}
.am-checkout textarea { height: auto; min-height: 110px; padding: 14px 16px; }
.am-checkout input:focus, .am-checkout select:focus, .am-checkout textarea:focus { border-color: var(--text); outline: none; }
.am-checkout .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 575px) { .am-checkout .grid-2 { grid-template-columns: 1fr; } }
.am-checkout .widget-wrap-checkout { background: var(--bg); border-radius: 20px; padding: 28px; position: sticky; top: 110px; }
.am-checkout .wrap-checkout-product { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.am-checkout .wrap-checkout-product .img-product { position: relative; flex: none; }
.am-checkout .wrap-checkout-product .img-product img { width: 68px; height: 68px; object-fit: cover; border-radius: 10px; }
.am-checkout .wrap-checkout-product .quantity {
    position: absolute; top: -6px; inset-inline-end: -6px; min-width: 20px; height: 20px; border-radius: 99px; background: var(--text); color: #fff;
    font-size: 12px; display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.am-checkout .wrap-checkout-product .content { flex: 1; min-width: 0; }
.am-checkout .wrap-checkout-product .name { font-weight: 500; display: block; }
.am-checkout .wrap-checkout-product .variant { font-size: 13px; color: var(--text-2); }
.am-checkout .tf-cart-totals-discounts { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.am-checkout .tf-page-cart-checkout-totals .price-total, .am-checkout .tf-cart-totals-discounts.price-total { font-size: 20px; font-weight: 700; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; }
.am-checkout .ip-discount-code { display: flex; gap: 10px; margin-bottom: 18px; }
.am-checkout .ip-discount-code input { flex: 1; }
.am-checkout .ec-payment-radios ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.am-checkout .ec-payment-radios ul > li { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; cursor: pointer; }
.am-checkout .ec-payment-radios ul > li.selected { border-color: var(--text); }
.am-checkout .fieldset-radio { display: flex; align-items: center; gap: 10px; }
.am-checkout .fieldset-radio label { margin: 0; font-weight: 500; cursor: pointer; }
.am-checkout .tf-check { width: 20px; height: 20px; min-width: 20px; border-radius: 50%; border: 1px solid var(--line); -webkit-appearance: none; appearance: none; position: relative; cursor: pointer; background: #fff; }
.am-checkout .tf-check:checked { background: var(--primary); border-color: var(--primary); }
.am-checkout .tf-check:checked::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.am-checkout .agree-wrap { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.am-checkout .proceed_checkout_btn, .am-checkout .tf-btn.w-100 { width: 100%; justify-content: center; }
.am-checkout .tf-btn.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--text); }
.am-checkout .sign-in .tf-field { margin-bottom: 14px; }
/* payment choices: the platform's tile layout gives each li a fixed size and a corner badge — full-width rows instead */
.am-checkout .ec-payment-radios ul > li { width: 100% !important; height: auto !important; min-height: 0 !important; display: flex; align-items: center; }
.am-checkout .ec-payment-radios ul > li::before, .am-checkout .ec-payment-radios ul > li::after { content: none !important; display: none !important; }
.am-checkout .ec-payment-radios ul > li img { display: none; }
/* breathing room between checkout fields */
.am-checkout .box, .am-checkout .form-group, .am-checkout .grid-2 > div { margin-bottom: 18px; }
.am-checkout .grid-2 > div { margin-bottom: 0; }
.am-checkout .grid-2 { margin-bottom: 18px; }
.am-checkout label { display: inline-block; margin-bottom: 8px; font-weight: 500; }
.am-checkout .ec-payment-radios ul > li { max-width: none !important; }

/* ---- Pages built on the Ecomus-family markup (login / register / account / track order / contact forms) ---- */
/* floating-label fields (.tf-field: input then label) → label above, Amerce-style input */
.tf-field { display: flex; flex-direction: column-reverse; gap: 8px; margin-bottom: 18px; position: relative; }
.tf-field .tf-field-label { position: static !important; transform: none !important; font-weight: 500; color: var(--text); background: none; padding: 0; }
.tf-field .tf-field-input, .tf-field input, .single-input .form--control, .order-track-contents-form .form--control {
    width: 100%; height: 50px; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; background: #fff; color: var(--text);
}
.tf-field input:focus, .single-input .form--control:focus { border-color: var(--text); outline: none; }
.single-input .label-title { display: block; font-weight: 500; margin-bottom: 8px; }
/* track order */
.order-track-wrapper { max-width: 560px; margin: 0 auto; background: var(--bg); border-radius: 20px; padding: 32px; }
.order-track-contents-title { font-size: 28px; font-weight: 600; }
.order-track-contents-para { color: var(--text-2); line-height: 1.9; }
.order-track-contents-form .btn-submit { width: 100%; height: 50px; border: 0; border-radius: 99px; background: var(--text); color: #fff; font-weight: 600; }

/* Section spacing from the page builder, scaled like the template's .flat-spacing (80 → 60 → 40) */
.am-section { padding-top: var(--am-pt, 0); padding-bottom: var(--am-pb, 0); }
@media (max-width: 991px) { .am-section { padding-top: calc(var(--am-pt, 0px) * .75); padding-bottom: calc(var(--am-pb, 0px) * .75); } }
@media (max-width: 425px) { .am-section { padding-top: calc(var(--am-pt, 0px) * .5); padding-bottom: calc(var(--am-pb, 0px) * .5); } }

/* Inner pages (about / contact / faq) */
.am-contact-gap { padding-top: 60px; }
@media (max-width: 767px) { .am-contact-gap { padding-top: 40px; } }
.am-field { display: grid; gap: 8px; margin-bottom: 20px; }
.am-field input, .am-field textarea { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 8px; padding: 0 16px; background: #fff; color: var(--text); }
.am-field textarea { height: 140px; padding: 12px 16px; resize: vertical; }
.am-field input:focus, .am-field textarea:focus { border-color: var(--text); outline: none; }
.section-main-about .box-why .h1, .section-main-about .box-why .title { color: var(--text); }
.am-about-figures { margin-top: 80px; padding-top: 80px; }
@media (max-width: 991px) { .am-about-figures { margin-top: 48px; padding-top: 48px; } }
.am-about-hero img { width: 100%; height: auto; border-radius: 16px; aspect-ratio: 1410 / 600; object-fit: cover; }

/* Toast notifications
   ------------------------------------------------------------------------
   The bundled toastr.css is a trimmed copy: it ships the status icons but not
   the background colours, so every notification rendered as pale text on a
   near-white box — the "add to cart" message looked empty. Give each status
   its own colour, and keep it legible in RTL. */
#toast-container > div {
    opacity: 1;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    line-height: 1.6;
}

#toast-container > .toast-success { background-color: #31a56d; }
#toast-container > .toast-error   { background-color: #db1215; }
#toast-container > .toast-warning { background-color: #d97706; }
#toast-container > .toast-info    { background-color: #2563eb; }

#toast-container > div .toast-title,
#toast-container > div .toast-message {
    color: #fff;
}

#toast-container > div .toast-close-button {
    color: #fff;
    opacity: 0.9;
    text-shadow: none;
}

/* The icon sits on the padded side; in RTL that has to be the right. */
[dir="rtl"] #toast-container > div {
    padding: 15px 50px 15px 15px;
    background-position: right 15px center;
    text-align: right;
}

/* Header logo: the template's wordmark is 150×30; shop logos are usually squarer, so size by width like the demo */
.logo-site img { max-height: 60px !important; max-width: 160px; width: auto; height: auto; }
@media (max-width: 1199px) { .logo-site img { max-height: 46px !important; max-width: 130px; } }

/* Shop sidebar — shop-left-sidebar.html look */
@media (min-width: 1200px) { .am-filters .canvas-body { overflow: visible !important; max-height: none !important; } }
.am-filters .am-cat-label { display: flex; gap: 6px; cursor: pointer; margin: 0; }
.am-filters .am-cat:checked + .am-cat-label { font-weight: 600; color: var(--primary); }
.am-filters .am-cat:checked + .am-cat-label .cate-text { text-decoration: underline; text-underline-offset: 4px; }
.am-range { position: relative; height: 24px; margin: 6px 10px 18px; }
.am-range::before, .am-range::after { content: ''; position: absolute; top: 50%; height: 2px; transform: translateY(-50%); }
.am-range::before { left: 0; right: 0; background: var(--line); }
.am-range::after { inset-inline-start: var(--am-lo); inset-inline-end: calc(100% - var(--am-hi)); background: var(--text); }
[dir=rtl] .am-range::after { left: auto; right: var(--am-lo); inset-inline-end: auto; width: calc(var(--am-hi) - var(--am-lo)); }
.am-range input[type=range] { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; z-index: 2; }
.am-range input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--text); cursor: pointer; }
.am-range input[type=range]::-moz-range-thumb { pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--text); cursor: pointer; }
.am-range input[type=range]::-webkit-slider-runnable-track { background: none; height: 24px; }
.am-price-range .price-val_wrap { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 0 14px; height: 46px; }
.am-price-range input.price-val { border: 0; outline: 0; width: 100%; background: transparent; text-align: end; font-weight: 500; padding: 0; -moz-appearance: textfield; }
.am-price-range input.price-val::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Quick view panel */
.am-qv-loading { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 300px; }
#quickView .am-qv-qty { border: 0; width: 44px; text-align: center; font-weight: 600; background: transparent; -moz-appearance: textfield; }
#quickView .am-qv-qty::-webkit-inner-spin-button { -webkit-appearance: none; }
#quickView .am-qv-add.loading { opacity: .6; pointer-events: none; }
/* home: the strip under the hero keeps the template's 38px gap (the section's builder padding is 0) */
.infiniteSlide-policy-v2.am-section { padding-top: max(38px, var(--am-pt, 0px)); }
@media (max-width: 1199px) { .logo-site img { max-height: 38px !important; max-width: 120px; } }
/* footer payment marks: the shop's own picture, at the template's icon height */
.am-payments .footer-widget, .am-payments .footer-inner, .am-payments .footer-menu { padding: 0 !important; margin: 0 !important; background: none !important; border: 0 !important; }
.am-payments .payment-list { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.am-payments .payment-list .list { padding: 0; margin: 0; }
.am-payments img { height: 26px !important; width: auto !important; max-width: none; display: block; }
.am-field .ec-pwd-toggle { position: absolute; top: 50%; inset-inline-end: 14px; transform: translateY(-50%); background: none; border: 0; color: var(--text-3, #999); padding: 0; line-height: 0; }
.am-field.ec-has-toggle input { padding-inline-end: 44px; }

/* Buttons: the platform's link hover turned button text black — on a black hover background it vanished */
.tf-btn:hover, .tf-btn:focus-visible, .tf-btn:hover span, .tf-btn:hover i { color: var(--white); }
.tf-btn.btn-stroke:hover { background: var(--text); color: var(--white); border-color: var(--text); }
.tf-btn.btn-white:hover, .tf-btn.btn-white:hover span { color: var(--white); }
/* product tabs: `nav` is only there for the platform's Bootstrap 5.1 tab script */
.tab-btn-wrap-v1.nav { flex-wrap: nowrap; padding: 0; margin: 0; }
/* blog cards: one photo shape whatever the upload's size */
.article-blog .blog-image img { width: 100%; height: auto; aspect-ratio: 450 / 307; object-fit: cover; }
.am-blog-single .blog-image img { width: 100%; height: auto; aspect-ratio: 1410 / 600; object-fit: cover; border-radius: 16px; }

/* main-demo hero (centred layout): a soft shade so white headings stay readable on bright photos */
.am-hero-centered .slideshow-wrap .sld_image { position: relative; }
.am-hero-centered .slideshow-wrap .sld_image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.32)); pointer-events: none; }
