/*
Theme Name: Sharom Código
Theme URI: https://sharomcollection.com/
Author: Sharom Collection
Description: Tema ligero y personalizado para Sharom Collection, integrado con WooCommerce y sin dependencia de constructores visuales.
Version: 0.1.6
Requires at least: 6.8
Requires PHP: 8.2
Text Domain: sharom-codigo
*/

:root {
  --sharom-purple: #aa9cc3;
  --sharom-purple-dark: #6f597f;
  --sharom-purple-soft: #eee9f5;
  --sharom-pink: #d98ab6;
  --sharom-ink: #18151d;
  --sharom-muted: #6f6a75;
  --sharom-line: #e7e3ea;
  --sharom-bg: #faf9fb;
  --sharom-white: #fff;
  --sharom-radius: 22px;
  --sharom-shadow: 0 18px 45px rgba(40, 28, 52, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--sharom-ink);
  background: var(--sharom-white);
  font-family: "Open Sans", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .sharom-header { top: 32px; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus { width: auto; height: auto; clip: auto; padding: 12px; z-index: 99999; background: #fff; }
.sharom-container { width: min(1140px, calc(100% - 40px)); margin-inline: auto; }
.sharom-section { padding: 72px 0; }
.sharom-section--soft { background: var(--sharom-bg); }
.sharom-section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.sharom-eyebrow { margin: 0 0 8px; color: var(--sharom-purple-dark); font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, h4, h5, h6 { margin-top: 0; font-family: Poppins, Arial, sans-serif; line-height: 1.12; }
.sharom-title { margin-bottom: 0; font-size: clamp(1.8rem, 3vw, 2.8rem); }
.sharom-btn,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border: 0; border-radius: 999px;
  color: #fff; background: var(--sharom-purple-dark); font-weight: 800; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.sharom-btn:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover { color: #fff; background: #544061; transform: translateY(-2px); box-shadow: 0 10px 25px rgba(80, 55, 94, .22); }
.sharom-btn--light { color: var(--sharom-ink); background: #fff; }
.sharom-btn--light:hover { color: var(--sharom-ink); background: #fff; }

/* Header */
.sharom-header { position: sticky; top: 0; z-index: 1000; background: #fff; box-shadow: 0 6px 22px rgba(28, 20, 35, .08); }
.sharom-header-main { background: var(--sharom-purple); }
.sharom-header-main .sharom-container { min-height: 86px; display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 26px; }
.sharom-logo img { max-height: 72px; width: auto; }
.sharom-search { position: relative; }
.sharom-search form { display: flex; }
.sharom-search input[type="search"] { width: 100%; min-height: 46px; padding: 10px 52px 10px 18px; border: 0; border-radius: 9px; background: #fff; outline: none; }
.sharom-search button { position: absolute; right: 5px; top: 5px; width: 38px; height: 36px; border: 0; background: transparent; font-size: 0; cursor: pointer; }
.sharom-search button::before { content: "⌕"; font-size: 28px; font-weight: 800; color: #111; }
.sharom-header-actions { display: flex; align-items: center; gap: 14px; font-weight: 800; }
.sharom-header-actions a { display: inline-flex; align-items: center; gap: 7px; }
.sharom-action-icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sharom-cart-link { min-height: 44px; padding: 6px 10px; border-radius: 12px; }
.sharom-cart-link:hover { background: rgba(255,255,255,.24); }
.sharom-cart-label { font-size: .88rem; }
.sharom-cart-live { display: inline-flex; align-items: center; gap: 7px; }
.sharom-cart-count { min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: #fff; color: var(--sharom-purple-dark); font-size: .75rem; }
.sharom-nav-row { border-bottom: 1px solid var(--sharom-line); }
.sharom-nav-row .sharom-container { min-height: 70px; display: grid; grid-template-columns: 210px 1fr auto; align-items: center; gap: 24px; }
.sharom-category-button { align-self: stretch; display: flex; align-items: center; justify-content: center; background: var(--sharom-purple); color: #fff; font-size: .82rem; font-weight: 800; text-transform: uppercase; }
.sharom-menu, .sharom-menu ul { margin: 0; padding: 0; list-style: none; }
.sharom-menu > ul, .sharom-menu { display: flex; justify-content: center; align-items: center; gap: 28px; }
.sharom-menu a { padding: 12px 0; font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.sharom-menu a:hover, .sharom-menu .current-menu-item > a { color: var(--sharom-purple-dark); }
.sharom-whatsapp-top { padding: 12px 18px; border-radius: 5px; color: #fff; background: var(--sharom-purple); font-weight: 800; white-space: nowrap; }
.sharom-menu-toggle { display: none; width: 46px; height: 42px; border: 1px solid rgba(255,255,255,.7); border-radius: 10px; color: #fff; background: transparent; font-size: 1.45rem; cursor: pointer; }

/* Home */
.sharom-hero { min-height: 540px; display: grid; align-items: stretch; background-color: #8f8598; background-position: center; background-size: cover; }
.sharom-hero .sharom-container { display: flex; justify-content: flex-end; align-items: center; }
.sharom-hero-card { width: min(420px, 100%); margin: 42px 0; padding: 42px; border-radius: var(--sharom-radius); color: #fff; background: linear-gradient(145deg, rgba(65, 45, 79, .92), rgba(112, 64, 142, .78)); backdrop-filter: blur(4px); box-shadow: var(--sharom-shadow); }
.sharom-hero-card h1 { margin-bottom: 20px; font-size: clamp(2rem, 4vw, 3rem); }
.sharom-hero-card p { margin: 0 0 26px; font-size: 1.05rem; }
.sharom-category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.sharom-category-card { position: relative; min-height: 430px; overflow: hidden; border-radius: var(--sharom-radius); background: #ddd center/cover no-repeat; box-shadow: var(--sharom-shadow); }
.sharom-category-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(20, 12, 26, .82)); }
.sharom-category-card span { position: absolute; z-index: 2; left: 28px; bottom: 25px; color: #fff; font-family: Poppins, sans-serif; font-size: 2rem; font-weight: 800; }
.sharom-category-card:hover { transform: translateY(-4px); }
.sharom-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border-radius: var(--sharom-radius); background: var(--sharom-line); box-shadow: var(--sharom-shadow); }
.sharom-feature { padding: 27px 22px; text-align: center; background: #fff; }
.sharom-feature strong { display: block; margin-bottom: 7px; font-family: Poppins, sans-serif; }
.sharom-feature span { color: var(--sharom-muted); font-size: .9rem; }
.sharom-products-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; align-items: stretch; gap: 22px; }
.sharom-product-card { position: relative; min-width: 0; height: 100%; overflow: hidden; border: 1px solid #b8bec5; border-radius: 15px; background: #fff; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.sharom-product-card:hover { transform: translateY(-4px); box-shadow: var(--sharom-shadow); }
.sharom-product-card > a { display: flex; flex-direction: column; height: 100%; }
.sharom-product-card__image { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; overflow: hidden; background: linear-gradient(180deg, #fff 0%, #f7f5f8 100%); }
.sharom-product-card__image img { width: 100%; height: 100%; padding: 10px; object-fit: contain; object-position: center bottom; }
.sharom-product-card__sale { position: absolute; z-index: 2; top: 12px; right: 12px; padding: 6px 10px; border-radius: 999px; color: #fff; background: var(--sharom-purple); font-size: .72rem; font-weight: 800; }
.sharom-product-card__body { display: flex; flex: 1; flex-direction: column; padding: 17px; }
.sharom-product-card h3 { display: -webkit-box; min-height: 2.45em; margin: 0 0 10px; overflow: hidden; font-size: .98rem; line-height: 1.22; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.sharom-product-card .price { min-height: 2.5em; margin-bottom: 14px; color: var(--sharom-ink); font-size: .92rem; font-weight: 800; line-height: 1.25; }
.sharom-product-card__cta { width: 100%; min-height: 44px; margin-top: auto; padding: 10px 12px; text-align: center; }
.sharom-review-box { padding: 34px; border-radius: var(--sharom-radius); text-align: center; background: linear-gradient(135deg, var(--sharom-purple-soft), #fff); }
.sharom-blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.sharom-post-card { overflow: hidden; border: 1px solid var(--sharom-line); border-radius: 18px; background: #fff; }
.sharom-post-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.sharom-post-card__body { padding: 22px; }
.sharom-post-card time { color: var(--sharom-muted); font-size: .82rem; }
.sharom-post-card h3 { margin: 10px 0; font-size: 1.08rem; }

/* Generic pages and WooCommerce */
.sharom-page-hero { padding: 58px 0; color: #fff; text-align: center; background: #3b3a3c; }
.sharom-page-hero h1 { margin-bottom: 8px; font-size: clamp(2.2rem, 5vw, 3.6rem); }
.sharom-page-hero .woocommerce-breadcrumb { margin: 12px 0 0; color: rgba(255,255,255,.86); }
.sharom-page-hero .woocommerce-breadcrumb a { color: #fff; }
.sharom-main { min-height: 55vh; padding: 56px 0 80px; }
.sharom-content { max-width: 940px; margin-inline: auto; }
.woocommerce-cart .sharom-content, .woocommerce-checkout .sharom-content, .woocommerce-account .sharom-content { max-width: 1140px; }
.woocommerce .woocommerce-breadcrumb { margin-bottom: 26px; color: var(--sharom-muted); }
.woocommerce .woocommerce-result-count { margin: 10px 0 24px; }
.woocommerce .woocommerce-ordering { margin: 0 0 24px; }
.woocommerce .woocommerce-ordering select { min-height: 46px; padding: 8px 42px 8px 16px; border: 0; border-radius: 999px; color: #fff; background: #444; }
.woocommerce ul.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; align-items: stretch; gap: 24px; margin: 0; padding: 0; list-style: none; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product { display: flex; flex-direction: column; min-width: 0; width: auto !important; height: 100%; margin: 0 !important; padding: 12px; list-style: none; border: 1px solid #b8bec5; border-radius: 15px; background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.woocommerce ul.products li.product:hover { transform: translateY(-4px); box-shadow: var(--sharom-shadow); }
.woocommerce ul.products li.product .woocommerce-loop-product__link { display: flex; flex: 1; flex-direction: column; width: 100%; min-width: 0; }
.woocommerce ul.products li.product a img { width: 100%; margin: 0 0 16px; padding: 8px; border-radius: 12px; aspect-ratio: 4/5; background: linear-gradient(180deg, #fff 0%, #f7f5f8 100%); object-fit: contain; object-position: center bottom; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { display: -webkit-box; min-height: 2.45em; padding: 0; overflow: hidden; color: #17131a; font-size: .98rem; line-height: 1.22; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.woocommerce ul.products li.product .price { min-height: 2.5em; margin: 8px 0 13px; color: #17131a; font-size: .92rem; line-height: 1.25; }
.woocommerce ul.products li.product > .button { width: 100%; min-height: 44px; margin-top: auto; padding: 10px 8px; text-align: center; white-space: normal; }
.woocommerce span.onsale { top: 10px; right: 10px; left: auto; min-width: 0; min-height: 0; margin: 0; padding: 7px 10px; line-height: 1; border-radius: 999px; background: var(--sharom-purple); }
.woocommerce nav.woocommerce-pagination { margin-top: 34px; }
.woocommerce nav.woocommerce-pagination ul { overflow: hidden; border-radius: 999px; }
.woocommerce div.product { display: flow-root; }
.woocommerce div.product div.images img { border-radius: 16px; object-fit: contain; }
.woocommerce div.product div.summary { padding: 8px 0; }
.woocommerce div.product .product_title { font-size: clamp(2rem, 4vw, 3rem); }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--sharom-ink); font-size: 1.55rem; font-weight: 800; }
.woocommerce div.product form.cart .variations { background: #fafafa; }
.woocommerce div.product form.cart .variations th, .woocommerce div.product form.cart .variations td { padding: 12px; }
.woocommerce div.product form.cart .variations select { width: 100%; min-height: 48px; padding: 9px 14px; border: 1px solid #bbb; background: #fff; }
.woocommerce .quantity .qty { min-height: 48px; border: 1px solid #bbb; border-radius: 12px; }
.woocommerce table.shop_table { border-color: var(--sharom-line); border-radius: 16px; overflow: hidden; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select, .select2-container--default .select2-selection--single { min-height: 46px; padding: 9px 12px; border: 1px solid #cbc6d0; border-radius: 8px; background: #fff; }
.woocommerce-checkout #payment { border-radius: 16px; background: var(--sharom-purple-soft); }
.woocommerce-message, .woocommerce-info { border-top-color: var(--sharom-purple-dark); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--sharom-purple-dark); }
.wc-block-cart, .wc-block-checkout { max-width: 1140px; margin-inline: auto; }
.wc-block-components-product-name { font-family: Poppins, Arial, sans-serif; font-weight: 700; }

/* Footer */
.sharom-footer { padding: 58px 0 24px; color: #fff; background: #1d1921; }
.sharom-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.sharom-footer-logo { width: 170px; margin-bottom: 18px; filter: brightness(0) invert(1); }
.sharom-footer h3 { margin-bottom: 16px; font-size: 1rem; }
.sharom-footer ul { margin: 0; padding: 0; list-style: none; }
.sharom-footer li { margin-bottom: 9px; color: #d9d4dc; }
.sharom-footer a:hover { color: #fff; text-decoration: underline; }
.sharom-social { display: flex; flex-wrap: wrap; gap: 10px; }
.sharom-social a { padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.10); }
.sharom-copyright { margin-top: 42px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); color: #bdb7c2; font-size: .84rem; text-align: center; }

@media (max-width: 920px) {
  body.admin-bar .sharom-header { top: 46px; }
  .sharom-header-main .sharom-container { grid-template-columns: 100px 1fr auto; gap: 14px; }
  .sharom-header-actions .sharom-cart-total, .sharom-header-actions .sharom-wishlist, .sharom-cart-label { display: none; }
  .sharom-nav-row .sharom-container { grid-template-columns: 1fr auto; min-height: 60px; }
  .sharom-category-button, .sharom-whatsapp-top { display: none; }
  .sharom-menu-toggle { display: block; color: var(--sharom-purple-dark); border-color: var(--sharom-purple); }
  .sharom-menu { display: none; grid-column: 1 / -1; padding: 12px 0 22px; }
  .sharom-menu.is-open { display: block; }
  .sharom-menu > ul, .sharom-menu { flex-direction: column; align-items: flex-start; gap: 4px; }
  .sharom-category-grid, .sharom-blog-grid { grid-template-columns: 1fr 1fr; }
  .sharom-products-grid { grid-template-columns: repeat(2, 1fr); }
  .sharom-features { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 641px) and (max-width: 1100px) {
  .sharom-products-grid, .woocommerce ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .sharom-container { width: min(100% - 26px, 1140px); }
  .sharom-section { padding: 48px 0; }
  .sharom-header-main .sharom-container { min-height: 72px; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 8px; }
  .sharom-logo img { max-width: 70px; max-height: 54px; }
  .sharom-search input[type="search"] { min-height: 42px; }
  .sharom-header-actions { gap: 6px; }
  .sharom-cart-link { padding: 6px 2px; }
  .sharom-action-icon--cart { width: 27px; height: 27px; }
  .sharom-hero { min-height: 570px; background-position: 42% center; }
  .sharom-hero .sharom-container { align-items: flex-end; }
  .sharom-hero-card { width: 100%; margin: 0 0 18px; padding: 26px; }
  .sharom-category-grid, .sharom-blog-grid, .sharom-footer-grid { grid-template-columns: 1fr; }
  .sharom-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .sharom-category-card { min-height: 330px; }
  .sharom-features { grid-template-columns: 1fr; }
  .sharom-section-head { align-items: flex-start; flex-direction: column; }
  .sharom-product-card__image { aspect-ratio: 4/5; }
  .sharom-product-card__image img { padding: 5px; }
  .sharom-product-card__body { padding: 11px; }
  .sharom-product-card h3 { min-height: 2.5em; font-size: .82rem; }
  .sharom-product-card .price { min-height: 2.6em; margin-bottom: 10px; font-size: .76rem; }
  .sharom-product-card__cta { min-height: 41px; padding: 8px 5px; font-size: .76rem; line-height: 1.15; }
  #sharom-promo-3 { display: none !important; }
  .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .woocommerce ul.products li.product { padding: 8px; }
  .woocommerce ul.products li.product a img { margin-bottom: 10px; padding: 3px; }
  .woocommerce ul.products li.product .woocommerce-loop-product__title { min-height: 3.4em; font-size: .82rem; line-height: 1.15; -webkit-line-clamp: 3; }
  .woocommerce ul.products li.product .price { min-height: 2.6em; margin: 7px 0 10px; font-size: .75rem; }
  .woocommerce ul.products li.product > .button { min-height: 42px; padding: 8px 5px; font-size: .76rem; line-height: 1.1; }
  .woocommerce .woocommerce-result-count { float: none; margin-bottom: 12px; }
  .woocommerce .woocommerce-ordering { float: none; width: 100%; }
  .woocommerce .woocommerce-ordering select { width: 100%; }
  .woocommerce div.product div.images { margin-bottom: 28px; }
  .woocommerce div.product div.summary { margin-bottom: 40px; }
  .woocommerce div.product .product_title { font-size: 1.8rem; }
}
