/*
Theme Name: Milano Digital Elementor
Theme URI: https://digital.wpmilano.com
Author: Fares Web Studio
Description: Professional high-conversion WooCommerce & Elementor theme with built-in single-page Dual-Language (English LTR / Arabic RTL) editor support, 1-Click Demo Content Importer, sticky search, flash sale countdowns, and Milano design tokens.
Version: 1.3.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: milano-digital
Tags: e-commerce, woocommerce, elementor, rtl-language-support, custom-colors, two-columns
*/

:root {
  --ml-navy: #1D3587;
  --ml-navy-dark: #152766;
  --ml-periwinkle: #6374C7;
  --ml-terracotta: #C2410C;
  --ml-terracotta-dark: #9A3412;
  --ml-bg: #FFFFFF;
  --ml-surface: #F4F5F7;
  --ml-border: #E5E7EB;
  --ml-text: #111827;
  --ml-muted: #6B7280;
  --ml-gold: #F59E0B;
  --ml-radius-lg: 16px;
  --ml-radius-md: 12px;
  --ml-radius-pill: 9999px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--ml-bg);
  color: var(--ml-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.ml-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Dual Language Engine Visibility & Direction */
html[data-site-lang="en"] .ml-lang-ar { display: none !important; }
html[data-site-lang="ar"] .ml-lang-en { display: none !important; }
html[data-site-lang="en"] body { font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif; direction: ltr; }
html[data-site-lang="ar"] body { font-family: 'Cairo', sans-serif; direction: rtl; }

/* Top Bar */
.ml-topbar {
  background: var(--ml-navy-dark);
  color: #E5E7EB;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ml-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.ml-lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  padding: 3px 10px;
  border-radius: var(--ml-radius-pill);
}

.ml-lang-btn {
  background: transparent;
  border: none;
  color: #CBD5E1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--ml-radius-pill);
}

.ml-lang-btn.active {
  background: #FFFFFF;
  color: var(--ml-navy);
}

/* Main Header */
.ml-header {
  background: var(--ml-navy);
  color: #FFFFFF;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.ml-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ml-logo {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ml-search-form {
  flex: 1;
  max-width: 560px;
  position: relative;
}

.ml-search-input {
  width: 100%;
  padding: 11px 44px 11px 20px;
  border-radius: var(--ml-radius-pill);
  border: none;
  font-size: 14px;
  outline: none;
  background: #FFFFFF;
  color: var(--ml-text);
}

html[data-site-lang="ar"] .ml-search-input {
  padding: 11px 20px 11px 44px;
}

.ml-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--ml-navy);
  cursor: pointer;
  display: flex;
  align-items: center;
}

html[data-site-lang="ar"] .ml-search-btn {
  right: auto;
  left: 12px;
}

.ml-header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ml-icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #FFFFFF;
}

.ml-badge-count {
  background: var(--ml-terracotta);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Sub Navigation */
.ml-nav-bar {
  background: #FFFFFF;
  border-bottom: 1px solid var(--ml-border);
  padding: 12px 0;
}

.ml-nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.ml-nav-menu a {
  font-size: 14px;
  font-weight: 600;
  color: var(--ml-text);
}

.ml-nav-menu a:hover {
  color: var(--ml-navy);
}

/* Milano Button System */
.ml-btn,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  background-color: var(--ml-navy) !important;
  color: #FFFFFF !important;
  border-radius: var(--ml-radius-pill) !important;
  padding: 10px 24px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  border: none !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.ml-btn:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
  background-color: var(--ml-navy-dark) !important;
  transform: translateY(-1px);
}

.ml-btn-white {
  background-color: #FFFFFF !important;
  color: var(--ml-text) !important;
}

.ml-btn-white:hover {
  background-color: #F3F4F6 !important;
}

/* WooCommerce Product Cards */
.woocommerce ul.products li.product {
  background: #FFFFFF;
  border: 1px solid var(--ml-border);
  border-radius: var(--ml-radius-md);
  padding: 16px;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.06);
}

.woocommerce ul.products li.product img {
  border-radius: 8px;
  transition: transform 0.25s ease;
}

.woocommerce ul.products li.product:hover img {
  transform: scale(1.04);
}

.woocommerce span.onsale {
  background-color: var(--ml-terracotta) !important;
  color: #FFFFFF !important;
  border-radius: var(--ml-radius-pill) !important;
  padding: 4px 10px !important;
  min-height: auto !important;
  min-width: auto !important;
  line-height: 1.2 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
}

html[data-site-lang="ar"] .woocommerce span.onsale {
  left: auto !important;
  right: 12px !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--ml-text) !important;
  margin-bottom: 6px !important;
}

.woocommerce ul.products li.product .price {
  color: var(--ml-text) !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  margin-bottom: 12px !important;
}

.woocommerce ul.products li.product .price del {
  color: var(--ml-muted) !important;
  font-weight: 400 !important;
  font-size: 13px !important;
}

.woocommerce ul.products li.product .button {
  width: 100%;
}

/* Pastel Categories Grid */
.ml-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 16px;
}

.ml-cat-card {
  text-align: center;
  display: block;
}

.ml-cat-box {
  border-radius: var(--ml-radius-lg);
  padding: 22px 16px;
  margin-bottom: 10px;
  transition: transform 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
}

.ml-cat-card:hover .ml-cat-box {
  transform: translateY(-4px);
}

.ml-cat-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ml-text);
}

