/*
Theme Name: Super Mary
Theme URI: https://example.com/
Description: Tema hijo de Storefront para la tienda WooCommerce de Super Mary.
Author: Super Mary
Version: 0.3.0
Template: storefront
Text Domain: super-mary
Requires at least: 6.6
Requires PHP: 8.1
WC requires at least: 9.0
*/

:root {
  --sm-red: #ef1c22;
  --sm-yellow: #fff300;
  --sm-charcoal: #202020;
  --sm-white: #ffffff;
  --sm-cream: #fff8d6;
  --sm-dark-red: #b81218;
  --sm-line: #d8dde3;
}

/* Cabecera comercial: buscador y accesos de compra primero. */
.site-header {
  padding: 0;
  border: 0;
  background: var(--sm-white);
}

.site-header > .col-full {
  max-width: none;
  margin: 0;
  padding: 0;
}

.sm-commerce-header,
.sm-commerce-header * {
  box-sizing: border-box;
}

.sm-commerce-header {
  width: 100%;
  background: var(--sm-white);
  color: var(--sm-charcoal);
  font-family: Arial, Helvetica, sans-serif;
}

.sm-header-main {
  width: min(100% - 48px, 1440px);
  min-height: 94px;
  display: grid;
  grid-template-columns: 230px minmax(320px, 640px) minmax(260px, auto);
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin: 0 auto;
}

.sm-header-logo {
  width: 210px;
  display: block;
}

.sm-header-logo img {
  width: 100%;
  height: 76px;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.sm-product-search {
  min-width: 0;
  height: 44px;
  display: grid;
  grid-template-columns: 1fr 48px;
  margin: 0;
  border: 1px solid #bdc5cf;
  border-radius: 5px;
  background: var(--sm-white);
  overflow: hidden;
}

.sm-product-search:focus-within {
  border-color: var(--sm-red);
  box-shadow: 0 0 0 2px rgba(237, 28, 36, .12);
}

.sm-product-search input[type="search"] {
  width: 100%;
  min-width: 0;
  height: 42px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--sm-charcoal);
  font-size: 16px;
}

.sm-product-search input[type="search"]:focus {
  outline: 0;
  background: transparent;
}

.sm-product-search button {
  width: 48px;
  height: 42px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--sm-red);
}

.sm-product-search button:hover,
.sm-product-search button:focus {
  background: #fff1f2;
  color: var(--sm-dark-red);
}

.sm-product-search .dashicons {
  width: 22px;
  height: 22px;
  font-size: 22px;
}

.sm-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.sm-account-link,
.sm-cart-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.sm-account-link {
  min-width: 126px;
  padding: 10px 18px;
  border-radius: 25px;
  background: var(--sm-red);
  color: var(--sm-white);
}

.sm-account-link:hover,
.sm-account-link:focus {
  background: var(--sm-dark-red);
  color: var(--sm-white);
}

