/*
Theme Name: سورسز مارکت
Theme URI: https://sourcesmarket.local
Description: پوسته فرزند Storefront برای فروشگاه فارسی فایل‌های آموزشی پی‌دی‌اف.
Author: سورسز مارکت
Template: storefront
Version: 0.1.21
Text Domain: sourcesmarket
*/

@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100..900&display=swap");

:root {
  --sm-ink: #17211d;
  --sm-muted: #66746d;
  --sm-line: #d9e0dc;
  --sm-bg: #f7f4ee;
  --sm-surface: #ffffff;
  --sm-green: #16745a;
  --sm-green-dark: #0f4f40;
  --sm-saffron: #e7a928;
  --sm-coral: #d85f45;
  --sm-blue: #d8ece8;
  --sm-shadow: 0 18px 45px rgba(23, 33, 29, 0.12);
}

body.sourcesmarket-theme {
  direction: rtl;
  text-align: right;
  color: var(--sm-ink);
  background: var(--sm-bg);
  font-family: "Vazirmatn", Tahoma, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

body.sourcesmarket-theme input,
body.sourcesmarket-theme button,
body.sourcesmarket-theme select,
body.sourcesmarket-theme textarea {
  font-family: "Vazirmatn", Tahoma, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

.sourcesmarket-theme a {
  color: var(--sm-green-dark);
}

.sourcesmarket-theme .site {
  overflow-x: hidden;
}

.sourcesmarket-theme .site-header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--sm-line);
  margin-bottom: 0;
  padding-top: 1rem;
}

body.sourcesmarket-theme header#masthead.site-header {
  margin-bottom: 0 !important;
}

.sourcesmarket-theme .site-branding .site-title,
.sourcesmarket-theme .site-branding .site-title a {
  color: var(--sm-ink);
  font-size: 1.35rem;
  font-weight: 800;
}

.sourcesmarket-theme .site-branding .site-description {
  color: var(--sm-muted);
  font-size: 0.85rem;
}

.sourcesmarket-theme .main-navigation ul.menu > li > a,
.sourcesmarket-theme .main-navigation ul.nav-menu > li > a {
  color: var(--sm-ink);
  font-weight: 700;
}

body.sourcesmarket-theme #site-navigation > div.menu {
  display: none !important;
}

.sourcesmarket-theme .storefront-primary-navigation {
  border-top: 1px solid var(--sm-line);
}

.sourcesmarket-theme .main-navigation ul.menu > li > a,
.sourcesmarket-theme .main-navigation ul.nav-menu > li > a,
.sourcesmarket-theme .site-header-cart .cart-contents {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.sourcesmarket-theme .site-header-cart .cart-contents {
  color: var(--sm-green-dark);
}

.sourcesmarket-theme .site-header-cart .cart-contents .count {
  display: none;
}

.sourcesmarket-theme .site-header-cart .cart-contents .amount {
  font-weight: 900;
}

.sourcesmarket-theme .button,
.sourcesmarket-theme button,
.sourcesmarket-theme input[type="button"],
.sourcesmarket-theme input[type="reset"],
.sourcesmarket-theme input[type="submit"],
.sourcesmarket-theme .added_to_cart,
.sourcesmarket-theme .woocommerce a.button {
  border-radius: 6px;
  background: var(--sm-green);
  color: #fff;
  font-weight: 800;
  box-shadow: none;
}

.sourcesmarket-theme .button:hover,
.sourcesmarket-theme button:hover,
.sourcesmarket-theme input[type="submit"]:hover,
.sourcesmarket-theme .woocommerce a.button:hover {
  background: var(--sm-green-dark);
  color: #fff;
}

.sourcesmarket-theme .content-area,
.sourcesmarket-theme .site-main,
.sourcesmarket-theme .hentry {
  margin-bottom: 0;
}
body.sourcesmarket-theme.sourcesmarket-no-sidebar .widget-area {
  display: none !important;
}

@media (min-width: 768px) {
  body.sourcesmarket-theme.sourcesmarket-no-sidebar .content-area,
  body.sourcesmarket-theme.sourcesmarket-no-sidebar.right-sidebar .content-area,
  body.sourcesmarket-theme.sourcesmarket-no-sidebar.left-sidebar .content-area {
    float: none !important;
    width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }
}

.sourcesmarket-theme .site-content {
  background: var(--sm-bg);
}

.sourcesmarket-theme.woocommerce-page .site-main,
.sourcesmarket-theme.woocommerce-account .site-main,
.sourcesmarket-theme.woocommerce-cart .site-main,
.sourcesmarket-theme.woocommerce-checkout .site-main {
  padding-top: 2.25rem;
}

.sourcesmarket-theme .storefront-breadcrumb {
  margin: 0 0 1.25rem;
  padding: 1.25rem 0 0;
}

.sourcesmarket-theme .entry-header,
.sourcesmarket-theme .woocommerce-products-header {
  padding-bottom: 1.5rem;
}

.sourcesmarket-theme .entry-title,
.sourcesmarket-theme .woocommerce-products-header__title {
  color: var(--sm-ink);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
}

.sourcesmarket-theme.woocommerce-account .entry-header,
.sourcesmarket-theme.woocommerce-cart .entry-header,
.sourcesmarket-theme.woocommerce-checkout .entry-header {
  padding-bottom: 0.5rem;
}

.sourcesmarket-theme.woocommerce-account .entry-title,
.sourcesmarket-theme.woocommerce-cart .entry-title,
.sourcesmarket-theme.woocommerce-checkout .entry-title {
  margin-bottom: 0.5rem;
}

.sourcesmarket-theme.woocommerce-account .woocommerce h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 700;
}

