/*
 * MyMiniatureLand — warm-craft design layer
 * Loaded after theme.css / theme_rtl.css via config/theme.yml (assets.css.all).
 * Overrides only; the compiled theme.css is never edited so theme upgrades stay safe.
 * Direction-sensitive rules use logical properties (site is fa-IR RTL).
 */

/* ---------------------------------------------------------------------------
 * Font: Vazirmatn (self-hosted variable font, Persian + Latin)
 * ------------------------------------------------------------------------- */
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-var.woff2') format('woff2-variations'),
       url('../fonts/Vazirmatn-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Markazi Text — elegant Persian serif for display headings (self-hosted) */
@font-face {
  font-family: 'Markazi Text';
  src: url('../fonts/MarkaziText-var-arabic.woff2') format('woff2-variations'),
       url('../fonts/MarkaziText-var-arabic.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08E3-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC;
}

@font-face {
  font-family: 'Markazi Text';
  src: url('../fonts/MarkaziText-var-latin.woff2') format('woff2-variations'),
       url('../fonts/MarkaziText-var-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2212;
}

/* ---------------------------------------------------------------------------
 * Design tokens
 * ------------------------------------------------------------------------- */
:root {
  --mml-primary: #4B5A20;        /* swamp olive — سبز لجنی */
  --mml-primary-dark: #3A4617;
  --mml-secondary: #5F7327;      /* olive (links, accents) */
  --mml-cta: #FBCB0A;            /* vivid yellow (buy actions) */
  --mml-cta-hover: #E3AF06;
  --mml-cta-light: #FFE14D;
  --mml-on-primary: #F7FBE8;
  --mml-bg: #FCFBEC;             /* warm yellow-ivory page background */
  --mml-surface: #FFFFFF;
  --mml-surface-alt: #F7F4D8;
  --mml-surface-alt2: #F0ECC3;
  --mml-hero-top: #FFFEF5;
  --mml-text: #20260F;           /* deep swamp text */
  --mml-muted: #5A6247;
  --mml-border: #E6E3C4;
  --mml-footer-bg: #232B10;
  --mml-footer-text: #E5E7C9;
  --mml-footer-muted: #B5BC8B;
  --mml-danger: #b91c1c;
  --mml-success: #15803d;
  --mml-radius-sm: 8px;
  --mml-radius: 12px;
  --mml-radius-lg: 16px;
  --mml-shadow-sm: 0 1px 3px rgba(32, 38, 15, 0.08);
  --mml-shadow: 0 4px 14px rgba(32, 38, 15, 0.10);
  --mml-shadow-lg: 0 10px 30px rgba(32, 38, 15, 0.14);
  --mml-transition: 200ms ease;
  --mml-display-font: 'Markazi Text', 'Vazirmatn', Tahoma, serif;

}

/* ---------------------------------------------------------------------------
 * Base
 * ------------------------------------------------------------------------- */
body {
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
  background: var(--mml-bg);
  color: var(--mml-text);
  font-size: 1rem;
  line-height: 1.7; /* Persian script needs taller lines */
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
  color: var(--mml-text);
  font-weight: 700;
}

input, button, select, textarea {
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

a {
  color: var(--mml-secondary);
  transition: color var(--mml-transition);
}
a:hover, a:focus {
  color: var(--mml-primary);
}

p {
  color: inherit;
}

#wrapper {
  background: var(--mml-bg);
  box-shadow: none;
}

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--mml-cta);
  outline-offset: 2px;
}

::selection {
  background: var(--mml-cta);
  color: var(--mml-text);
}

/* ---------------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------------- */
#header {
  background: var(--mml-surface);
  color: var(--mml-text);
  box-shadow: var(--mml-shadow-sm);
}

#header .header-nav {
  background: var(--mml-primary);
  color: var(--mml-on-primary);
  border-bottom: none;
  max-height: none;
}

#header .header-nav a,
#header .header-nav .blockcart,
#header .header-nav #_desktop_contact_link,
#header .header-nav .contact-link,
#header .header-nav .user-info,
#header .header-nav .language-selector,
#header .header-nav .currency-selector {
  color: var(--mml-on-primary);
}

