/*
Theme Name: Costa & Torres Commerce
Description: Tema WooCommerce single-vendor para Costa & Torres.
Version: 1.0.0
Text Domain: costa-torres
*/

:root {
  --ct-orange: #f36c00;
  --ct-orange-dark: #c94f00;
  --ct-graphite: #3f3f3f;
  --ct-charcoal: #202220;
  --ct-concrete: #ece9e3;
  --ct-sand: #f7f4ef;
  --ct-white: #fff;
  --ct-line: #d7d2ca;
  --ct-max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ct-charcoal);
  background: var(--ct-white);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.ct-wrap { width: min(calc(100% - 40px), var(--ct-max)); margin-inline: auto; }
.ct-topbar {
  padding: 9px 20px;
  color: #fff;
  background: var(--ct-charcoal);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.ct-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--ct-line); }
.ct-header__row { min-height: 88px; display: grid; grid-template-columns: 260px 1fr auto; align-items: center; gap: 28px; }
.ct-brand { min-width: 0; overflow: hidden; }
.ct-brand .custom-logo-link { display: block; }
.ct-brand img { width: 235px; max-width: 100%; max-height: 76px; object-fit: contain; object-position: left center; }
.ct-brand__text { color: var(--ct-graphite); font-size: 21px; font-weight: 900; }
.ct-nav { display: flex; justify-content: center; gap: 28px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ct-nav a:hover, .ct-actions a:hover { color: var(--ct-orange); }
.ct-actions { display: flex; align-items: center; gap: 18px; font-size: 13px; font-weight: 800; text-transform: uppercase; }
.ct-cart-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 5px; padding: 0 6px; color: #fff; background: var(--ct-orange); border-radius: 50%; font-size: 11px; }
.ct-menu-toggle { display: none; justify-self: end; color: var(--ct-charcoal); border: 0; background: none; font-size: 27px; cursor: pointer; }

.ct-hero {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  display: grid;
  align-items: center;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(25,27,25,.97) 0 48%, rgba(25,27,25,.68) 68%, rgba(25,27,25,.85) 100%),
    repeating-linear-gradient(135deg, transparent 0 50px, rgba(243,108,0,.12) 50px 52px),
    var(--ct-graphite);
}
.ct-hero::after {
  content: "";
  position: absolute; right: -8vw; bottom: -28vw;
  width: 62vw; height: 62vw;
  border: 7vw solid var(--ct-orange);
  transform: rotate(34deg);
  opacity: .82;
}
.ct-hero__content { position: relative; z-index: 2; max-width: 720px; padding-block: 90px; }
.ct-eyebrow { color: var(--ct-orange); font-size: 13px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.ct-hero .ct-eyebrow { color: var(--ct-white); }
.ct-hero h1 { max-width: 690px; margin: 18px 0 22px; font-size: clamp(48px, 7vw, 92px); line-height: .98; letter-spacing: -.055em; }
.ct-hero p { max-width: 600px; margin: 0 0 34px; color: #e7e7e7; font-size: clamp(18px, 2vw, 23px); }
.ct-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.ct-button, .button, button.button, input.button {
  display: inline-flex !important; align-items: center; justify-content: center;
  min-height: 50px; padding: 13px 24px !important;
  color: #fff !important; background: var(--ct-orange) !important;
  border: 2px solid var(--ct-orange) !important; border-radius: 0 !important;
  font-weight: 900 !important; letter-spacing: .06em; text-transform: uppercase;
  transition: .2s ease;
}
.ct-button:hover, .button:hover, button.button:hover, input.button:hover { background: var(--ct-orange-dark) !important; border-color: var(--ct-orange-dark) !important; }
.ct-button--ghost { background: transparent !important; border-color: #fff !important; }

.ct-benefits { border-bottom: 1px solid var(--ct-line); background: #fff; }
.ct-benefits__grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.ct-benefit { padding: 25px; text-align: center; font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.ct-benefit + .ct-benefit { border-left: 1px solid var(--ct-line); }
.ct-section { padding: 88px 0; }
.ct-section--soft { background: var(--ct-sand); }
.ct-section__head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 38px; }
.ct-section h2 { margin: 7px 0 0; color: var(--ct-graphite); font-size: clamp(34px, 4vw, 58px); line-height: 1.05; letter-spacing: -.04em; }
.ct-link { padding-bottom: 4px; color: var(--ct-orange); border-bottom: 2px solid currentColor; font-weight: 900; text-transform: uppercase; }
.ct-categories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ct-category { min-height: 175px; padding: 26px 20px; display: flex; flex-direction: column; justify-content: end; color: #fff; background: var(--ct-graphite); border-top: 7px solid var(--ct-orange); transition: transform .2s ease; }
.ct-category:hover { transform: translateY(-5px); }
.ct-category strong { font-size: 20px; }
.ct-category small { color: #ddd; }

.ct-products, ul.products { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 28px !important; margin: 0 !important; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; content: none !important; }
.ct-product, ul.products li.product {
  width: auto !important; margin: 0 !important; padding: 0 0 22px !important;
  overflow: hidden; background: #fff; border: 1px solid var(--ct-line);
}
.ct-product__image, ul.products li.product img { width: 100% !important; aspect-ratio: 4/3; object-fit: cover; margin: 0 0 20px !important; background: var(--ct-concrete); }
.ct-product__body, ul.products li.product .woocommerce-loop-product__title, ul.products li.product .price, ul.products li.product .button { margin-inline: 20px !important; }
.ct-product h3 { margin: 0 0 8px; font-size: 22px; }
.ct-product .price, .price { color: var(--ct-orange) !important; font-size: 18px !important; font-weight: 900 !important; }

.ct-story { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 500px; }
.ct-story__copy { padding: clamp(40px, 7vw, 95px); display: flex; flex-direction: column; justify-content: center; background: var(--ct-orange); color: #fff; }
.ct-story__copy h2 { color: #fff; }
.ct-story__visual { display: grid; place-items: center; padding: 60px; background: var(--ct-concrete); }
.ct-story__visual img { max-height: 340px; object-fit: contain; mix-blend-mode: multiply; }
.ct-newsletter { padding: 70px 0; color: #fff; background: var(--ct-charcoal); }
.ct-newsletter__row { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 50px; }
.ct-newsletter h2 { color: #fff; }
.ct-newsletter form { display: flex; }
.ct-newsletter input[type=email] { min-width: 0; flex: 1; padding: 17px; border: 0; }

.ct-main { min-height: 55vh; padding: 70px 0; }
.ct-main h1 { font-size: clamp(38px, 5vw, 68px); letter-spacing: -.04em; }
.woocommerce .quantity .qty, .woocommerce input.input-text, .woocommerce textarea, .woocommerce select { padding: 12px; border: 1px solid var(--ct-line); }
.woocommerce-message, .woocommerce-info { border-top-color: var(--ct-orange); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--ct-orange); }

.ct-footer { padding: 65px 0 25px; color: #ddd; background: #252625; }
.ct-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 60px; }
.ct-footer h3 { color: #fff; }
.ct-footer a:hover { color: var(--ct-orange); }
.ct-footer__bottom { margin-top: 45px; padding-top: 22px; border-top: 1px solid #484848; font-size: 12px; }
.ct-cookie-link { padding: 0; color: #ddd; background: none; border: 0; font: inherit; cursor: pointer; }
.ct-cookie-link:hover { color: var(--ct-orange); }
.ct-cookie-banner, .ct-cookie-modal { position: fixed; z-index: 1000; }
.ct-cookie-banner[hidden], .ct-cookie-modal[hidden] { display: none; }
.ct-cookie-banner { right: 0; bottom: 0; left: 0; padding: 20px; color: #fff; background: #202220; box-shadow: 0 -8px 30px rgba(0,0,0,.25); }
.ct-cookie-banner__inner { width: min(100%, var(--ct-max)); margin: auto; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 30px; }
.ct-cookie-banner h2, .ct-cookie-modal h2 { margin: 0 0 8px; }
.ct-cookie-banner p { max-width: 780px; margin: 0 0 6px; }
.ct-cookie-banner a { color: var(--ct-orange); text-decoration: underline; }
.ct-cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ct-cookie-actions .ct-button { min-height: 44px; padding: 9px 15px !important; font-size: 12px; }
.ct-cookie-modal { inset: 0; padding: 20px; display: grid; place-items: center; background: rgba(0,0,0,.72); }
.ct-cookie-modal__panel { position: relative; width: min(100%, 680px); max-height: calc(100vh - 40px); overflow: auto; padding: 34px; background: #fff; }
.ct-cookie-modal__close { position: absolute; top: 12px; right: 16px; padding: 0; border: 0; background: none; font-size: 30px; cursor: pointer; }
.ct-cookie-option { margin: 20px 0; padding: 18px 0; display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--ct-line); }
.ct-cookie-option span, .ct-cookie-option small { display: block; }
.ct-cookie-option input { width: 22px; height: 22px; accent-color: var(--ct-orange); }

@media (max-width: 980px) {
  .ct-header__row { grid-template-columns: 1fr auto; }
  .ct-menu-toggle { display: block; }
  .ct-nav, .ct-actions { display: none; grid-column: 1 / -1; padding-bottom: 20px; }
  .ct-header.is-open .ct-nav, .ct-header.is-open .ct-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; }
  .ct-categories { grid-template-columns: repeat(2, 1fr); }
  .ct-products, ul.products { grid-template-columns: repeat(2, 1fr) !important; }
  .ct-story, .ct-newsletter__row { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  html, body { width: 100%; max-width: 100%; overflow-x: clip; }
  .ct-wrap { width: calc(100% - 28px); max-width: calc(100% - 28px); margin-inline: auto; }
  .ct-hero { min-height: 590px; }
  .ct-benefits__grid, .ct-categories, .ct-products, ul.products, .ct-footer__grid { grid-template-columns: 1fr !important; }
  .ct-benefit + .ct-benefit { border-left: 0; border-top: 1px solid var(--ct-line); }
  .ct-section__head { align-items: flex-start; flex-direction: column; }
  .ct-header__row { position: relative; min-height: 74px; display: flex; flex-wrap: wrap; justify-content: space-between; padding-right: 52px; }
  .ct-brand { flex: 0 1 190px; }
  .ct-brand img { width: 185px; max-height: 66px; }
  .ct-topbar { font-size: 10px; letter-spacing: .07em; }
  .ct-hero .ct-wrap { width: calc(100% - 40px); max-width: calc(100% - 40px); min-width: 0; margin-inline: auto; overflow: visible; }
  .ct-hero__content { width: 100%; max-width: 100%; min-width: 0; }
  .ct-hero h1 { width: auto; max-width: 100%; font-size: 39px; white-space: normal; overflow-wrap: anywhere; }
  .ct-hero p { width: auto; max-width: 100%; font-size: 17px; white-space: normal; overflow-wrap: anywhere; }
  .ct-menu-toggle { position: absolute; z-index: 2; display: block; right: 0; top: 50%; margin: 0; transform: translateY(-50%); }
  .ct-header.is-open .ct-nav, .ct-header.is-open .ct-actions { flex: 1 0 100%; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 10px; }
  .ct-header.is-open .ct-nav a, .ct-header.is-open .ct-actions a { min-height: 46px; padding: 12px 2px; display: flex; align-items: center; border-top: 1px solid var(--ct-line); }
  .ct-main { padding: 42px 0; }
  .ct-main h1 { margin-top: 0; font-size: 40px; line-height: 1.08; }
  .woocommerce .woocommerce-result-count { margin-bottom: 14px; float: none; }
  .woocommerce .woocommerce-ordering { width: 100%; margin: 0 0 16px; float: none; }
  .woocommerce .woocommerce-ordering select { width: 100%; min-height: 46px; }
  .woocommerce div.product div.images { margin-bottom: 30px; }
  .woocommerce div.product .product_title { font-size: 34px; overflow-wrap: anywhere; }
  .woocommerce div.product form.cart { display: flex; align-items: stretch; }
  .woocommerce div.product form.cart .button { min-width: 0; flex: 1; }
  .woocommerce table.shop_table_responsive tr, .woocommerce-page table.shop_table_responsive tr { padding: 12px 0; }
  .woocommerce form .form-row-first, .woocommerce form .form-row-last { width: 100%; float: none; }
  .ct-section { padding: 58px 0; }
  .ct-story__copy, .ct-story__visual { padding: 42px 20px; }
  .ct-footer { padding: 48px 0 22px; }
  .ct-footer__grid { gap: 30px; }
  .ct-cookie-banner { max-height: 72svh; overflow-y: auto; padding: 14px; }
  .ct-cookie-banner__inner { grid-template-columns: 1fr; gap: 12px; }
  .ct-cookie-banner h2 { font-size: 21px; line-height: 1.15; }
  .ct-cookie-banner p { font-size: 14px; line-height: 1.45; }
  .ct-cookie-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .ct-cookie-actions .ct-button { width: 100%; min-height: 42px; padding: 8px !important; font-size: 10px; line-height: 1.25; }
  .ct-cookie-actions .ct-button:last-child { grid-column: 1 / -1; }
  .ct-cookie-modal__panel { padding: 28px 20px; }
  .ct-cookie-modal .ct-cookie-actions { grid-template-columns: 1fr; }
  .ct-cookie-modal .ct-cookie-actions .ct-button:last-child { grid-column: auto; }
}
