/*
Theme Name: Aria Mersad Shop
Theme URI: https://shop.ariamersad.com/
Author: Aria Mersad
Description: قالب فروشگاهی راست‌چین هماهنگ با هویت بصری ariamersad.com
Version: 1.3.2
Text Domain: aria-mersad-shop
*/

/* Exact fonts from ariamersad.com — hosted locally to avoid CORS */
@font-face {
  font-family: IranSans;
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url("assets/fonts/iran-sans-x-fa-num-light.woff2") format("woff2");
}
@font-face {
  font-family: IranSans;
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("assets/fonts/iran-sans-x-fa-num-thin.woff2") format("woff2");
}
@font-face {
  font-family: IranSans;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/iran-sans-x-fa-num-regular.woff2") format("woff2");
}
@font-face {
  font-family: IranSans;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/iran-sans-x-fa-num-medium.woff2") format("woff2");
}
@font-face {
  font-family: IranSans;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/iran-sans-x-fa-num-bold.woff2") format("woff2");
}
@font-face {
  font-family: IranSans;
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("assets/fonts/iran-sans-x-fa-num-extra-bold.woff2") format("woff2");
}
@font-face {
  font-family: Titillium;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/titillium-regular.woff") format("woff");
}

.font-en,
.am-copyright [dir="ltr"] {
  font-family: Titillium, IranSans, sans-serif;
}

/* Prices/qty use IranSans FA-Num so digits render Persian */
.woocommerce .price,
.woocommerce ul.products li.product .price,
.woocommerce .quantity .qty,
.am-btn-cart .count {
  font-family: IranSans, Tahoma, sans-serif;
  font-variant-numeric: normal;
}

:root {
  --am-primary: #159b82;
  --am-primary-dark: #07977d;
  --am-bg: #f2f2f2;
  --am-white: #ffffff;
  --am-text: #000000;
  --am-title: #1e1e1e;
  --am-muted: #747474;
  --am-line: #e7e7e7;
  --am-dark: #151617;
  --am-footer-border: #159b82;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
}

body {
  margin: 0;
  padding: 0;
  direction: rtl;
  background: var(--am-bg);
  color: var(--am-text);
  font-family: IranSans, Tahoma, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 2em;
  min-width: 320px;
}

a {
  color: var(--am-primary);
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

a:hover {
  color: var(--am-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

/* ===== Header (match ariamersad.com) ===== */
.am-header {
  background: var(--am-white);
  width: 100%;
  min-height: 100px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.am-header .container,
.am-header .row {
  width: 100%;
  height: 100%;
  min-height: 100px;
}

.am-header .col-menu {
  flex: 1 1 62%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.am-header .col-search {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 12px;
}

.am-header .col-logo {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-right: auto;
}

.am-header .col-logo a {
  display: block;
}

.am-header .col-logo img {
  width: 100%;
  max-width: 192px;
  display: block;
}

.am-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.am-menu > li {
  position: relative;
}

.am-menu > li > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  color: #000;
  font-weight: 500;
  font-size: 15px;
}

.am-menu > li > a:hover,
.am-menu > li:hover > a,
.am-menu > li.current-menu-item > a {
  color: var(--am-primary);
}

.am-menu .submenu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--am-line);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  padding: 12px 0;
  z-index: 20;
}

.am-menu > li:hover > .submenu {
  display: block;
}

.am-menu .submenu a {
  display: block;
  padding: 10px 18px;
  color: #1e1e1e;
}

.am-menu .submenu a:hover {
  background: #f0f1f1;
  color: var(--am-primary);
}

.am-btn-search,
.am-btn-cart {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
}

.am-btn-search:hover,
.am-btn-cart:hover {
  color: var(--am-primary);
}

.am-btn-cart {
  position: relative;
}

.am-btn-cart .count {
  position: absolute;
  top: 2px;
  left: 2px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--am-primary);
  color: #fff;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.am-mobile-toggle {
  display: none;
  width: 36px;
  height: 24px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.am-mobile-toggle span {
  display: block;
  height: 2px;
  background: #000;
  margin: 5px 0;
}

/* ===== Main ===== */
.site-main {
  min-height: 50vh;
  padding: 40px 0 24px;
}

.section-title {
  display: flex;
  align-items: center;
  margin: 0 0 28px;
}

.section-title .title {
  color: var(--am-title);
  font-size: 28px;
  font-weight: 700;
  position: relative;
  padding-right: 36px;
}

.section-title .title::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 24px;
  height: 6px;
  background: var(--am-primary);
}

.hero {
  background: var(--am-white);
  border: 1px solid var(--am-line);
  border-radius: 8px;
  padding: 36px;
  margin-bottom: 40px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.4;
  color: var(--am-title);
}

.hero p {
  color: var(--am-muted);
  font-size: 15px;
  margin: 0 0 22px;
}

.btn-am,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
button.button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--am-primary) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 6px;
  padding: 10px 22px;
  font-family: IranSans, Tahoma, sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.btn-am:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
  background: var(--am-primary-dark) !important;
}