#header .header-nav a:hover,
#header .header-nav a:focus {
  /* lighter gold: var(--mml-cta) on the brown bar is 4.1:1, var(--mml-cta-light) is 5.4:1 */
  color: var(--mml-cta-light);
}

#header .header-nav .material-icons {
  color: inherit;
}

/* Dropdown panels in the brown bar open on white; restore dark text inside them */
#header .header-nav .dropdown-menu,
#header .header-nav .dropdown-menu a {
  color: var(--mml-text);
}

#header .header-nav .dropdown-menu a:hover,
#header .header-nav .dropdown-menu a:focus {
  color: var(--mml-secondary);
}

#header .header-nav .blockcart {
  background: transparent;
}

#header .header-nav .blockcart .cart-products-count {
  color: var(--mml-text);
  background: var(--mml-cta);
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  font-weight: 700;
}

#header .header-top {
  background: var(--mml-surface);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* Main menu */
#header .top-menu a[data-depth="0"] {
  color: var(--mml-text);
  font-weight: 600;
  text-transform: none;
  border-radius: var(--mml-radius-sm);
  padding: 0.4rem 0.75rem;
  transition: background-color var(--mml-transition), color var(--mml-transition);
}

#header .top-menu a[data-depth="0"]:hover,
#header .top-menu a[data-depth="0"]:focus {
  color: var(--mml-primary);
  background: var(--mml-surface-alt);
}

#header .top-menu .sub-menu {
  border: 1px solid var(--mml-border);
  border-radius: var(--mml-radius);
  box-shadow: var(--mml-shadow-lg);
  background: var(--mml-surface);
}

#header .top-menu .sub-menu a:hover {
  color: var(--mml-primary);
}

/* Search bar */
#search_widget input[type="text"] {
  background: var(--mml-surface-alt);
  border: 1px solid var(--mml-border);
  border-radius: 999px;
  color: var(--mml-text);
  min-height: 44px;
  padding-inline-start: 1rem;
  transition: border-color var(--mml-transition), box-shadow var(--mml-transition);
}

#search_widget input[type="text"]:focus {
  border-color: var(--mml-cta);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mml-cta) 25%, transparent);
  outline: none;
}

#search_widget input[type="text"]::placeholder {
  color: var(--mml-muted);
  opacity: 1;
}

#search_widget button[type="submit"] {
  color: var(--mml-primary);
  cursor: pointer;
}

/* ---------------------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------------------- */
.btn {
  border-radius: var(--mml-radius-sm);
  font-weight: 700;
  text-transform: none;
  transition: background-color var(--mml-transition), color var(--mml-transition),
              box-shadow var(--mml-transition), border-color var(--mml-transition);
  min-height: 44px;
  cursor: pointer;
}

.btn-primary,
.btn-primary:disabled {
  background: var(--mml-cta);
  border-color: var(--mml-cta);
  color: var(--mml-text);
  box-shadow: var(--mml-shadow-sm);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active {
  background: var(--mml-cta-hover);
  border-color: var(--mml-cta-hover);
  /* dark text stays: white on #d97706 is only 3.2:1 */
  color: var(--mml-text);
  box-shadow: var(--mml-shadow);
}

.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mml-cta) 40%, transparent);
}

