/*
Theme Name: Yaripandi Woo
Theme URI: https://yaripandi.com.co/
Author: Codex
Description: WordPress + WooCommerce theme inspired by the Yaripandi Shopify export.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: yaripandi-woo
*/

:root {
  --yp-bg: #ffffff;
  --yp-soft: #f0f0ff;
  --yp-text: #3f3f7b;
  --yp-heading: #000000;
  --yp-muted: #5e5d89;
  --yp-border: #5b5b82;
  --yp-action: #000000;
  --yp-action-hover: #333333;
  --yp-accent: #825b5f;
  --yp-radius: 14px;
  --yp-product-radius: 17px;
  --yp-page: min(1120px, calc(100vw - 32px));
  --yp-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--yp-bg);
  color: var(--yp-text);
  font-family: var(--yp-font);
  font-size: 18px;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--yp-heading); }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }

.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;
}

.yp-shell {
  width: var(--yp-page);
  margin: 0 auto;
}

.yp-site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--yp-soft);
  border-bottom: 1px solid rgba(91, 91, 130, 0.22);
}

.yp-header-inner {
  min-height: 104px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}

.yp-brand {
  color: var(--yp-heading);
  font-weight: 800;
  font-size: 1.45rem;
  line-height: 1;
}

.yp-brand img {
  max-height: 99px;
  width: auto;
}

.yp-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--yp-heading);
  font-size: 1.125rem;
  font-weight: 700;
}

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

.yp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: 999px;
  padding: 6px 10px 6px 14px;
  background: rgba(255, 255, 255, 0.36);
}

.yp-search input {
  width: 160px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--yp-heading);
}

.yp-icon-button,
.yp-search button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--yp-heading);
  cursor: pointer;
}

.yp-cart {
  position: relative;
}

.yp-cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: var(--yp-heading);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
}

.yp-hero {
  min-height: 520px;
  display: grid;
  align-items: end;
  background:
    linear-gradient(rgba(18, 18, 18, 0.4), rgba(18, 18, 18, 0.4)),
    var(--yp-hero-image, radial-gradient(circle at 20% 20%, #f0f0ff, transparent 34%), linear-gradient(135deg, #5e5d89, #825b5f));
  background-position: center;
  background-size: cover;
  color: #fff;
}

.yp-hero-content {
  width: var(--yp-page);
  margin: 0 auto;
  padding: 100px 0 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.yp-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.7rem, 4vw, 2rem);
  line-height: 1.2;
  font-weight: 800;
}

.yp-button,
.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: 46px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--yp-radius);
  background: var(--yp-action);
  color: #fff;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.yp-button--secondary,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
  background: var(--yp-muted);
  color: #fff;
}

.yp-button:hover,
.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  background: var(--yp-action-hover);
  color: #fff;
}

.yp-section {
  padding: 48px 0;
}

.yp-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.yp-section-title,
.woocommerce-products-header__title,
.entry-title,
.product_title {
  margin: 0;
  color: var(--yp-heading);
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 800;
}

.yp-link {
  color: var(--yp-heading);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.yp-product-grid,
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.yp-products-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 24px) / 4);
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  padding-bottom: 10px;
}

.yp-products-scroll > * {
  scroll-snap-align: start;
}

.woocommerce ul.products li.product,
.yp-product-card {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  color: var(--yp-text);
}

.woocommerce ul.products li.product a img,
.yp-product-card img,
.yp-product-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 4px solid var(--yp-border);
  border-radius: var(--yp-product-radius);
  background: #f4f4ff;
  margin: 0 0 4px;
}

.yp-product-placeholder {
  display: grid;
  place-items: center;
  color: var(--yp-muted);
  font-weight: 800;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.yp-product-title {
  padding: 4px 0 0;
  margin: 0;
  color: var(--yp-text);
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 400;
}

.woocommerce ul.products li.product .price,
.yp-product-price,
.price {
  display: block;
  color: var(--yp-text);
  font-size: 1rem;
  font-weight: 800;
}

.woocommerce span.onsale {
  min-height: 28px;
  min-width: 52px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  line-height: 28px;
  padding: 0 10px;
  font-size: 0.75rem;
}

.yp-content,
.woocommerce-page .site-main {
  width: var(--yp-page);
  margin: 0 auto;
  padding: 48px 0;
}

.yp-product-page div.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 48px;
}

.woocommerce div.product div.images,
.woocommerce div.product div.summary {
  float: none;
  width: auto;
}

.woocommerce div.product div.images img {
  border-radius: 0;
}

.woocommerce div.product form.cart {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.woocommerce div.product form.cart .variations {
  width: 100%;
}

.quantity .qty {
  min-height: 46px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 4px;
  padding: 6px;
}

.yp-footer {
  border-top: 1px solid rgba(91, 91, 130, 0.15);
  padding: 30px 0 48px;
}

.yp-footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 20px;
  align-items: center;
}

.yp-footer h2 {
  margin: 0 0 6px;
  color: var(--yp-text);
  font-size: 1rem;
}

.yp-footer p {
  margin: 0;
  color: var(--yp-text);
  font-size: 1rem;
}

.yp-newsletter {
  display: flex;
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 999px;
  overflow: hidden;
}

.yp-newsletter input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 12px 18px;
  outline: 0;
}

.yp-newsletter button {
  width: 54px;
  border: 0;
  background: transparent;
  color: var(--yp-heading);
  cursor: pointer;
}

.yp-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 20px;
  font-size: 0.75rem;
}

.yp-social {
  display: flex;
  gap: 12px;
  align-items: center;
}

.yp-social a {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--yp-heading);
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-top-color: var(--yp-muted);
}

@media (max-width: 900px) {
  .yp-header-inner {
    grid-template-columns: 1fr auto;
    min-height: 86px;
  }

  .yp-nav {
    grid-column: 1 / -1;
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 12px;
  }

  .yp-menu {
    flex-wrap: nowrap;
    width: max-content;
  }

  .yp-search input {
    width: 112px;
  }

  .yp-product-grid,
  .woocommerce ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yp-products-scroll {
    grid-auto-columns: 60%;
  }

  .yp-product-page div.product,
  .yp-footer-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .yp-brand img { max-height: 72px; }
  .yp-header-tools { gap: 4px; }
  .yp-search { padding-left: 10px; }
  .yp-search input { width: 72px; }
  .yp-hero { min-height: 420px; }
  .yp-hero-content { align-items: flex-start; }
  .yp-products-scroll { grid-auto-columns: 72%; }
  .yp-section-header { align-items: flex-start; flex-direction: column; }
  .yp-footer-bottom { align-items: flex-start; flex-direction: column; }
}
