:root {
  --eco-bg: #f8fafc;
  --eco-surface: #ffffff;
  --eco-text: #0f172a;
  --eco-muted: #475569;
  --eco-border: #e2e8f0;
  --eco-radius: 14px;
  --eco-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--eco-font-size, 15px); scroll-behavior: smooth; }
body { margin: 0; font-family: var(--eco-font-family); font-weight: var(--eco-body-weight, 400); line-height: var(--eco-line-height, 1.8); background: var(--eco-bg); color: var(--eco-text); direction: rtl; text-align: right; }
h1, h2, h3, h4 { font-weight: var(--eco-heading-weight, 700); line-height: 1.4; margin-top: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--eco-primary); outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.eco-container { width: min(1320px, 100% - 32px); margin-inline: auto; }
.eco-icon { width: 20px; height: 20px; display: inline-block; vertical-align: middle; }

/* Buttons */
.eco-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 10px; border: 1px solid transparent; font-family: inherit; font-weight: 600; cursor: pointer; transition: transform .15s ease, opacity .15s ease, background .15s ease; }
.eco-btn--primary { background: var(--eco-primary); color: #ffffff; }
.eco-btn--accent { background: var(--eco-accent); color: #0f172a; }
.eco-btn--outline { border-color: var(--eco-border); background: var(--eco-surface); color: var(--eco-text); }
.eco-btn--sm { padding: 7px 12px; font-size: 0.875rem; }
.eco-btn--lg { padding: 13px 26px; font-size: 1rem; }
.eco-btn--full { width: 100%; }
.eco-btn:hover { opacity: 0.92; transform: translateY(-1px); }

/* Announcement & Ticker */
.eco-announcement-bar { background: var(--eco-announce-bg); color: #ffffff; font-size: 0.88rem; padding: 8px 0; }
.eco-announcement-bar__inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.eco-announcement-bar__close { background: transparent; border: none; color: #ffffff; cursor: pointer; padding: 2px; }
.eco-news-ticker { background: #0f172a; color: #f8fafc; font-size: 0.85rem; padding: 6px 0; }
.eco-news-ticker__inner { display: flex; align-items: center; gap: 12px; }
.eco-news-ticker__badge { background: var(--eco-accent); color: #0f172a; padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: 0.78rem; flex-shrink: 0; }

/* Header & 5 Layouts */
.eco-header { position: sticky; top: 0; z-index: 90; background: var(--eco-header-bg); color: var(--eco-header-text); border-bottom: 1px solid var(--eco-border); min-height: var(--eco-header-height, 76px); display: flex; align-items: center; }
.eco-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; }
.eco-site-title { font-size: 1.35rem; font-weight: 800; color: var(--eco-primary); }
.eco-header__search { position: relative; flex: 1; max-width: 440px; }
.eco-live-search-form { display: flex; align-items: center; background: var(--eco-bg); border: 1px solid var(--eco-border); border-radius: 12px; overflow: hidden; }
.eco-live-search-input { flex: 1; border: none; background: transparent; padding: 10px 14px; font-family: inherit; color: var(--eco-text); }
.eco-live-search-btn { border: none; background: transparent; padding: 10px 14px; cursor: pointer; color: var(--eco-muted); }
.eco-live-search-results { position: absolute; top: calc(100% + 6px); right: 0; left: 0; background: var(--eco-surface); border: 1px solid var(--eco-border); border-radius: 12px; box-shadow: var(--eco-shadow); z-index: 120; max-height: 400px; overflow-y: auto; padding: 8px; }
.eco-search-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; }
.eco-search-item:hover { background: var(--eco-bg); }
.eco-search-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.eco-search-item__meta { flex: 1; display: flex; flex-direction: column; }

/* Nav & Mega Menu */
.eco-primary-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 18px; }
.eco-primary-menu > li { position: relative; }
.eco-primary-menu > li > a { padding: 10px 4px; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.eco-primary-menu .sub-menu { display: none; position: absolute; top: 100%; right: 0; min-width: 220px; background: var(--eco-surface); border: 1px solid var(--eco-border); border-radius: 12px; box-shadow: var(--eco-shadow); list-style: none; padding: 10px; z-index: 100; }
.eco-primary-menu > li:hover > .sub-menu, .eco-primary-menu > li:focus-within > .sub-menu { display: block; }
.eco-mega-dropdown { display: none; position: absolute; top: 100%; right: 0; width: 640px; background: var(--eco-surface); border: 1px solid var(--eco-border); border-radius: 14px; box-shadow: var(--eco-shadow); padding: 16px; gap: 16px; z-index: 100; }
.eco-has-mega-menu:hover > .eco-mega-dropdown { display: grid; grid-template-columns: 2fr 1fr; }
.eco-mega-grid { position: static !important; display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 8px; border: none !important; box-shadow: none !important; padding: 0 !important; }
.eco-mega-banner img { border-radius: 10px; object-fit: cover; height: 100%; }

/* Header Actions */
.eco-header__actions { display: flex; align-items: center; gap: 8px; }
.eco-icon-btn { position: relative; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--eco-border); background: var(--eco-surface); color: var(--eco-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.eco-badge { position: absolute; top: -6px; left: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--eco-primary); color: #ffffff; font-size: 0.72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.eco-mobile-menu-toggle { display: none; background: transparent; border: 1px solid var(--eco-border); border-radius: 10px; padding: 8px; cursor: pointer; }
.eco-header--layout-5 { width: min(1320px, 100% - 24px); margin: 10px auto 0; border-radius: 14px; border: 1px solid var(--eco-border); }

/* Hero & Sections */
.eco-hero-section { padding: 24px 0; }
.eco-hero-card { background: linear-gradient(135deg, var(--eco-primary), var(--eco-secondary)); color: #ffffff; border-radius: 20px; padding: 40px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; }
.eco-hero-badge { display: inline-block; background: rgba(255,255,255,0.18); padding: 4px 12px; border-radius: 999px; font-size: 0.85rem; margin-bottom: 12px; }
.eco-hero-title { font-size: clamp(1.6rem, 3vw, 2.5rem); margin-bottom: 12px; color: #ffffff; }
.eco-hero-subtitle { opacity: 0.92; margin-bottom: 20px; }
.eco-section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.eco-section-title { font-size: 1.35rem; margin: 0; }
.eco-section-subtitle { margin: 4px 0 0; color: var(--eco-muted); font-size: 0.9rem; }
.eco-link-more { color: var(--eco-primary); font-weight: 700; }
.eco-home-products, .eco-cta-section { padding: 28px 0; }
.eco-cta-box { background: linear-gradient(120deg, #0f172a, #1e293b); color: #ffffff; border-radius: 18px; padding: 32px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }

/* Products Grid & Cards */
.eco-products-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.eco-product-card { background: var(--eco-surface); border: 1px solid var(--eco-border); border-radius: var(--eco-radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.eco-style-modern .eco-product-card:hover { transform: translateY(-4px); box-shadow: var(--eco-shadow); }
.eco-style-minimal .eco-product-card { box-shadow: none; border-radius: 8px; }
.eco-product-card__media { position: relative; aspect-ratio: 1 / 1; background: #f1f5f9; overflow: hidden; }
.eco-product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s ease; }
.eco-product-card__img-secondary { position: absolute; inset: 0; opacity: 0; }
.eco-product-card:hover .eco-product-card__img-secondary { opacity: 1; }
.eco-discount-badge { position: absolute; top: 10px; right: 10px; background: #dc2626; color: #ffffff; font-size: 0.78rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; z-index: 2; }
.eco-wish-btn { position: absolute; top: 10px; left: 10px; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(255,255,255,0.9); color: #475569; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; }
.eco-wish-btn.is-active { color: #dc2626; }
.eco-product-card__body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.eco-product-card__title { font-size: 0.98rem; margin: 0; }
.eco-product-card__rating { display: inline-flex; align-items: center; gap: 4px; color: #f59e0b; font-size: 0.85rem; font-weight: 700; }
.eco-product-card__stock { font-size: 0.8rem; }
.eco-product-card__stock.is-in { color: #15803d; }
.eco-product-card__stock.is-out { color: #dc2626; }
.eco-product-card__footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--eco-border); }
.eco-countdown { display: flex; justify-content: space-between; align-items: center; background: #fef2f2; color: #b91c1c; padding: 4px 8px; border-radius: 8px; font-size: 0.78rem; font-weight: 700; }

/* Drawers */
.eco-drawer[hidden] { display: none; }
.eco-drawer { position: fixed; inset: 0; z-index: 200; }
.eco-drawer__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); }
.eco-drawer__panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(400px, 92vw); background: var(--eco-surface); display: flex; flex-direction: column; box-shadow: var(--eco-shadow); }
.eco-drawer__panel--wide { width: min(720px, 94vw); }
.eco-drawer__header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--eco-border); }
.eco-drawer__close { background: transparent; border: none; cursor: pointer; color: var(--eco-text); }
.eco-drawer__body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.eco-drawer__footer { padding: 16px 20px; border-top: 1px solid var(--eco-border); }

/* Footer & Pages */
.eco-footer { background: #0f172a; color: #e2e8f0; padding: 48px 0 24px; margin-top: 48px; }
.eco-footer__grid { display: grid; gap: 28px; }
.eco-footer__grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.eco-footer__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.eco-footer__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
.eco-footer__title { color: #ffffff; font-size: 1.05rem; margin-bottom: 12px; }
.eco-footer__menu { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.eco-social-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.eco-social-links a { padding: 4px 10px; border-radius: 8px; background: rgba(255,255,255,0.1); font-size: 0.82rem; }
.eco-footer__bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 32px; padding-top: 18px; text-align: center; font-size: 0.88rem; color: #94a3b8; }
.eco-page-wrap { padding: 32px 0; }
.eco-page-card { background: var(--eco-surface); border: 1px solid var(--eco-border); border-radius: var(--eco-radius); padding: 28px; }
.eco-404-card { text-align: center; padding: 56px 24px; background: var(--eco-surface); border-radius: 18px; border: 1px solid var(--eco-border); }
.eco-404-code { font-size: 4rem; font-weight: 800; color: var(--eco-primary); }
.eco-form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.eco-form-group input, .eco-form-group textarea { padding: 10px 12px; border: 1px solid var(--eco-border); border-radius: 10px; font-family: inherit; background: var(--eco-bg); color: var(--eco-text); }
.eco-contact-grid, .eco-trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.eco-trust-card { background: var(--eco-surface); border: 1px solid var(--eco-border); border-radius: 14px; padding: 20px; margin-bottom: 20px; }
.eco-alert { padding: 14px 18px; border-radius: 10px; margin-top: 16px; }
.eco-alert--success { background: #dcfce7; color: #166534; }
.eco-alert--error { background: #fee2e2; color: #991b1b; }

@media (max-width: 1024px) {
  .eco-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .eco-header__nav { display: none; }
  .eco-mobile-menu-toggle { display: inline-flex; }
}
@media (max-width: 768px) {
  .eco-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eco-hero-card { grid-template-columns: 1fr; padding: 24px; }
  .eco-footer__grid--cols-3, .eco-footer__grid--cols-4 { grid-template-columns: 1fr; }
  .eco-header__search { display: none; }
}