.btn-secondary,
.btn-tertiary,
.btn-secondary:disabled {
  background: var(--mml-surface);
  border: 1px solid var(--mml-primary);
  color: var(--mml-primary);
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-tertiary:hover,
.btn-tertiary:focus {
  background: var(--mml-primary);
  border-color: var(--mml-primary);
  color: var(--mml-on-primary);
}

.btn-unstyle {
  cursor: pointer;
}

/* Quantity spinner buttons are tiny stacked arrows; the 44px floor would break them */
.bootstrap-touchspin .btn,
.bootstrap-touchspin .btn-touchspin {
  min-height: 0;
}

/* ---------------------------------------------------------------------------
 * Product cards
 * ------------------------------------------------------------------------- */
.product-miniature .thumbnail-container {
  background: var(--mml-surface);
  border: 1px solid var(--mml-border);
  border-radius: var(--mml-radius-lg);
  overflow: hidden;
  box-shadow: var(--mml-shadow-sm);
  transition: box-shadow var(--mml-transition), border-color var(--mml-transition);
}

.product-miniature .thumbnail-container:hover,
.product-miniature .thumbnail-container:focus-within {
  box-shadow: var(--mml-shadow-lg);
  border-color: var(--mml-cta);
}

.product-miniature .product-thumbnail {
  display: block;
  cursor: pointer;
}

.product-miniature .product-title a {
  color: var(--mml-text);
  font-weight: 600;
  font-size: 0.95rem;
}

.product-miniature .product-title a:hover,
.product-miniature .product-title a:focus {
  color: var(--mml-secondary);
}

.product-miniature .price {
  color: var(--mml-primary);
  font-weight: 800;
  font-size: 1.05rem;
}

.product-miniature .regular-price {
  color: var(--mml-muted);
  font-weight: 400;
}

.product-miniature .highlighted-informations {
  background: color-mix(in srgb, var(--mml-bg) 95%, transparent);
  box-shadow: none;
  border-top: 1px solid var(--mml-border);
}

.product-miniature .quick-view {
  color: var(--mml-secondary);
  cursor: pointer;
}

/* Discount / new flags */
.product-flags .product-flag {
  border-radius: 999px;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  box-shadow: var(--mml-shadow-sm);
  background: var(--mml-primary);
  color: var(--mml-on-primary);
}

.product-flags .product-flag.discount,
.product-flags .product-flag.discount-percentage,
.product-flags .product-flag.discount-amount,
.product-flags .product-flag.on-sale {
  background: var(--mml-danger);
  color: #ffffff;
}

.product-flags .product-flag.new {
  background: var(--mml-cta);
  color: var(--mml-text);
}

.discount-percentage,
.discount-amount,
.discount {
  background: var(--mml-danger);
  color: #ffffff;
  border-radius: 999px;
}

/* Section titles (Featured products, etc.) */
.products-section-title,
h2.products-section-title {
  color: var(--mml-text);
  font-weight: 800;
  text-transform: none;
  position: relative;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.products-section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 50%;
  transform: translateX(50%);
  width: 64px;
  height: 4px;
  border-radius: 999px;
  background: var(--mml-cta);
}

[dir="ltr"] .products-section-title::after {
  transform: translateX(-50%);
}

.all-product-link {
  color: var(--mml-secondary);
  font-weight: 700;
}

/* ---------------------------------------------------------------------------
 * Homepage slider (ps_imageslider)
 * ------------------------------------------------------------------------- */
#carousel,
.carousel {
  border-radius: var(--mml-radius-lg);
  overflow: hidden;
  box-shadow: var(--mml-shadow);
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.carousel .caption {
  background: rgba(59, 29, 14, 0.75);
  border-radius: var(--mml-radius);
  padding: 1rem 1.5rem;
}

/* Slide images fill the rounded card instead of floating on white slabs */
.carousel .carousel-item img,
#carousel .carousel-item img {
  width: 100%;
  height: auto;
  margin: 0;
}

.carousel .caption .caption-description p {
  color: var(--mml-footer-text);
}

.carousel .direction .carousel-control .icon-prev::before,
.carousel .direction .carousel-control .icon-next::before {
  color: var(--mml-on-primary);
}

/* ---------------------------------------------------------------------------
 * Breadcrumb & pagination
 * ------------------------------------------------------------------------- */
.breadcrumb {
  background: transparent;
}

.breadcrumb li a {
  color: var(--mml-muted);
}

.breadcrumb li:last-child a,
.breadcrumb li:last-child span {
  color: var(--mml-text);
  font-weight: 600;
}

.pagination .page-list {
  background: var(--mml-surface);
  border: 1px solid var(--mml-border);
  border-radius: var(--mml-radius);
  box-shadow: var(--mml-shadow-sm);
}

.pagination a {
  color: var(--mml-secondary);
  font-weight: 600;
}

.pagination .current a {
  color: var(--mml-primary);
  font-weight: 800;
}

/* ---------------------------------------------------------------------------
 * Category page: facets / filters
 * ------------------------------------------------------------------------- */
#search_filters,
#search_filters_wrapper,
.block-categories {
  background: var(--mml-surface);
  border: 1px solid var(--mml-border);
  border-radius: var(--mml-radius);
  box-shadow: var(--mml-shadow-sm);
}

#search_filters .facet .facet-title,
.block-categories .category-top-menu a {
  color: var(--mml-text);
}

#search_filters .facet .facet-label a:hover,
.block-categories a:hover {
  color: var(--mml-secondary);
}

#js-product-list-header,
.block-category {
  background: var(--mml-surface);
  border: 1px solid var(--mml-border);
  border-radius: var(--mml-radius);
  box-shadow: var(--mml-shadow-sm);
}

/* Sort dropdown & toolbar */
.products-selection {
  color: var(--mml-muted);
}

.products-sort-order .select-title,
.brands-sort .select-title,
.suppliers-sort .select-title {
  border-radius: var(--mml-radius-sm);
  border: 1px solid var(--mml-border);
  background: var(--mml-surface);
  color: var(--mml-text);
  box-shadow: none;
  cursor: pointer;
}

.products-sort-order .dropdown-menu {
  border-radius: var(--mml-radius);
  border: 1px solid var(--mml-border);
  box-shadow: var(--mml-shadow-lg);
}

/* ---------------------------------------------------------------------------
 * Product page
 * ------------------------------------------------------------------------- */
#product #content,
.product-container .product-cover {
  border-radius: var(--mml-radius-lg);
}

.product-cover img {
  border-radius: var(--mml-radius-lg);
  box-shadow: var(--mml-shadow);
  background: var(--mml-surface);
}

.product-images .thumb {
  border-radius: var(--mml-radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--mml-transition);
}

.product-images .thumb.selected,
.product-images .thumb:hover {
  border-color: var(--mml-cta);
}

.product-prices .current-price,
.current-price-value {
  color: var(--mml-primary);
  font-weight: 800;
}

.product-prices .regular-price {
  color: var(--mml-muted);
}

.product-actions .add-to-cart {
  min-height: 48px;
  font-size: 1.05rem;
  padding-inline: 1.75rem;
}

.product-actions .product-quantity .qty input,
.product-actions .product-quantity .input-group {
  border-radius: var(--mml-radius-sm);
}

.product-variants > .product-variants-item select,
.product-variants > .product-variants-item ul li .input-color + span {
  border-radius: var(--mml-radius-sm);
  border-color: var(--mml-border);
}

/* Tabs (description / details) */
.tabs {
  background: var(--mml-surface);
  border: 1px solid var(--mml-border);
  border-radius: var(--mml-radius-lg);
  box-shadow: var(--mml-shadow-sm);
}

.tabs .nav-tabs .nav-link {
  color: var(--mml-muted);
  font-weight: 600;
  border: none;
  border-bottom: 3px solid transparent;
}

.tabs .nav-tabs .nav-link.active,
.tabs .nav-tabs .nav-link:hover {
  color: var(--mml-primary);
  border-bottom-color: var(--mml-cta);
  background: transparent;
}

/* Reassurance block */
.blockreassurance,
#block-reassurance {
  background: var(--mml-surface);
  border: 1px solid var(--mml-border);
  border-radius: var(--mml-radius);
}