/* Trust Badges */
.ml-trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.ml-trust-card {
  background: var(--ml-surface);
  border-radius: var(--ml-radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Testimonials */
.ml-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
}

.ml-review-card {
  border: 1px solid var(--ml-border);
  border-radius: var(--ml-radius-lg);
  padding: 24px;
  background: #FFFFFF;
}

/* FAQ Accordion */
.ml-faq-item {
  border-bottom: 1px solid var(--ml-border);
  padding: 16px 0;
}

.ml-faq-item summary {
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ml-faq-item p {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--ml-muted);
}

/* Footer */
.ml-footer {
  background: #FFFFFF;
  border-top: 1px solid var(--ml-border);
  padding: 56px 0 24px;
  margin-top: 60px;
}

.ml-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 40px;
}

.ml-footer h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--ml-text);
}

.ml-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ml-footer li {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--ml-muted);
}

.ml-footer-bottom {
  border-top: 1px solid var(--ml-border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--ml-muted);
}

@media (max-width: 768px) {
  .ml-search-form {
    order: 3;
    max-width: 100%;
    flex-basis: 100%;
  }
  .ml-header-inner {
    flex-wrap: wrap;
  }
}

/* Milano editorial storefront */
:root{--ml-navy:#192b69;--ml-periwinkle:#657cf2;--ml-surface:#f4f6fc;--ml-radius-lg:20px}
.ml-logo a{color:inherit;text-decoration:none}
.ml-lang-btn{text-decoration:none}
.ml-editor-hero{margin-block:24px 12px}
.ml-editor-track{display:grid;grid-auto-flow:column;grid-auto-columns:100%;overflow:auto;scroll-snap-type:x mandatory;border-radius:22px;scrollbar-width:none}
.ml-editor-slide{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);min-width:0;min-height:clamp(320px,40vw,510px);background:#192b69;color:white;scroll-snap-align:start}
.ml-editor-copy{align-self:center;padding:clamp(22px,5vw,64px)}
.ml-editor-copy :is(h1,h2){margin:0;font-size:clamp(2.1rem,5.7vw,5.2rem);line-height:1;letter-spacing:-.065em;color:white;overflow-wrap:break-word}
[dir=rtl] .ml-editor-copy :is(h1,h2){letter-spacing:0;line-height:1.26;font-size:clamp(2rem,4.7vw,4.4rem)}
.ml-editor-copy p{margin:18px 0;max-width:36ch;color:#e8edff}
.ml-editor-cta{display:inline-flex;gap:10px;align-items:center}
.ml-editor-copy .ml-editor-cta{background:white;color:#192b69}
[dir=rtl] .ml-cta-arrow,[dir=rtl] .ml-editor-controls [data-ml-step]{transform:scaleX(-1)}
.ml-editor-slide figure,.ml-editor-spotlight figure{margin:0;min-width:0;position:relative}
.ml-editor-slide img,.ml-editor-spotlight figure img{width:100%;height:100%;position:absolute;inset:0;object-fit:cover}
.ml-editor-controls:not([hidden]){display:flex;justify-content:center;align-items:center;gap:5px;padding-block:8px}
.ml-editor-controls button{border:0;background:none;color:#192b69;min-width:32px;min-height:32px;cursor:pointer;font-size:1.4rem}
.ml-editor-controls [data-ml-slide]::after{content:"";display:block;width:18px;height:4px;margin:auto;background:#adb8d6;border-radius:999px}
.ml-editor-controls [aria-pressed=true]::after{background:#192b69}
.ml-editor-section{margin-block:clamp(25px,5vw,65px)}
.ml-editor-heading{display:flex;justify-content:space-between;align-items:end;gap:16px;margin-block-end:18px}
.ml-editor-heading h2{margin:0;font-size:clamp(1.6rem,3.4vw,3rem);line-height:1.12;letter-spacing:-.035em}
[dir=rtl] .ml-editor-heading h2{letter-spacing:0;line-height:1.35}
.ml-cat-box{overflow:hidden;background:#eef1fc}
.ml-cat-box img{width:100%;height:100%;object-fit:cover;transition:transform .22s}
.ml-cat-card:hover img{transform:scale(1.045)}
.ml-editor-spotlight{display:grid;grid-template-columns:1fr 1fr;background:#e6eaff;border-radius:20px;overflow:hidden;min-height:300px;padding:0}
.ml-editor-spotlight .ml-editor-heading{display:block;align-self:center;margin:0;padding:clamp(20px,5vw,58px)}
.ml-editor-faq details{padding:13px 0;border-block-start:1px solid var(--ml-border)}
.ml-editor-faq summary{cursor:pointer;font-weight:750}
.ml-editor-faq p{margin-block-end:0}
.ml-footer input,.ml-search-input{min-width:0}
@media(max-width:650px){
 .ml-editor-slide,.ml-editor-spotlight{grid-template-columns:minmax(0,1fr)}
 .ml-editor-slide figure,.ml-editor-spotlight figure{min-height:220px}
 .ml-editor-section .ml-editor-heading{align-items:start;flex-direction:column}
 .ml-editor-slide .ml-editor-copy{padding:22px}
}
@media(prefers-reduced-motion:reduce){.ml-cat-box img{transition:none}}
.ml-footer-languages{display:flex;gap:6px}
.ml-footer-languages .ml-lang-btn{color:var(--ml-navy)}
.ml-footer-languages .ml-lang-btn.active{background:var(--ml-navy);color:white}
