/*!
 * Schematic Parts – sp-astra-reset.css
 * Path: assets/css/sp-astra-reset.css
 * v3.4.1
 *
 * UNLAYERED – neutraliseerib Astra/Woo stiilid .sp-page sees.
 * Kasutab :where() et SP komponent-CSS ALATI võidaks.
 * Header ja footer jäävad Astra teema omad.
 */

/* ============================================================
 * 1) KONTEINER – Astra layout-piirangud AINULT .site-content sees
 *    NB: .site-content > .ast-container – EI mõjuta headerit/footerit!
 * ============================================================ */

/* ── 1) Ainult SISU konteiner – eemalda Astra piirangud ── */
body.sp-view .site-content > .ast-container {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  display: block;
}

body.sp-view .site-content {
  padding-top: 0;
  padding-bottom: 0;
}

body.sp-view #primary,
body.sp-view #primary.content-area {
  width: 100%;
  max-width: none;
  flex: 1 1 100%;
  float: none;
  margin: 0;
  padding: 0;
}

body.sp-view #secondary,
body.sp-view .sidebar,
body.sp-view .widget-area {
  display: none;
}

body.sp-view .sp-wrapper {
  max-width: none;
  margin: 0;
  padding: 0;
}

body.sp-view.ast-separate-container .ast-article-single,
body.sp-view.ast-separate-container .ast-article-post,
body.sp-view.ast-separate-container #primary {
  background: transparent;
  padding: 0;
  margin: 0;
}

body.sp-view.ast-separate-container .site-content > .ast-container,
body.sp-view.ast-plain-container .site-content > .ast-container {
  max-width: none;
  padding: 0;
}

body.sp-view .ast-archive-description,
body.sp-view .entry-header,
body.sp-view .page-header,
body.sp-view .ast-breadcrumbs-wrapper,
body.sp-view nav.woocommerce-breadcrumb {
  display: none;
}

/* ============================================================
 * 2) ELEMENT RESET – :where() = 0 spetsiifilisus
 * ============================================================ */

/* ── Buttons ── */
.sp-page :where(button),
.sp-page :where(button[type="button"]),
.sp-page :where(button[type="submit"]),
.sp-page :where(.button),
.sp-page :where(a.button) {
  background: transparent;
  background-color: transparent;
  background-image: none;
  color: inherit;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-transform: none;
  text-decoration: none;
  letter-spacing: normal;
  box-shadow: none;
  outline: none;
  min-height: 0;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
}

.sp-page :where(button:hover),
.sp-page :where(button:focus),
.sp-page :where(.button:hover),
.sp-page :where(.button:focus) {
  background: transparent;
  background-color: transparent;
  color: inherit;
  box-shadow: none;
  outline: none;
}

/* ── Inputs ── */
.sp-page :where(input[type="number"]),
.sp-page :where(input[type="search"]),
.sp-page :where(input[type="text"]),
.sp-page :where(input[type="email"]),
.sp-page :where(textarea) {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
  outline: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  height: auto;
  min-height: 0;
  line-height: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.sp-page :where(input:focus),
.sp-page :where(textarea:focus) {
  box-shadow: none;
  outline: none;
  border-color: inherit;
}

.sp-page :where(select) {
  background-image: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  height: auto;
  -webkit-appearance: none;
  appearance: none;
}

/* ── Table ── */
.sp-page :where(table) {
  border-collapse: collapse;
  border-spacing: 0;
  border: none;
}

.sp-page :where(th),
.sp-page :where(td) {
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  vertical-align: middle;
}

/* ── Links ── */
.sp-page :where(a) {
  color: inherit;
  text-decoration: none;
  outline: none;
}

/* ── Images ── */
.sp-page :where(img) {
  max-width: 100%;
  height: auto;
  border: none;
  box-shadow: none;
}

/* ── Forms ── */
.sp-page :where(form) {
  margin: 0;
  padding: 0;
}

/* Woo "View cart" link */
.sp-page :where(a.added_to_cart.wc-forward) {
  display: none;
}

/* ============================================================
 * 3) .sp-page baasstiilid – FIX #1: 1440px + ääred
 * ============================================================ */
.sp-page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px 40px 60px;
  box-sizing: border-box;
  min-width: 0;
}

.sp-page > h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 10px;
  color: #0f0f0f;
}

@media (max-width: 768px) {
  .sp-page {
    padding: 20px 20px 40px;
  }
  .sp-page > h1 {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .sp-page {
    padding: 12px 12px 32px;
  }
}

/* ============================================================
 * 4) RESPONSIVE – AINULT .site-content (mitte header!)
 * ============================================================ */
@media (max-width: 921px) {
  body.sp-view .site-content > .ast-container {
    padding-left: 0;
    padding-right: 0;
  }
  body.sp-view #primary {
    width: 100%;
    padding: 0;
    margin: 0;
  }
}