#block-reassurance li .block-reassurance-item {
  border-bottom-color: var(--mml-border);
}

/* ---------------------------------------------------------------------------
 * Cart & checkout
 * ------------------------------------------------------------------------- */
.cart-grid-body .card,
.cart-grid-right .card,
.cart-summary,
.card {
  background: var(--mml-surface);
  border: 1px solid var(--mml-border);
  border-radius: var(--mml-radius-lg);
  box-shadow: var(--mml-shadow-sm);
}

.cart-summary-line .value,
.cart-total .value {
  color: var(--mml-primary);
  font-weight: 800;
}

.cart-line-product-actions .remove-from-cart,
.cart-line-product-actions .remove-from-cart .material-icons {
  color: var(--mml-muted);
  cursor: pointer;
}

.cart-line-product-actions .remove-from-cart:hover .material-icons {
  color: var(--mml-danger);
}

.checkout-step {
  background: var(--mml-surface);
  border: 1px solid var(--mml-border);
  border-radius: var(--mml-radius);
  box-shadow: var(--mml-shadow-sm);
}

.checkout-step .step-title {
  color: var(--mml-text);
}

.checkout-step .step-number {
  background: var(--mml-cta);
  color: var(--mml-text);
  border-radius: 999px;
  font-weight: 800;
}