.sm-account-link .dashicons {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

.sm-cart-link {
  min-width: 108px;
  padding: 8px 12px;
  border: 1px solid var(--sm-line);
  border-radius: 25px;
  color: var(--sm-charcoal);
}

.sm-cart-link:hover,
.sm-cart-link:focus {
  border-color: var(--sm-red);
  color: var(--sm-red);
}

.sm-cart-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.sm-cart-icon > .dashicons {
  width: 25px;
  height: 25px;
  font-size: 25px;
}

.sm-cart-count {
  position: absolute;
  top: -10px;
  right: -11px;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid var(--sm-white);
  border-radius: 10px;
  background: var(--sm-red);
  color: var(--sm-white);
  font-size: 10px;
  line-height: 1;
}

.sm-category-nav {
  border-top: 1px solid #f1f2f4;
  border-bottom: 1px solid var(--sm-line);
  background: var(--sm-white);
}

.sm-category-track {
  width: min(100% - 48px, 1440px);
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: thin;
}

.sm-category-track a {
  min-height: 44px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  color: var(--sm-charcoal);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.sm-category-track a:hover,
.sm-category-track a:focus {
  color: var(--sm-red);
}

.sm-category-track .dashicons {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

@media (max-width: 1040px) {
  .sm-header-main {
    grid-template-columns: 190px minmax(260px, 1fr) auto;
    gap: 18px;
  }

  .sm-header-logo {
    width: 180px;
  }

  .sm-account-link,
  .sm-cart-link {
    min-width: 46px;
    padding-inline: 13px;
  }

  .sm-account-link > span:last-child,
  .sm-cart-label {
    display: none;
  }
}

@media (max-width: 680px) {
  .sm-header-main {
    width: calc(100% - 28px);
    min-height: 132px;
    grid-template-columns: 1fr 46px 46px;
    grid-template-rows: 70px 48px;
    gap: 7px 8px;
  }

  .sm-header-logo {
    width: min(180px, 100%);
  }

  .sm-header-logo img {
    height: 64px;
  }

  .sm-product-search {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 44px;
  }

  .sm-product-search input[type="search"] {
    font-size: 15px;
  }

  .sm-header-actions {
    display: contents;
  }

  .sm-account-link,
  .sm-cart-link {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
  }

  .sm-account-link {
    grid-column: 2;
    grid-row: 1;
  }

  .sm-cart-link {
    grid-column: 3;
    grid-row: 1;
  }

  .sm-category-track {
    width: 100%;
    min-height: 56px;
    justify-content: flex-start;
    gap: 4px;
    padding: 0 14px;
  }

  .sm-category-track a {
    min-height: 42px;
    padding-inline: 9px;
    font-size: 14px;
  }
}

/* Stage 4: commerce homepage */
.home .site-content > .col-full {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.home .site-main,
.home .widget-area {
  display: none;
}

.home .sm-home {
  display: block;
}

.sm-home {
  width: min(1180px, calc(100% - 40px));
  margin: 28px auto 58px;
  color: #111;
}

.sm-home a {
  text-decoration: none;
}

.sm-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(430px, 0.98fr);
  min-height: 420px;
  overflow: hidden;
  border: 1px solid #ececec;
  border-radius: 26px;
  background: linear-gradient(118deg, #fff 0%, #fff 48%, #f7f7f7 100%);
  box-shadow: 0 18px 48px rgba(17, 17, 17, 0.08);
}

.sm-hero::before {
  position: absolute;
  inset: auto auto -150px -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(255, 196, 0, 0.2);
  content: "";
}

.sm-hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: 48px 24px 40px 54px;
}

.sm-eyebrow {
  margin: 0 0 10px;
  color: #ed1c24;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.sm-hero h1 {
  max-width: 600px;
  margin: 0;
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(42px, 4vw, 62px);
  font-weight: 900;
  line-height: 0.99;
  letter-spacing: -0.045em;
}

.sm-hero h1 em {
  color: #ed1c24;
  font-style: normal;
}

.sm-hero-lead {
  max-width: 490px;
  margin: 22px 0 24px;
  color: #555;
  font-size: 18px;
  line-height: 1.45;
}

.sm-primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 23px;
  border-radius: 10px;
  background: #ed1c24;
  color: #fff !important;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(237, 28, 36, 0.22);
  transition: transform 160ms ease, background-color 160ms ease;
}

.sm-primary-button:hover {
  background: #c81018;
  color: #fff;
  transform: translateY(-2px);
}

.sm-hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.sm-hero-facts > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.sm-hero-facts .dashicons {
  width: 22px;
  height: 22px;
  color: #ed1c24;
  font-size: 22px;
}

.sm-hero-facts p,
.sm-benefits p {
  margin: 0;
  line-height: 1.18;
}

.sm-hero-facts strong,
.sm-benefits strong {
  display: block;
  font-size: 13px;
}

.sm-hero-facts small,
.sm-benefits small {
  display: block;
  margin-top: 4px;
  color: #727272;
  font-size: 11px;
}

.sm-hero-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
  background: radial-gradient(circle at 52% 46%, #fff 0%, #f4f4f4 68%, #ededed 100%);
}

.sm-hero-visual::after {
  position: absolute;
  right: 6%;
  bottom: 28px;
  left: 6%;
  height: 32px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.13);
  filter: blur(14px);
  content: "";
}

.sm-hero-visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: 405px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 16px 16px rgba(17, 17, 17, 0.13));
}

.sm-hero-badge {
  position: absolute;
  z-index: 2;
  top: 28px;
  right: 28px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #ffc400;
  color: #111;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  transform: rotate(3deg);
}

.sm-home-section {
  margin-top: 44px;
}

.sm-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.sm-section-heading h2 {
  margin: 0;
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(27px, 2.5vw, 36px);
  font-weight: 900;
  letter-spacing: -0.035em;
}

