/*
Theme Name: Nova Shop
Author: OpenAI
Author URI: https://openai.com/
Description: قالب اختصاصی، سریع و راست‌چین برای فروشگاه ووکامرسی نوا با رنگ‌بندی قابل تنظیم.
Version: 1.1.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: nova-shop
Tags: e-commerce, custom-colors, custom-logo, rtl-language-support, accessibility-ready
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --nova-primary: #5b4bdb;
  --nova-primary-strong: #4338ca;
  --nova-accent: #ffb020;
  --nova-ink: #172033;
  --nova-muted: #667085;
  --nova-surface: #ffffff;
  --nova-soft: #f5f6ff;
  --nova-line: #e7e9f3;
  --nova-success: #087e5b;
  --nova-danger: #c4334b;
  --nova-radius-sm: 12px;
  --nova-radius: 20px;
  --nova-radius-lg: 32px;
  --nova-shadow: 0 18px 55px rgba(29, 36, 68, .10);
  --nova-container: 1220px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--nova-ink);
  background: #fbfbfe;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .nova-header { top: 32px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button, [type="button"], [type="submit"] { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--nova-primary) 42%, transparent); outline-offset: 3px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.nova-container { width: min(calc(100% - 32px), var(--nova-container)); margin-inline: auto; }
.nova-section { padding-block: 82px; }
.nova-section--compact { padding-block: 54px; }
.nova-soft-section { background: var(--nova-soft); }
.nova-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--nova-primary-strong); font-size: .88rem; font-weight: 800; }
.nova-kicker::before { content: ""; width: 22px; height: 3px; border-radius: 999px; background: var(--nova-accent); }
.nova-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.nova-section-heading h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.55rem); line-height: 1.35; letter-spacing: -.04em; }
.nova-section-heading p { max-width: 590px; margin: 8px 0 0; color: var(--nova-muted); }
.nova-link { display: inline-flex; align-items: center; gap: 8px; color: var(--nova-primary-strong); font-weight: 800; white-space: nowrap; }
.nova-link::after { content: "←"; transition: transform .2s ease; }
.nova-link:hover::after { transform: translateX(-4px); }

/* Header */
.nova-topbar { background: var(--nova-ink); color: #fff; font-size: .82rem; }
.nova-topbar__inner { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.nova-topbar p { margin: 0; }
.nova-topbar a { color: #d9dcff; }
.nova-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(231,233,243,.85); backdrop-filter: blur(14px); }
.nova-header__inner { min-height: 78px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; }
.nova-brand { display: flex; align-items: center; gap: 10px; min-width: max-content; font-weight: 900; font-size: 1.12rem; }
.nova-brand__mark { width: 39px; height: 39px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--nova-primary), #8d7af2); border-radius: 13px 13px 13px 5px; box-shadow: 0 9px 24px color-mix(in srgb, var(--nova-primary) 30%, transparent); }
.nova-brand__mark svg { width: 23px; height: 23px; }
.nova-brand .custom-logo { max-height: 48px; width: auto; }
.nova-nav ul { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 0; padding: 0; list-style: none; }
.nova-nav a { display: block; padding: 9px 13px; border-radius: 10px; color: #3f4759; font-weight: 700; font-size: .94rem; }
.nova-nav a:hover, .nova-nav .current-menu-item > a { color: var(--nova-primary-strong); background: var(--nova-soft); }
.nova-actions { display: flex; align-items: center; gap: 9px; }
.nova-icon-button { position: relative; width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid var(--nova-line); border-radius: 13px; background: #fff; color: var(--nova-ink); }
.nova-icon-button:hover { color: var(--nova-primary); border-color: color-mix(in srgb, var(--nova-primary) 35%, var(--nova-line)); }
.nova-icon-button svg { width: 21px; height: 21px; }
.nova-cart-count { position: absolute; inset: -6px -6px auto auto; min-width: 20px; height: 20px; display: grid; place-items: center; padding-inline: 5px; border: 2px solid #fff; border-radius: 999px; background: var(--nova-accent); color: #332300; font-size: .68rem; font-weight: 900; }
.nova-menu-toggle { display: none; }

/* Hero */
.nova-hero { position: relative; overflow: hidden; padding: 72px 0 64px; background: radial-gradient(circle at 82% 22%, color-mix(in srgb, var(--nova-accent) 25%, transparent), transparent 30%), linear-gradient(135deg, #f8f7ff 0%, #f1f6ff 54%, #fff8e9 100%); }
.nova-hero::before { content: ""; position: absolute; inset: auto -110px -190px auto; width: 470px; height: 470px; border: 80px solid rgba(91,75,219,.06); border-radius: 50%; }
.nova-hero__grid { position: relative; display: grid; grid-template-columns: 1.04fr .96fr; align-items: center; gap: clamp(40px, 7vw, 92px); }
.nova-eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 7px 12px; border: 1px solid color-mix(in srgb, var(--nova-primary) 18%, white); border-radius: 999px; background: rgba(255,255,255,.74); color: var(--nova-primary-strong); font-size: .82rem; font-weight: 800; }
.nova-eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: var(--nova-success); box-shadow: 0 0 0 5px rgba(8,126,91,.12); }
.nova-hero h1 { max-width: 680px; margin: 20px 0 18px; font-size: clamp(2.5rem, 5vw, 5.25rem); line-height: 1.12; letter-spacing: -.06em; }
.nova-hero h1 em { color: var(--nova-primary); font-style: normal; }
.nova-hero__copy { max-width: 620px; margin: 0; color: var(--nova-muted); font-size: clamp(1rem, 1.4vw, 1.16rem); }
.nova-hero__buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.nova-button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit, .wp-element-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 11px 22px; border: 1px solid transparent; border-radius: 14px; background: var(--nova-primary); color: #fff; font-weight: 800; line-height: 1.3; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.nova-button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover { transform: translateY(-2px); background: var(--nova-primary-strong); color: #fff; box-shadow: 0 13px 30px color-mix(in srgb, var(--nova-primary) 28%, transparent); }
.nova-button--ghost { border-color: var(--nova-line); background: rgba(255,255,255,.82); color: var(--nova-ink); }
.nova-button--ghost:hover { color: var(--nova-primary-strong); background: #fff; box-shadow: var(--nova-shadow); }
.nova-hero__trust { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 34px; color: #4b5567; font-size: .88rem; font-weight: 700; }
.nova-hero__trust span { display: inline-flex; align-items: center; gap: 7px; }
.nova-hero__trust svg { width: 18px; height: 18px; color: var(--nova-success); }
.nova-hero-art { position: relative; min-height: 510px; }
.nova-hero-art__panel { position: absolute; inset: 36px 15px 18px 35px; overflow: hidden; border: 1px solid rgba(255,255,255,.75); border-radius: 44px 44px 44px 14px; background: linear-gradient(145deg, var(--nova-primary), #2f296e); box-shadow: 0 36px 80px rgba(50,43,118,.24); }
.nova-hero-art__panel::before { content: ""; position: absolute; inset: -40px -55px auto auto; width: 220px; height: 220px; border: 42px solid rgba(255,255,255,.09); border-radius: 50%; }
.nova-hero-art__product { position: absolute; inset: 18% 13% 12%; display: grid; place-items: center; border-radius: 34px; background: linear-gradient(145deg, rgba(255,255,255,.23), rgba(255,255,255,.08)); transform: rotate(-4deg); }
.nova-hero-art__product svg { width: 74%; height: 74%; filter: drop-shadow(0 26px 25px rgba(16,12,57,.30)); transform: rotate(4deg); }
.nova-float-card { position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 12px 15px; border: 1px solid rgba(255,255,255,.82); border-radius: 16px; background: rgba(255,255,255,.92); box-shadow: var(--nova-shadow); backdrop-filter: blur(10px); }
.nova-float-card strong { display: block; font-size: .88rem; }
.nova-float-card small { display: block; color: var(--nova-muted); font-size: .72rem; }
.nova-float-card__icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; background: #e9fff7; color: var(--nova-success); }
.nova-float-card--one { inset: 4px auto auto -8px; }
.nova-float-card--two { inset: auto -7px 44px auto; }

/* Category and benefits */
.nova-categories { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.nova-category { position: relative; overflow: hidden; min-height: 170px; padding: 24px; border: 1px solid var(--nova-line); border-radius: var(--nova-radius); background: var(--nova-surface); box-shadow: 0 9px 30px rgba(29,36,68,.05); }
.nova-category::after { content: ""; position: absolute; inset: auto -34px -43px auto; width: 120px; height: 120px; border-radius: 50%; background: color-mix(in srgb, var(--cat-color, var(--nova-primary)) 11%, transparent); transition: transform .25s ease; }
.nova-category:hover { border-color: color-mix(in srgb, var(--cat-color, var(--nova-primary)) 35%, var(--nova-line)); transform: translateY(-3px); }
.nova-category:hover::after { transform: scale(1.2); }
.nova-category__icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 15px; background: color-mix(in srgb, var(--cat-color, var(--nova-primary)) 12%, white); color: var(--cat-color, var(--nova-primary)); }
.nova-category__icon svg { width: 25px; height: 25px; }
.nova-category h3 { position: relative; z-index: 1; margin: 0; font-size: 1.06rem; }
.nova-category span { position: relative; z-index: 1; color: var(--nova-muted); font-size: .82rem; }
.nova-benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--nova-line); border-radius: var(--nova-radius); background: var(--nova-line); }
.nova-benefit { display: flex; align-items: center; gap: 13px; padding: 22px; background: #fff; }
.nova-benefit__icon { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--nova-soft); color: var(--nova-primary); }
.nova-benefit__icon svg { width: 22px; height: 22px; }
.nova-benefit strong { display: block; font-size: .9rem; }
.nova-benefit span { display: block; color: var(--nova-muted); font-size: .76rem; }

/* Products */
.woocommerce ul.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { float: none; width: auto; margin: 0; overflow: hidden; border: 1px solid var(--nova-line); border-radius: var(--nova-radius); background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.woocommerce ul.products li.product:hover { transform: translateY(-5px); box-shadow: var(--nova-shadow); }
.woocommerce ul.products li.product a img { aspect-ratio: 1 / .86; margin: 0; object-fit: cover; background: var(--nova-soft); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { padding: 18px 18px 6px; color: var(--nova-ink); font-size: 1rem; line-height: 1.65; }
.woocommerce ul.products li.product .price { min-height: 32px; padding: 0 18px; color: var(--nova-primary-strong); font-size: .94rem; font-weight: 900; }
.woocommerce ul.products li.product .button { width: calc(100% - 36px); min-height: 43px; margin: 12px 18px 18px; padding: 9px 13px; font-size: .84rem; }
.woocommerce span.onsale { inset: 12px 12px auto auto; min-width: auto; min-height: auto; margin: 0; padding: 6px 10px; border-radius: 999px; background: var(--nova-danger); line-height: 1.4; font-size: .72rem; }
.woocommerce div.product { margin-bottom: 50px; }
.woocommerce div.product div.images img { border-radius: var(--nova-radius); background: var(--nova-soft); }
.woocommerce div.product .product_title { font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.35; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--nova-primary-strong); font-weight: 900; }
.woocommerce .quantity .qty { min-height: 48px; border: 1px solid var(--nova-line); border-radius: 12px; }
.woocommerce-message, .woocommerce-info, .woocommerce-error { border: 0; border-radius: 14px; background: var(--nova-soft); }
.woocommerce-message { border-inline-start: 4px solid var(--nova-success); }
.woocommerce-info { border-inline-start: 4px solid var(--nova-primary); }
.woocommerce-error { border-inline-start: 4px solid var(--nova-danger); }
.woocommerce table.shop_table { overflow: hidden; border-color: var(--nova-line); border-radius: var(--nova-radius); background: #fff; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select { min-height: 48px; padding: 10px 12px; border: 1px solid var(--nova-line); border-radius: 12px; background: #fff; }
.select2-container--default .select2-selection--single { height: 48px; border-color: var(--nova-line); border-radius: 12px; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 46px; }

/* Story and newsletter */
.nova-story { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: clamp(35px, 7vw, 90px); }
.nova-story__visual { position: relative; min-height: 420px; border-radius: 40px 40px 12px 40px; background: linear-gradient(145deg, #fff3d4, #f0eeff); }
.nova-story__visual::before, .nova-story__visual::after { content: ""; position: absolute; border-radius: 28px; background: #fff; box-shadow: var(--nova-shadow); }
.nova-story__visual::before { inset: 55px 58px 95px 30px; transform: rotate(5deg); }
.nova-story__visual::after { inset: 92px 28px 55px 64px; background: linear-gradient(150deg, var(--nova-primary), #7d6dec); transform: rotate(-4deg); }
.nova-story__badge { position: absolute; z-index: 2; inset: auto 18px 28px auto; padding: 16px 22px; border-radius: 17px; background: #fff; box-shadow: var(--nova-shadow); }
.nova-story__badge strong { display: block; color: var(--nova-primary); font-size: 1.6rem; line-height: 1.1; }
.nova-story h2 { margin: 0 0 17px; font-size: clamp(1.8rem, 3.3vw, 3rem); line-height: 1.35; letter-spacing: -.04em; }
.nova-story p { color: var(--nova-muted); }
.nova-checklist { display: grid; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.nova-checklist li { display: flex; gap: 9px; font-weight: 700; }
.nova-checklist li::before { content: "✓"; flex: 0 0 24px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: #e8fff6; color: var(--nova-success); font-size: .78rem; }
.nova-newsletter { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 28px; padding: clamp(32px, 5vw, 58px); border-radius: var(--nova-radius-lg); background: linear-gradient(125deg, var(--nova-ink), #2f3750); color: #fff; }
.nova-newsletter h2 { margin: 0 0 7px; font-size: clamp(1.55rem, 3vw, 2.4rem); }
.nova-newsletter p { margin: 0; color: #c9cede; }
.nova-newsletter__form { display: flex; gap: 9px; min-width: min(100%, 420px); padding: 6px; border-radius: 16px; background: #fff; }
.nova-newsletter__form input { width: 100%; min-width: 190px; padding: 9px 13px; border: 0; outline: 0; }
.nova-newsletter__form button { min-height: 45px; padding-inline: 20px; border: 0; border-radius: 12px; background: var(--nova-accent); color: #332300; font-weight: 900; }

/* Content */
.nova-page-hero { padding: 52px 0 38px; background: var(--nova-soft); }
.nova-page-hero h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.3; }
.nova-page-hero p { max-width: 670px; margin: 10px 0 0; color: var(--nova-muted); }
.nova-content { padding-block: 55px 80px; }
.nova-entry { max-width: 820px; margin-inline: auto; }
.nova-entry > *:first-child { margin-top: 0; }
.nova-entry a:not(.button) { color: var(--nova-primary-strong); text-decoration: underline; text-underline-offset: 3px; }
.nova-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.nova-card { overflow: hidden; border: 1px solid var(--nova-line); border-radius: var(--nova-radius); background: #fff; }
.nova-card__body { padding: 22px; }
.nova-card h2 { margin: 0 0 9px; font-size: 1.18rem; }
.nova-card p { color: var(--nova-muted); }
.nova-empty { padding: 45px; border: 1px dashed var(--nova-line); border-radius: var(--nova-radius); background: #fff; text-align: center; }

/* Footer */
.nova-footer { padding: 70px 0 25px; background: #101626; color: #fff; }
.nova-footer__grid { display: grid; grid-template-columns: 1.35fr .65fr .65fr .9fr; gap: 45px; }
.nova-footer__about { max-width: 360px; color: #aeb6ca; font-size: .9rem; }
.nova-footer h3 { margin: 2px 0 18px; font-size: .95rem; }
.nova-footer ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.nova-footer li, .nova-footer a { color: #aeb6ca; font-size: .88rem; }
.nova-footer a:hover { color: #fff; }
.nova-footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 52px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); color: #8d97ad; font-size: .78rem; }

@media (max-width: 1024px) {
  .nova-header__inner { gap: 16px; }
  .nova-nav { position: fixed; inset: 117px 16px auto; display: none; padding: 13px; border: 1px solid var(--nova-line); border-radius: 18px; background: #fff; box-shadow: var(--nova-shadow); }
  .nova-nav.is-open { display: block; }
  .nova-nav ul { align-items: stretch; flex-direction: column; }
  .nova-nav a { padding: 11px 13px; }
  .nova-menu-toggle { display: grid; }
  .nova-hero__grid { grid-template-columns: 1fr 1fr; gap: 35px; }
  .nova-hero-art { min-height: 430px; }
  .nova-categories, .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nova-benefits { grid-template-columns: repeat(2, 1fr); }
  .nova-footer__grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .nova-footer__grid > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 782px) {
  body.admin-bar .nova-header { top: 46px; }
  .nova-section { padding-block: 60px; }
  .nova-topbar__inner { justify-content: center; text-align: center; }
  .nova-topbar__inner > :last-child { display: none; }
  .nova-header__inner { min-height: 70px; grid-template-columns: 1fr auto; }
  .nova-actions .nova-account { display: none; }
  .nova-nav { inset-block-start: 108px; }
  .nova-hero { padding-top: 50px; }
  .nova-hero__grid, .nova-story { grid-template-columns: 1fr; }
  .nova-hero h1 { font-size: clamp(2.45rem, 11vw, 4rem); }
  .nova-hero-art { min-height: 410px; }
  .nova-story__visual { min-height: 360px; order: 2; }
  .nova-section-heading { align-items: start; flex-direction: column; }
  .nova-newsletter { grid-template-columns: 1fr; }
  .nova-footer__grid { grid-template-columns: 1fr 1fr; }
  .nova-footer__grid > :first-child, .nova-footer__grid > :last-child { grid-column: 1 / -1; }
  .nova-post-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .nova-container { width: min(calc(100% - 22px), var(--nova-container)); }
  .nova-brand__name { font-size: .94rem; }
  .nova-actions { gap: 6px; }
  .nova-icon-button { width: 40px; height: 40px; }
  .nova-hero__buttons { flex-direction: column; }
  .nova-button { width: 100%; }
  .nova-hero-art { min-height: 330px; }
  .nova-hero-art__panel { inset: 26px 11px 15px; border-radius: 31px 31px 31px 10px; }
  .nova-float-card--one { inset-inline-start: 0; }
  .nova-float-card--two { inset-inline-end: 0; inset-block-end: 10px; }
  .nova-categories, .woocommerce ul.products, .nova-benefits, .nova-post-grid { grid-template-columns: 1fr; }
  .nova-benefit { padding: 18px; }
  .nova-newsletter__form { align-items: stretch; flex-direction: column; background: transparent; padding: 0; }
  .nova-newsletter__form input { min-height: 48px; border-radius: 12px; }
  .nova-footer__grid { grid-template-columns: 1fr; }
  .nova-footer__grid > * { grid-column: auto !important; }
  .nova-footer__bottom { align-items: start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