/* Current step: theme paints it green (#00c062); use brand brown instead */
body#checkout section.checkout-step.-reachable.-current .step-number,
.checkout-step.-current .step-number {
  background: var(--mml-primary);
  color: var(--mml-on-primary);
}

/* ---------------------------------------------------------------------------
 * Forms
 * ------------------------------------------------------------------------- */
.form-control {
  background: var(--mml-surface);
  border: 1px solid var(--mml-border);
  border-radius: var(--mml-radius-sm);
  color: var(--mml-text);
  min-height: 44px;
  transition: border-color var(--mml-transition), box-shadow var(--mml-transition);
}

.form-control:focus {
  background: var(--mml-surface);
  border-color: var(--mml-cta);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mml-cta) 25%, transparent);
  color: var(--mml-text);
  outline: none;
}

.form-control-label {
  color: var(--mml-text);
  font-weight: 600;
}

.form-control::placeholder {
  color: var(--mml-muted);
  opacity: 1;
}

.custom-checkbox input[type="checkbox"] + span,
.custom-radio {
  border-color: var(--mml-primary);
}

.custom-checkbox input[type="checkbox"] + span .checkbox-checked,
.custom-radio input[type="radio"]:checked + span {
  color: var(--mml-primary);
  background: var(--mml-primary);
}

/* Validation feedback stays visible near the field */
.form-control.is-invalid,
.form-control-danger {
  border-color: var(--mml-danger);
}

.alert-danger {
  background: #fdeaea;
  border-color: var(--mml-danger);
  color: #7f1d1d;
  border-radius: var(--mml-radius-sm);
}

.alert-success {
  background: #ecfdf3;
  border-color: var(--mml-success);
  color: #14532d;
  border-radius: var(--mml-radius-sm);
}

/* ---------------------------------------------------------------------------
 * Newsletter block
 * ------------------------------------------------------------------------- */
.block_newsletter {
  background: var(--mml-surface-alt);
  border-top: 1px solid var(--mml-border);
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.block_newsletter form input[type="email"] {
  border-radius: var(--mml-radius-sm);
  border: 1px solid var(--mml-border);
  min-height: 44px;
}

.block_newsletter form input[type="email"]:focus {
  border-color: var(--mml-cta);
  outline: none;
}

/* ---------------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------------- */
.footer-container {
  background: var(--mml-footer-bg);
  color: var(--mml-footer-text);
  box-shadow: none;
  margin-top: 0;
  padding-top: 2.5rem;
  padding-bottom: 1rem;
  overflow: hidden;
}

.footer-container .h3,
.footer-container .h4,
.footer-container .footer__title,
.footer-container p.h4 {
  color: #ffffff;
  font-weight: 700;
}

.footer-container li a,
.footer-container .block-contact,
.footer-container .contact-rich,
.footer-container a {
  color: var(--mml-footer-text);
}

.footer-container li a:hover,
.footer-container a:hover {
  color: var(--mml-cta);
}

.footer-container .copyright,
.footer-container .block-contact .data {
  color: var(--mml-footer-muted);
}

/* Social icons keep their sprites; just space them comfortably */
.block-social ul {
  gap: 0.5rem;
}

.block-social li {
  border-radius: 999px;
}

/* Instagram badge + "made with love" credit */
.mml-social-row {
  margin-bottom: 1rem;
}

.mml-instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid color-mix(in srgb, var(--mml-footer-text) 30%, transparent);
  border-radius: 999px;
  font-weight: 700;
  transition: var(--mml-transition);
}

.mml-instagram-link:hover {
  background: var(--mml-cta);
  border-color: var(--mml-cta);
  color: var(--mml-text) !important;
}

.mml-instagram-link svg {
  flex-shrink: 0;
}

.mml-copyright-love {
  color: var(--mml-footer-muted);
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------------------
 * Misc: modals, quickview, back-to-top, badges
 * ------------------------------------------------------------------------- */
.modal-content {
  border-radius: var(--mml-radius-lg);
  border: 1px solid var(--mml-border);
  box-shadow: var(--mml-shadow-lg);
}

#blockcart-modal .modal-header {
  background: var(--mml-primary);
  color: var(--mml-on-primary);
  border-radius: var(--mml-radius-lg) var(--mml-radius-lg) 0 0;
}