.sourcesmarket-theme .woocommerce-info,
.sourcesmarket-theme .woocommerce-message,
.sourcesmarket-theme .woocommerce-error {
  border-right: 4px solid var(--sm-green);
  border-top: 0;
  background: rgba(216, 236, 232, 0.75);
  color: var(--sm-ink);
}

.sourcesmarket-theme .woocommerce-info::before,
.sourcesmarket-theme .woocommerce-message::before {
  color: var(--sm-green);
}

.sourcesmarket-theme .woocommerce-pagination ul.page-numbers {
  display: flex;
  direction: ltr;
  flex-direction: row;
  justify-content: center;
  gap: 0.35rem;
  padding: 0;
  unicode-bidi: isolate;
}

.sourcesmarket-theme .woocommerce-pagination ul.page-numbers li {
  display: block;
  margin: 0;
}

.sourcesmarket-theme .woocommerce-pagination .page-numbers {
  display: inline-flex;
  min-width: 2.45rem;
  min-height: 2.45rem;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  line-height: 1;
}

.sourcesmarket-theme .woocommerce-pagination a.prev.page-numbers,
.sourcesmarket-theme .woocommerce-pagination a.next.page-numbers {
  font-size: 1.45rem;
  font-weight: 900;
}

.sourcesmarket-theme .woocommerce-pagination a.prev.page-numbers span[aria-hidden],
.sourcesmarket-theme .woocommerce-pagination a.next.page-numbers span[aria-hidden] {
  display: none;
}

.sourcesmarket-theme .woocommerce-pagination a.prev.page-numbers::before,
.sourcesmarket-theme .woocommerce-pagination a.next.page-numbers::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-top: 0.34rem solid transparent;
  border-bottom: 0.34rem solid transparent;
}

.sourcesmarket-theme .woocommerce-pagination a.prev.page-numbers::before {
  border-left: 0.48rem solid currentColor;
}

.sourcesmarket-theme .woocommerce-pagination a.next.page-numbers::before {
  border-right: 0.48rem solid currentColor;
}

.sourcesmarket-theme .woocommerce-pagination a.prev.page-numbers::after,
.sourcesmarket-theme .woocommerce-pagination a.next.page-numbers::after {
  content: none !important;
}

.sourcesmarket-theme .woocommerce-error {
  border-right-color: var(--sm-coral);
  background: rgba(216, 236, 232, 0.5);
}

.sourcesmarket-theme .woocommerce form.login,
.sourcesmarket-theme .woocommerce form.checkout_coupon,
.sourcesmarket-theme .woocommerce form.register {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
  border: 1px solid var(--sm-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(23, 33, 29, 0.07);
}

.sourcesmarket-theme .woocommerce form .form-row input.input-text {
  border: 1px solid var(--sm-line);
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}
.sourcesmarket-theme.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
  max-width: 520px;
}

.sourcesmarket-theme.woocommerce-checkout #billing_email_field .description {
  margin-top: 0.45rem;
  color: var(--sm-muted);
  font-size: 0.92rem;
  line-height: 1.8;
}

.sourcesmarket-theme .site-info {
  color: var(--sm-muted);
  direction: rtl;
  text-align: center;
}
.sourcesmarket-theme .sm-footer-brand {
  display: block;
  margin-bottom: 1rem;
  font-weight: 800;
}

.sourcesmarket-theme .sm-footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 880px;
  margin: 0 auto;
  gap: 1.25rem;
  text-align: right;
}