.sm-section-heading > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #111;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.sm-section-heading > a:hover {
  color: #ed1c24;
}

.sm-category-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
}

.sm-category-grid > a {
  display: flex;
  min-width: 0;
  min-height: 116px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 12px 6px;
  border: 1px solid #e7e7e7;
  border-radius: 15px;
  background: #fff;
  color: #232323;
  box-shadow: 0 6px 20px rgba(17, 17, 17, 0.045);
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.sm-category-grid > a:hover {
  border-color: #ed1c24;
  color: #ed1c24;
  box-shadow: 0 10px 26px rgba(17, 17, 17, 0.08);
  transform: translateY(-3px);
}

.sm-category-grid strong {
  overflow: hidden;
  font-size: 13px;
  text-align: center;
  text-overflow: ellipsis;
}

.sm-category-icon {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff7d8;
  color: #ed1c24;
}

.sm-category-icon .dashicons {
  width: 27px;
  height: 27px;
  font-size: 27px;
}

.sm-product-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 13px;
}

.sm-product-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 13px;
  border: 1px solid #e7e7e7;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.055);
}

.sm-stock-pill {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eaf7ec;
  color: #267536;
  font-size: 10px;
  font-weight: 800;
}

.sm-product-image {
  display: flex;
  height: 142px;
  align-items: center;
  justify-content: center;
  margin: 2px 0 12px;
  border-radius: 12px;
  background: #fafafa;
}

.sm-product-image img {
  width: 100%;
  height: 132px;
  margin: 0;
  object-fit: contain;
  transition: transform 160ms ease;
}

.sm-product-image:hover img {
  transform: scale(1.035);
}

.sm-product-type {
  margin: 0 0 4px;
  color: #8a8a8a;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.sm-product-card h3 {
  min-height: 38px;
  margin: 0 0 6px;
  color: #222;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.sm-product-price {
  display: block;
  margin-bottom: 13px;
  color: #111;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.sm-product-action {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 7px;
}

.sm-product-action input {
  width: 52px;
  height: 40px;
  margin: 0;
  padding: 0 3px 0 8px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-weight: 700;
}

.sm-product-action a {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #ed1c24;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.sm-product-action a:hover {
  background: #c81018;
  color: #fff;
}

.sm-minimum-notice {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding: 22px 26px;
  border: 1px solid #f0d361;
  border-radius: 16px;
  background: #fff7d8;
}

.sm-minimum-notice > .dashicons {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffc400;
  color: #111;
  font-size: 23px;
}

.sm-minimum-notice strong {
  display: block;
  color: #111;
  font-size: 17px;
}

.sm-minimum-notice p {
  margin: 2px 0 0;
  color: #585858;
  font-size: 13px;
}

.sm-minimum-notice > a {
  color: #111;
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.sm-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid #e7e7e7;
  border-radius: 16px;
  background: #e7e7e7;
}

.sm-benefits > div {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 88px;
  padding: 18px 24px;
  background: #fff;
}

.sm-benefits .dashicons {
  width: 34px;
  height: 34px;
  color: #ed1c24;
  font-size: 34px;
}

.sm-home a:focus-visible,
.sm-home input:focus-visible {
  outline: 3px solid #0072bc;
  outline-offset: 3px;
}

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

  .sm-hero-copy {
    padding-left: 38px;
  }

  .sm-category-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .sm-home {
    width: min(100% - 28px, 620px);
    margin-top: 18px;
  }

  .sm-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .sm-hero-copy {
    grid-row: 2;
    padding: 30px 24px 28px;
  }

  .sm-hero-visual {
    grid-row: 1;
    min-height: 280px;
  }

  .sm-hero-visual img {
    max-height: 280px;
  }

  .sm-hero-badge {
    top: 18px;
    right: 18px;
  }

  .sm-hero h1 {
    font-size: clamp(38px, 12vw, 52px);
  }

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

  .sm-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .sm-minimum-notice {
    grid-template-columns: 46px 1fr;
  }

  .sm-minimum-notice > a {
    grid-column: 2;
  }

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

@media (max-width: 460px) {
  .sm-hero-copy {
    padding-inline: 19px;
  }

  .sm-hero-lead {
    font-size: 16px;
  }

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

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

  .sm-product-image {
    height: 190px;
  }

  .sm-product-image img {
    height: 178px;
  }

  .sm-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }
}