#blockcart-modal .modal-header .close {
  color: var(--mml-on-primary);
  opacity: 0.9;
  cursor: pointer;
}

.back-to-top,
#back-to-top {
  border-radius: 999px;
  background: var(--mml-primary);
  color: var(--mml-on-primary);
}

.badge,
.label {
  border-radius: 999px;
}

/* Wishlist & quick-action buttons stay tappable */
.wishlist-button-add,
.wishlist-button-product {
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}

/* ---------------------------------------------------------------------------
 * Homepage sections (index.tpl): category tiles + brand intro
 * ------------------------------------------------------------------------- */
.mml-categories {
  margin: 3rem 0;
}

.mml-categories .products-section-title {
  text-align: center;
}

.mml-categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.mml-category-tile {
  display: block;
  background: var(--mml-surface);
  border: 1px solid var(--mml-border);
  border-radius: var(--mml-radius-lg);
  overflow: hidden;
  box-shadow: var(--mml-shadow-sm);
  cursor: pointer;
  transition: box-shadow var(--mml-transition), border-color var(--mml-transition);
}

.mml-category-tile:hover,
.mml-category-tile:focus-visible {
  box-shadow: var(--mml-shadow-lg);
  border-color: var(--mml-cta);
  text-decoration: none;
}

.mml-category-tile img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.mml-category-name {
  display: block;
  padding: 0.75rem 1rem;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--mml-text);
  border-top: 1px solid var(--mml-border);
  background: var(--mml-surface);
  transition: color var(--mml-transition);
}

.mml-category-tile:hover .mml-category-name {
  color: var(--mml-secondary);
}

.mml-intro {
  margin: 3rem 0;
  padding: 2.5rem 2rem;
  text-align: center;
  background: var(--mml-surface-alt);
  border: 1px solid var(--mml-border);
  border-radius: var(--mml-radius-lg);
}

.mml-intro-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--mml-primary);
  margin-bottom: 0.75rem;
}

.mml-intro-text {
  max-width: 42rem;
  margin: 0 auto;
  color: var(--mml-muted);
  font-size: 1.05rem;
  line-height: 1.9;
}

@media (max-width: 991px) {
  .mml-categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .mml-categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .mml-intro {
    padding: 1.75rem 1.25rem;
  }

  .mml-intro-title {
    font-size: 1.4rem;
  }
}

/* ---------------------------------------------------------------------------
 * Old-brand cyan (#24b9d7) cleanup — theme rules with higher specificity
 * ------------------------------------------------------------------------- */

/* Footer: theme's ID selector beats class overrides */
#block_myaccount_infos .myaccount-title a {
  color: #ffffff;
}

.footer-container .linklist .blockcms-title a {
  color: #ffffff;
}

/* Buttons inside the footer must not inherit the cream link color */
.footer-container .btn-primary,
.footer-container a.btn-primary {
  color: var(--mml-text);
}

.footer-container .btn-primary:hover,
.footer-container a.btn-primary:hover {
  color: var(--mml-text);
}

/* Product flags: theme uses li.product-flag (higher specificity) */
.product-flags li.product-flag {
  background: var(--mml-primary);
  color: var(--mml-on-primary);
}

.product-flags li.product-flag.discount,
.product-flags li.product-flag.discount-percentage,
.product-flags li.product-flag.discount-amount,
.product-flags li.product-flag.on-sale {
  background: var(--mml-danger);
  color: #ffffff;
}

.product-flags li.product-flag.new {
  background: var(--mml-cta);
  color: var(--mml-text);
}

/* Prices rendered with the bare .product-price class */
.product-price {
  color: var(--mml-primary);
}

/* Bootstrap pagination + pills + list groups (account pages, order history) */
.page-link {
  color: var(--mml-secondary);
}

.page-item.active .page-link,
.page-item.active .page-link:hover,
.page-item.active .page-link:focus {
  background: var(--mml-primary);
  border-color: var(--mml-primary);
  color: var(--mml-on-primary);
}

.nav-pills .nav-link.active,
.nav-pills .nav-link.active:hover,
.nav-pills .nav-link.active:focus,
.nav-pills .nav-item.open .nav-link {
  background: var(--mml-primary);
  color: var(--mml-on-primary);
}