.sourcesmarket-theme .sm-footer-group strong {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--sm-ink);
  font-size: 0.94rem;
  font-weight: 900;
}

.sourcesmarket-theme .sm-footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.sourcesmarket-theme .sm-footer-links a {
  color: var(--sm-green-dark);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.7;
  text-decoration: none;
}

.sourcesmarket-theme .sm-footer-links a:hover {
  text-decoration: underline;
}

.sm-home {
  background: var(--sm-bg);
}

.sm-section {
  padding: 4.5rem max(1.25rem, calc((100vw - 1180px) / 2));
}

.sm-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.6rem;
}

.sm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.8rem;
  color: var(--sm-green-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

.sm-eyebrow::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--sm-saffron);
}

.sm-section h1,
.sm-section h2,
.sm-section h3,
.sm-section p {
  letter-spacing: 0;
}

.sm-section h1,
.sm-section h2 {
  margin: 0;
  color: var(--sm-ink);
  font-weight: 900;
  line-height: 1.25;
}

.sm-section h1 {
  max-width: 13ch;
  font-size: clamp(2.25rem, 4.5vw, 4.25rem);
}

.sm-section h2 {
  font-size: clamp(1.7rem, 3vw, 2.7rem);
}

.sm-lede {
  max-width: 38rem;
  color: var(--sm-muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 2;
}

.sm-hero {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  min-height: clamp(500px, 68vh, 640px);
  align-items: center;
  gap: 3rem;
  padding-top: 3rem;
  padding-bottom: 2.5rem;
  background:
    linear-gradient(135deg, rgba(216, 236, 232, 0.9), rgba(255, 255, 255, 0.25) 42%, rgba(231, 169, 40, 0.16)),
    var(--sm-bg);
}

.sm-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.6rem 0 1.4rem;
}

.sm-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.85rem 1.15rem;
  font-weight: 900;
  text-decoration: none;
}

.sm-button-primary {
  background: var(--sm-green);
  color: #fff;
}

.sourcesmarket-theme a.sm-button-primary,
.sourcesmarket-theme a.sm-button-primary:visited {
  color: #fff;
}

.sm-button-primary:hover {
  background: var(--sm-green-dark);
  color: #fff;
}

.sm-button-secondary {
  border-color: var(--sm-line);
  background: #fff;
  color: var(--sm-ink);
}