.btn-am-outline {
  background: transparent !important;
  color: var(--am-primary) !important;
  border: 1px solid var(--am-primary) !important;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.am-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.am-card {
  background: #fff;
  border: 1px solid var(--am-line);
  border-radius: 8px;
  padding: 20px;
  color: inherit;
  display: block;
}

.am-card--service {
  padding: 0;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.am-card--service:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(21, 155, 130, 0.14);
  color: inherit;
}

.am-card__media {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #eaeaea;
}

.am-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.am-card--service h3,
.am-card--service p {
  padding: 0 18px;
}

.am-card--service h3 {
  margin: 14px 0 6px;
}

.am-card--service p {
  padding-bottom: 18px;
}

.am-card h3 {
  margin: 0 0 8px;
  color: var(--am-title);
  font-size: 18px;
}

.am-card p {
  margin: 0;
  color: var(--am-muted);
}

.content-box {
  background: #fff;
  border: 1px solid var(--am-line);
  border-radius: 8px;
  padding: 24px;
}

/* WooCommerce product grid — equal cards, no float/clear drift */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: stretch;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
  display: none !important;
  content: none !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.woocommerce ul.products li.product.first,
.woocommerce ul.products li.product.last {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  clear: none !important;
  margin: 0 !important;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--am-line);
  border-radius: 8px;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  box-sizing: border-box;
  position: relative;
}

.woocommerce ul.products li.product .woocommerce-LoopProduct-link {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  color: inherit;
}

.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  margin: 0 0 12px;
  border-radius: 6px;
  background: #f0f0f0;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 16px;
  line-height: 1.55;
  color: var(--am-title);
  margin: 0 0 8px;
  min-height: 3.1em;
}

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price {
  color: var(--am-primary) !important;
  font-weight: 700;
  margin: 0 0 12px;
  display: block;
}

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.button {
  margin-top: auto !important;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.woocommerce span.onsale {
  background: var(--am-primary);
}

.woocommerce-message,
.woocommerce-info {
  border-top-color: var(--am-primary);
}

.woocommerce-message::before,
.woocommerce-info::before {
  color: var(--am-primary);
}

/* ===== Footer (match ariamersad.com) ===== */
.am-footer {
  background-color: #151617;
  background-image: url("https://www.ariamersad.com/template/default/fa/assets/images/bg-footer.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: bottom right;
  padding-top: 72px;
  margin-top: 64px;
  border-top: 18px solid var(--am-footer-border);
  color: #fff;
}

.am-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 1.3fr 0.8fr;
  gap: 28px;
  align-items: start;
}

.am-footer .col-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.am-footer .logo-link {
  display: block;
  max-width: 260px;
}

.am-footer .social-items {
  display: flex;
  gap: 16px;
  align-items: center;
}

.am-footer .social-items a {
  color: var(--am-primary);
  font-size: 28px;
}

.am-footer .social-items a:hover {
  color: #eaeaea;
}

.am-footer .links-box {
  display: flex;
  gap: 28px;
}

.am-footer .links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.am-footer .links a {
  color: #eaeaea;
}

.am-footer .links a:hover {
  color: var(--am-primary);
}

.am-footer .contact-items {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.am-footer .contact-items .item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #fff;
  font-size: 14px;
  line-height: 1.8;
}

.am-footer .contact-items .item i {
  color: var(--am-primary);
  margin-top: 6px;
}

.am-footer .contact-items a {
  color: #fff;
  font-weight: 700;
}

.am-footer .contact-items a:hover {
  color: var(--am-primary);
}

.am-footer .certificates {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.am-footer .certificates img {
  width: 72px;
  height: auto;
  background: #fff;
  border-radius: 6px;
  padding: 4px;
}

.am-copyright {
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0 28px;
  color: #989a9e;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 991px) {
  .am-header .col-menu {
    display: none;
  }

  .am-mobile-toggle {
    display: block;
  }

  .am-header .col-logo {
    margin-right: 0;
  }

  .am-grid-4,
  .woocommerce ul.products,
  .am-footer .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .hero {
    padding: 22px;
  }

  .am-grid-4,
  .woocommerce ul.products,
  .am-footer .footer-grid {
    grid-template-columns: 1fr;
  }

  .am-header .col-logo img {
    max-width: 140px;
  }
}

/* Mobile drawer */
.am-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
}

.am-drawer.open {
  display: block;
}

.am-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.am-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100%;
  background: #fff;
  padding: 24px 18px;
  overflow: auto;
}

.am-drawer__panel a {
  display: block;
  padding: 12px 8px;
  color: #1e1e1e;
  border-bottom: 1px solid var(--am-line);
}

.am-drawer__close {
  border: 0;
  background: transparent;
  font-size: 22px;
  margin-bottom: 12px;
  cursor: pointer;
}