.list-group-item.active,
.list-group-item.active:hover,
.list-group-item.active:focus {
  background: var(--mml-primary);
  border-color: var(--mml-primary);
  color: var(--mml-on-primary);
}

.dropdown-item:hover,
.dropdown-item:focus {
  color: var(--mml-primary);
}

/* Utility classes still carrying the old brand color */
.text-primary {
  color: var(--mml-secondary) !important;
}

.bg-primary {
  background-color: var(--mml-primary) !important;
}

.btn-link {
  color: var(--mml-secondary);
}

.btn-link:hover {
  color: var(--mml-primary);
}

.btn-outline-primary {
  color: var(--mml-primary);
  border-color: var(--mml-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active,
.open > .btn-outline-primary.dropdown-toggle {
  background: var(--mml-primary);
  border-color: var(--mml-primary);
  color: var(--mml-on-primary);
}

/* Social icon squares hover cyan by default */
.block-social ul li:hover {
  background-color: var(--mml-cta);
}

/* Cart modal product name + header cart hover */
#blockcart-modal .product-name {
  color: var(--mml-primary);
}

#header .header-nav .blockcart a:hover,
#header .header-nav .cart-preview.active {
  color: var(--mml-cta-light);
  background: transparent;
}

/* Selected address card at checkout */
body#checkout section.checkout-step .address-item.selected {
  border-color: var(--mml-primary);
}

/* Subcategory name hover on category pages */
#subcategories ul li .subcategory-name:hover,
.account-list a:hover {
  color: var(--mml-secondary);
}

/* ---------------------------------------------------------------------------
 * Elegance layer — display type, hero, flourishes, richer surfaces
 * ------------------------------------------------------------------------- */

html {
  scroll-behavior: smooth;
}

/* Display serif for big headings; body/UI stays Vazirmatn */
h1, .h1,
.products-section-title,
h2.products-section-title,
.mml-intro-title {
  font-family: var(--mml-display-font);
  font-weight: 600;
  line-height: 1.25;
}

.products-section-title,
h2.products-section-title {
  font-size: 2.1rem;
}

/* Section-title flourish: gradient rule with a small gold diamond */
.products-section-title::after {
  width: 110px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--mml-cta) 25%, var(--mml-cta) 75%, transparent);
}

.products-section-title::before {
  content: "";
  position: absolute;
  bottom: -3px;
  inset-inline-start: 50%;
  width: 9px;
  height: 9px;
  transform: translateX(50%) rotate(45deg);
  background: var(--mml-cta-hover);
  border-radius: 2px;
  z-index: 1;
}

[dir="ltr"] .products-section-title::before {
  transform: translateX(-50%) rotate(45deg);
}

/* Gold buttons get a soft vertical gradient for depth */
.btn-primary,
.btn-primary:disabled {
  background: linear-gradient(180deg, var(--mml-cta-light) 0%, var(--mml-cta) 100%);
  border-color: color-mix(in srgb, var(--mml-cta) 85%, black);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active {
  background: linear-gradient(180deg, var(--mml-cta) 0%, var(--mml-cta-hover) 100%);
  border-color: color-mix(in srgb, var(--mml-cta-hover) 85%, black);
}

/* Thin gold hairlines framing the page */
#header {
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--mml-cta), transparent) 1;
}

.footer-container {
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--mml-cta), transparent) 1;
}

/* Product & tile photos come alive on hover (clipped, no layout shift) */
.product-miniature .thumbnail-container .product-thumbnail img,
.mml-category-tile img {
  transition: transform 300ms ease;
}

.product-miniature .thumbnail-container:hover .product-thumbnail img,
.product-miniature .thumbnail-container:focus-within .product-thumbnail img,
.mml-category-tile:hover img,
.mml-category-tile:focus-visible img {
  transform: scale(1.05);
}

/* ---------------------------------------------------------------------------
 * Hero (homepage) — replaces the image slider, which is hidden below
 * ------------------------------------------------------------------------- */
body#index #carousel,
body#index .carousel {
  display: none;
}