.sm-search {
  display: grid;
  grid-template-columns: 1fr auto;
  max-width: 42rem;
  overflow: hidden;
  border: 1px solid var(--sm-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(23, 33, 29, 0.08);
}

.sm-search input[type="search"] {
  width: 100%;
  border: 0;
  background: #fff;
  padding: 1rem 1.1rem;
  color: var(--sm-ink);
  font-size: 1rem;
  box-shadow: none;
}

.sm-search button {
  border-radius: 0;
  padding: 0 1.4rem;
}

.sm-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.sm-proof {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(22, 116, 90, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--sm-green-dark);
  padding: 0.35rem 0.75rem;
  font-size: 0.86rem;
  font-weight: 800;
}

.sm-doc-stage {
  position: relative;
  min-height: 390px;
  isolation: isolate;
}

.sm-doc-card {
  position: absolute;
  width: min(230px, 54vw);
  min-height: 305px;
  border: 1px solid rgba(23, 33, 29, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--sm-shadow);
  transform: rotate(var(--tilt));
}

.sm-doc-card::before {
  content: "";
  display: block;
  height: 98px;
  border-radius: 8px 8px 0 0;
  background: var(--cover);
}

.sm-doc-card strong,
.sm-doc-card span {
  display: block;
  margin: 1.1rem 1.2rem 0;
}

.sm-doc-card strong {
  color: var(--sm-ink);
  font-size: 1.15rem;
}

.sm-doc-card span {
  color: var(--sm-muted);
  line-height: 1.8;
}

.sm-doc-card:nth-child(1) {
  --tilt: -7deg;
  --cover: linear-gradient(135deg, var(--sm-green), #5ab79e);
  top: 1rem;
  right: 10%;
  z-index: 3;
}

.sm-doc-card:nth-child(2) {
  --tilt: 6deg;
  --cover: linear-gradient(135deg, var(--sm-coral), #f2a37f);
  top: 5.5rem;
  left: 7%;
  z-index: 2;
}

.sm-doc-card:nth-child(3) {
  --tilt: 2deg;
  --cover: linear-gradient(135deg, var(--sm-saffron), #f2dd91);
  right: 26%;
  bottom: 0;
  z-index: 4;
}

.sm-categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 2.5rem;
}

.sm-category {
  min-height: 150px;
  border: 1px solid var(--sm-line);
  border-radius: 8px;
  background: var(--sm-surface);
  padding: 1.15rem;
  text-decoration: none;
}

.sm-category:hover {
  border-color: rgba(22, 116, 90, 0.35);
  box-shadow: 0 12px 28px rgba(23, 33, 29, 0.08);
}

.sm-category strong {
  display: block;
  color: var(--sm-ink);
  font-size: 1.05rem;
}

.sm-category span {
  display: block;
  margin-top: 0.55rem;
  color: var(--sm-muted);
  line-height: 1.7;
}

.sm-products {
  background: #fff;
}

.sm-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
}

.sm-product-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  border: 1px solid var(--sm-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  text-decoration: none;
}

.sm-product-card:hover {
  border-color: rgba(22, 116, 90, 0.35);
  box-shadow: 0 14px 32px rgba(23, 33, 29, 0.1);
}

.sm-product-cover,
.sm-product-cover-fallback {
  display: grid;
  min-height: 210px;
  place-items: center;
  background: linear-gradient(135deg, var(--sm-blue), #fff 62%, rgba(231, 169, 40, 0.38));
}

.sm-product-cover img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
}

.sm-product-cover-fallback span {
  border: 2px solid rgba(22, 116, 90, 0.32);
  border-radius: 6px;
  color: var(--sm-green-dark);
  padding: 1rem 1.1rem;
  font-weight: 900;
}

.sm-product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1rem;
}

.sm-product-kicker {
  color: var(--sm-green-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.sm-product-title {
  margin: 0.5rem 0 0;
  color: var(--sm-ink);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.65;
}

.sm-product-meta {
  margin: 0.5rem 0 1rem;
  color: var(--sm-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.sm-product-price {
  margin-top: auto;
  color: var(--sm-coral);
  font-weight: 900;
}

.sm-trust {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2rem;
  background: var(--sm-bg);
}

.sm-trust-list {
  display: grid;
  gap: 0.9rem;
}

.sm-trust-item {
  border-right: 4px solid var(--sm-green);
  background: rgba(255, 255, 255, 0.72);
  padding: 1rem 1.1rem;
}

.sm-trust-item h3 {
  margin: 0 0 0.35rem;
  color: var(--sm-ink);
  font-size: 1.05rem;
}

.sm-trust-item p {
  margin: 0;
  color: var(--sm-muted);
  line-height: 1.8;
}

.sm-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(22, 116, 90, 0.38);
  border-radius: 8px;
  background: rgba(216, 236, 232, 0.45);
  padding: 2rem;
}

.sm-empty h3 {
  margin: 0 0 0.75rem;
  color: var(--sm-ink);
  font-size: 1.2rem;
}

.sm-empty p {
  max-width: 44rem;
  margin: 0;
  color: var(--sm-muted);
  line-height: 1.9;
}

.sourcesmarket-theme ul.products li.product {
  border: 1px solid var(--sm-line);
  border-radius: 8px;
  background: #fff;
  padding: 0 0 1rem;
  overflow: hidden;
}

.sourcesmarket-theme ul.products li.product .woocommerce-loop-product__title {
  color: var(--sm-ink);
  font-weight: 900;
  line-height: 1.6;
}

.sourcesmarket-theme ul.products li.product .price {
  color: var(--sm-coral);
  font-weight: 900;
}

@media (max-width: 940px) {
  .sm-hero,
  .sm-trust {
    grid-template-columns: 1fr;
  }

  .sm-doc-stage {
    min-height: 360px;
  }

  .sm-categories,
  .sm-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .sm-section {
    padding: 3rem 1rem;
  }

  .sm-hero {
    min-height: auto;
    gap: 1.25rem;
    padding-top: 2.25rem;
    padding-bottom: 2rem;
  }

  .sm-section-header {
    display: block;
  }

  .sm-lede {
    line-height: 1.8;
  }

  .sm-search {
    grid-template-columns: 1fr;
  }

  .sm-search button {
    min-height: 48px;
  }

  .sm-hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
  }

  .sm-button {
    padding: 0.75rem 0.6rem;
    font-size: 0.9rem;
  }

  .sm-proof-row {
    justify-content: center;
  }

  .sm-proof {
    padding: 0.3rem 0.55rem;
    font-size: 0.78rem;
  }

  .sm-categories,
  .sm-product-grid {
    grid-template-columns: 1fr;
  }

  .sm-doc-stage {
    display: none;
  }
}