.mml-hero {
  position: relative;
  margin: 1.5rem 0 2.75rem;
  border: 1px solid var(--mml-border);
  border-radius: var(--mml-radius-lg);
  overflow: hidden;
  background:
    radial-gradient(1100px 480px at 85% 15%, color-mix(in srgb, var(--mml-cta) 26%, transparent), transparent 60%),
    radial-gradient(800px 420px at 10% 95%, color-mix(in srgb, var(--mml-primary) 9%, transparent), transparent 60%),
    linear-gradient(180deg, var(--mml-hero-top) 0%, var(--mml-surface-alt) 100%);
  box-shadow: var(--mml-shadow);
}

.mml-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--mml-primary) 6%, transparent) 1px, transparent 1.5px);
  background-size: 24px 24px;
  pointer-events: none;
}

.mml-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 2rem;
  padding: 3.25rem 3rem;
}

.mml-hero-kicker {
  display: inline-block;
  color: var(--mml-secondary);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  padding: 0.3rem 0.9rem;
  background: color-mix(in srgb, var(--mml-cta) 30%, transparent);
  border: 1px solid color-mix(in srgb, var(--mml-cta) 60%, transparent);
  border-radius: 999px;
}

.mml-hero-title {
  font-family: var(--mml-display-font);
  font-weight: 700;
  font-size: 4rem;
  line-height: 1.1;
  color: var(--mml-primary);
  margin-bottom: 0.75rem;
}

.mml-hero-sub {
  color: var(--mml-muted);
  font-size: 1.15rem;
  line-height: 2;
  max-width: 34rem;
  margin-bottom: 0;
}

.mml-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.mml-hero-cta {
  padding-inline: 2rem;
  font-size: 1.05rem;
}

/* Banner: sister's illustrated brand artwork */
.mml-hero-banner {
  position: relative;
  border-radius: var(--mml-radius-lg);
  overflow: hidden;
  border: 6px solid #ffffff;
  box-shadow: var(--mml-shadow-lg);
  transform: rotate(1.5deg);
}

.mml-hero-banner picture,
.mml-hero-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

/* Intro strip gets the same warm crafted surface */
.mml-intro {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--mml-surface-alt) 0%, var(--mml-surface-alt2) 100%);
}

.mml-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--mml-primary) 5%, transparent) 1px, transparent 1.5px);
  background-size: 24px 24px;
  pointer-events: none;
}

.mml-intro-title {
  position: relative;
  font-size: 2.2rem;
}

.mml-intro-text {
  position: relative;
}

/* Newsletter bar (ps_emailsubscription above footer) */
.block_newsletter {
  background: var(--mml-surface-alt);
}

.block_newsletter form input[type="email"] {
  border-radius: 999px;
  padding-inline-start: 1.25rem;
}

.block_newsletter form button[type="submit"] {
  border-radius: 999px;
}

.block_newsletter p {
  color: var(--mml-muted);
}

/* Hero responsive */
@media (max-width: 991px) {
  .mml-hero-inner {
    grid-template-columns: 1fr;
    padding: 2.25rem 1.5rem;
    text-align: center;
  }

  .mml-hero-sub {
    margin-inline: auto;
  }

  .mml-hero-actions {
    justify-content: center;
  }

  .mml-hero-title {
    font-size: 2.9rem;
  }

  .mml-hero-banner {
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
    transform: none;
  }
}

@media (max-width: 543px) {
  .mml-hero-title {
    font-size: 2.4rem;
  }

  .products-section-title,
  h2.products-section-title {
    font-size: 1.7rem;
  }
}

/* ---------------------------------------------------------------------------
 * Motion preferences
 * ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------------
 * Responsive touches
 * ------------------------------------------------------------------------- */
@media (max-width: 543px) {
  /* Theme puts products 1-per-row (col-xs-12) on phones; show 2-up instead */
  .products.row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 0;
  }

  .products.row .product {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  .products.row .product-miniature {
    margin: 0;
    width: 100%;
  }

  .products.row .product-title a {
    font-size: 0.85rem;
  }

  .products.row .price {
    font-size: 0.95rem;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 1rem; /* never below 16px on mobile */
  }

  #header .top-menu a[data-depth="0"] {
    padding: 0.65rem 0.75rem; /* larger touch targets in mobile menu */
  }

  .carousel,
  #carousel {
    border-radius: var(--mml-radius-sm);
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
  }
}
