/*!
 * sogooddeals · diseño claro y sobrio (sobrescribe Shoptimizer en toda la tienda)
 * Se carga la última (ver inc/sgd-design.php). Para ajustar colores, edita solo las variables de :root.
 */
:root{
  --sgd-bg:#fafaf8; --sgd-surface:#fff; --sgd-soft:#f1f2f4; --sgd-ink:#1a1f2b; --sgd-text:#3a4352;
  --sgd-muted:#5d6675; --sgd-line:#e3e5e9; --sgd-brand:#14253d; --sgd-brand-hover:#0d1a2c;
  --sgd-sale:#c8201f; --sgd-ok:#1f7a4d; --sgd-radius:8px;
}

/* ---------- Base ---------- */
body,body .site,body #page{background:var(--sgd-bg);color:var(--sgd-text);font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
body h1,body h2,body h3,body h4,body .entry-title,body .widget-title,body .gamma{color:var(--sgd-ink);font-family:inherit;font-weight:600;letter-spacing:-.01em}
body a{color:var(--sgd-brand)}
body a:hover{color:var(--sgd-brand-hover)}
body :focus-visible{outline:3px solid #6b8cff;outline-offset:2px}
body .col-full{max-width:1160px}

/* ---------- Cabecera ---------- */
body .topbar-wrapper,body .top-bar{background:var(--sgd-soft)!important;border-color:var(--sgd-line)!important}
body .top-bar p,body .top-bar a,body .top-bar .textwidget{color:var(--sgd-muted)!important;font-size:13px}
body .top-bar strong{color:var(--sgd-ink)}
body .site-header,body .site-header .main-header{background:var(--sgd-surface)!important;border-color:var(--sgd-line)!important;box-shadow:none}
body .site-header .menu-toggle,body .site-header .cart-contents,body .site-header .site-header-cart a{color:var(--sgd-ink)!important;font-weight:500}
/* Menú principal: banda azul marino con texto blanco */
body .col-full-nav{background:var(--sgd-brand)!important;border:0!important;box-shadow:none}
body .col-full-nav .main-navigation ul.menu>li>a,body .col-full-nav .main-navigation ul.menu>li>a span{color:#fff!important;font-weight:500}
body .col-full-nav .main-navigation ul.menu>li>a{transition:background .15s}
body .col-full-nav .main-navigation ul.menu>li>a:hover,body .col-full-nav .main-navigation ul.menu>li.current-menu-item>a{background:rgba(255,255,255,.12);box-shadow:inset 0 -3px 0 #fff}
body .col-full-nav .site-header-cart a,body .col-full-nav .cart-contents{color:#fff!important}
body .col-full-nav .main-navigation ul.menu>li.sgd-menu-sale>a{background:var(--sgd-sale)!important}
body .col-full-nav .main-navigation ul.menu>li.sgd-menu-sale>a:hover{background:#a81a19!important;box-shadow:none}
body .site-header .custom-logo{max-height:34px;width:auto}
body .site-search .widget_product_search input[type=search],body .site-search input.search-field{background:var(--sgd-soft)!important;border:1px solid var(--sgd-line)!important;border-radius:var(--sgd-radius);color:var(--sgd-ink)}
body .site-search form button,body .site-search .widget_product_search button{background:var(--sgd-brand)!important;color:#fff!important;border-radius:0 var(--sgd-radius) var(--sgd-radius) 0}
body .site-header .cart-contents .count{background:var(--sgd-brand)!important;color:#fff!important}
body .woocommerce-breadcrumb,body .woocommerce-breadcrumb a{color:var(--sgd-muted)!important;font-size:13px}
body .archive-header,body .shoptimizer-archive .archive-header{background:var(--sgd-bg)!important;border:0}
body .archive-header h1{font-size:clamp(26px,3vw,34px)}
body #wpadminbar{position:fixed}

/* ---------- Botones y formularios ---------- */
body .button,body button.button,body a.button,body input[type=submit],body .woocommerce-Button,body .single_add_to_cart_button,body #place_order,body .checkout-button,body .wc-proceed-to-checkout a.button{
  background:var(--sgd-brand)!important;color:#fff!important;border:0!important;border-radius:var(--sgd-radius)!important;font-weight:600;box-shadow:none!important;text-transform:none}
body .button:hover,body button.button:hover,body a.button:hover,body input[type=submit]:hover,body .single_add_to_cart_button:hover,body #place_order:hover{background:var(--sgd-brand-hover)!important}
body .wc-buy-now-btn,body .wc-buy-now-btn-single{background:var(--sgd-surface)!important;color:var(--sgd-brand)!important;border:1.5px solid var(--sgd-brand)!important}
body .wc-buy-now-btn:hover{background:var(--sgd-soft)!important}
body input[type=text],body input[type=email],body input[type=tel],body input[type=password],body input[type=number],body input[type=search],body textarea,body select,body .select2-container--default .select2-selection--single{
  background:var(--sgd-surface);border:1px solid var(--sgd-line);border-radius:var(--sgd-radius);color:var(--sgd-ink);box-shadow:none}
body input:focus,body textarea:focus,body select:focus{border-color:var(--sgd-brand);outline:0;box-shadow:0 0 0 3px rgba(20,37,61,.12)}
body .quantity,body .quantity .input-text{border-color:var(--sgd-line);border-radius:var(--sgd-radius)}
body .woocommerce-message,body .woocommerce-info,body .woocommerce-error{background:var(--sgd-surface);border:1px solid var(--sgd-line);border-left:4px solid var(--sgd-brand);color:var(--sgd-ink);border-radius:var(--sgd-radius)}
body .woocommerce-message::before,body .woocommerce-info::before{color:var(--sgd-brand)}

/* ---------- Descuento y precios ---------- */
body .price,body .price ins,body .price .amount,body ul.products li.product .price{color:var(--sgd-ink)}
body .price ins,body .price ins .amount{color:var(--sgd-sale)!important;font-weight:700;text-decoration:none}
body .price del,body .price del .amount{color:var(--sgd-muted)!important;font-weight:400}
body .onsale,body .product-label,body .sale-item.product-label,body .product-label.type-bubble{background:var(--sgd-sale)!important;color:#fff!important;border-radius:6px!important;font-weight:600;box-shadow:none}
.sgd-save{color:var(--sgd-ok);font-size:14px;font-weight:500;margin:2px 0 6px}

/* ---------- Catálogo: lista horizontal, 1 producto por línea (estilo chollometro) ---------- */
body:not(.single-product):not(.woocommerce-cart) ul.products{display:flex!important;flex-direction:column;gap:12px;width:100%!important;margin:0!important;padding:0}
body:not(.single-product):not(.woocommerce-cart) ul.products li.product:not(.product-category){
  display:grid;grid-template-columns:168px minmax(0,1fr) auto;column-gap:20px;row-gap:4px;align-items:center;
  float:none!important;width:100%!important;margin:0!important;padding:16px!important;
  background:var(--sgd-surface);border:1px solid var(--sgd-line);border-radius:10px;transition:border-color .15s;position:relative}
body:not(.single-product):not(.woocommerce-cart) ul.products li.product:hover{border-color:#c4c9d1;box-shadow:none}
body ul.products li.product .woocommerce-image__wrapper{position:relative;grid-column:1;grid-row:1 / span 5;align-self:start}
body ul.products li.product .woocommerce-image__wrapper img{display:block;width:100%;height:auto;aspect-ratio:1/1;object-fit:cover;border-radius:8px}
body ul.products li.product .woocommerce-card__header{display:contents}
body ul.products li.product .woocommerce-card__header>*{grid-column:2;margin:0;min-width:0}
body ul.products li.product .woocommerce-loop-product__title,body ul.products li.product .woocommerce-loop-product__title a{color:var(--sgd-ink);font-size:17px;font-weight:600;line-height:1.35;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body ul.products li.product .price{font-size:22px;font-weight:700;margin:2px 0 0;display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
body ul.products li.product .price del{font-size:15px}
/* Descripción corta (portada, añadida en inc/sgd-design.php): máximo 2 líneas */
body ul.products li.product .sgd-card-desc{margin:4px 0 0;color:var(--sgd-muted);font-size:14px;line-height:1.5;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
/* Botón: dentro de la tarjeta, a la derecha, tamaño normal */
body ul.products li.product .button,body ul.products li.product .added_to_cart{
  position:static!important;opacity:1!important;bottom:auto;grid-column:3;grid-row:1 / span 5;align-self:center;justify-self:end;
  width:auto!important;height:44px!important;margin:0!important;padding:0 22px!important;line-height:44px!important;font-size:14px;white-space:nowrap;float:none}
body ul.products li.product .button.added{display:none}
body ul.products li.product .onsale,body ul.products li.product .product-label{position:absolute;top:8px;left:8px;z-index:2}
body .woocommerce-ordering select,body .woocommerce-result-count{color:var(--sgd-muted)}
body .shoptimizer-archive .widget,body .widget-area .widget{background:transparent}
@media (max-width:700px){
  body:not(.single-product):not(.woocommerce-cart) ul.products li.product:not(.product-category){grid-template-columns:104px minmax(0,1fr);column-gap:14px;padding:12px!important}
  body ul.products li.product .woocommerce-image__wrapper{grid-row:1 / span 4}
  body ul.products li.product .woocommerce-loop-product__title,body ul.products li.product .woocommerce-loop-product__title a{font-size:15px}
  body ul.products li.product .price{font-size:19px}
  body ul.products li.product .sgd-card-desc{font-size:13px;-webkit-line-clamp:3}
  body ul.products li.product .button,body ul.products li.product .added_to_cart{grid-column:1 / -1;grid-row:auto;justify-self:stretch;width:100%!important;text-align:center;margin-top:10px!important}
}

/* ---------- Ficha de producto ---------- */
body .product-details-wrapper{background:transparent}
body .woocommerce-product-gallery{border:1px solid var(--sgd-line);border-radius:10px;overflow:hidden;background:var(--sgd-surface)}
body .woocommerce-product-gallery .flex-control-thumbs img{border:1px solid var(--sgd-line);border-radius:8px}
body .summary .product_title{font-size:clamp(24px,3vw,32px);line-height:1.2}
body .summary p.price{font-size:34px;margin:16px 0 4px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
body .summary p.price del{order:2;font-size:20px}
body .summary p.price ins{order:1}
body .summary .sale-item.product-label{position:static;order:3;display:inline-block;padding:4px 10px;font-size:14px;line-height:1.4}
body .summary .woocommerce-product-details__short-description{color:var(--sgd-text);max-width:60ch}
/* Formulario de compra: cantidad + botón en una fila, "Comprar" debajo; tamaño normal */
body .summary form.cart{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:stretch;float:none;margin:18px 0 8px}
body .summary form.cart::before,body .summary form.cart::after{display:none!important;content:none}
body .summary form.cart .quantity{float:none;margin:0;width:auto;height:48px}
/* Selector de cantidad: número y flechas con la misma altura (48px) y las flechas dentro de su columna, no bajo el botón */
body .summary form.cart .quantity.buttons_added,body .summary form.cart .quantity:has(.quantity-nav){display:flex;align-items:stretch}
body .summary form.cart .quantity:has(input[type=hidden]){display:none}
body .summary form.cart .quantity .qty{box-sizing:border-box;width:52px;height:48px;margin:0;padding:0 4px;font-size:16px;line-height:46px;text-align:center;color:var(--sgd-ink);border:1px solid var(--sgd-line);border-radius:var(--sgd-radius) 0 0 var(--sgd-radius);box-shadow:none}
body .summary form.cart .quantity .quantity-nav{position:relative;top:auto;right:auto;bottom:auto;flex:none;box-sizing:border-box;width:34px;height:48px;margin-left:-1px;background:var(--sgd-surface);border:1px solid var(--sgd-line);border-radius:0 var(--sgd-radius) var(--sgd-radius) 0;box-shadow:none}
body .summary form.cart .quantity .quantity-button{height:50%}
body .summary form.cart .quantity .quantity-up{top:0;bottom:auto;border-bottom:1px solid var(--sgd-line)}
body .summary form.cart .quantity .quantity-down{top:auto;bottom:0}
body .summary form.cart .quantity .quantity-button:hover{background-color:var(--sgd-soft)}
body .summary form.cart .quantity .quantity-button.quantity-up:before,body .summary form.cart .quantity .quantity-button.quantity-down:before{width:16px;height:16px;background:var(--sgd-ink)}
body .summary form.cart .single_add_to_cart_button,body .summary form.cart .wc-buy-now-btn{
  float:none!important;width:auto!important;height:48px!important;margin:0!important;padding:0 20px!important;
  font-size:15px!important;font-weight:600;line-height:46px!important;min-height:0;grid-column:2}
body .summary form.cart .single_add_to_cart_button:first-child,body .summary form.cart .quantity:has(input[type=hidden]) + .single_add_to_cart_button,body .summary form.cart .wc-buy-now-btn{grid-column:1 / -1}
body .summary form.cart .single_add_to_cart_button:not(.wc-buy-now-btn):not(:first-child){grid-column:2}
body .summary form.cart.variations_form,body .summary form.cart.grouped_form{display:block}
body .call-back-feature{display:none}
body .woocommerce-tabs ul.tabs li a{color:var(--sgd-muted);font-weight:600}
body .woocommerce-tabs ul.tabs li.active a{color:var(--sgd-ink);border-color:var(--sgd-brand)}
body .woocommerce-Tabs-panel{background:transparent}
body .star-rating span::before,body p.stars a{color:#e0a100}
/* Compartir (añadido en inc/sgd-design.php) */
.sgd-share{margin-top:18px;font-size:14px;color:var(--sgd-muted);display:flex;gap:14px;flex-wrap:wrap;width:100%}
.sgd-share a,.sgd-share button{background:none!important;border:0!important;padding:0;color:var(--sgd-brand)!important;font-family:inherit;font-size:14px;font-weight:500;text-decoration:underline;cursor:pointer;box-shadow:none!important}
/* Sellos de confianza (widgets "below-content") */
body .below-content{background:var(--sgd-soft);border-top:1px solid var(--sgd-line);border-bottom:1px solid var(--sgd-line);margin-top:40px}
body .below-content .widget-title{font-size:15px;color:var(--sgd-ink)}
body .below-content p,body .below-content .textwidget{color:var(--sgd-muted);font-size:14px}
body .below-content svg{color:var(--sgd-ok);stroke:var(--sgd-ok)}
/* Barra fija de compra */
body .shoptimizer-sticky-add-to-cart{background:var(--sgd-surface)!important;border-top:1px solid var(--sgd-line);box-shadow:0 -4px 16px rgba(20,37,61,.06)}
body .shoptimizer-sticky-add-to-cart__content-title{color:var(--sgd-ink);font-weight:600}
body .shoptimizer-sticky-add-to-cart .price ins{color:var(--sgd-sale)}

/* ---------- Carrito, pago y cuenta ---------- */
body table.shop_table,body .cart_totals,body .woocommerce-checkout-review-order,body #order_review,body .woocommerce-MyAccount-content,body .woocommerce-MyAccount-navigation,body .woocommerce-form-login,body .woocommerce-form-coupon{
  background:var(--sgd-surface);border:1px solid var(--sgd-line);border-radius:10px;border-collapse:separate;overflow:hidden}
body table.shop_table th,body table.shop_table td{border-color:var(--sgd-line);color:var(--sgd-text)}
body .woocommerce-MyAccount-navigation li a{color:var(--sgd-muted);font-weight:500}
body .woocommerce-MyAccount-navigation li.is-active a{color:var(--sgd-ink);font-weight:600}
body .shoptimizer-mini-cart-wrap,body .shoptimizer-mini-cart-wrap .widget_shopping_cart{background:var(--sgd-surface)}
body .woocommerce-checkout h3,body .cart_totals h2{font-size:20px}
body .payment_methods li{border-color:var(--sgd-line)}
/* Métodos de pago: caja propia separada del texto de privacidad/condiciones, con margen interior.
   Los iconos de tarjetas (float:right en el tema) quedan contenidos en su método: antes se salían
   y se montaban sobre el método o el texto de abajo. */
body .woocommerce-checkout #payment{background:var(--sgd-soft);border-radius:10px;padding:16px;margin:16px 0 0}
body .woocommerce-checkout #payment ul.payment_methods{margin:0;padding:0;background:var(--sgd-surface);border:1px solid var(--sgd-line);border-radius:var(--sgd-radius);overflow:hidden}
body .woocommerce-checkout #payment ul.payment_methods:has(.woocommerce-info){background:transparent;border:0}
body .woocommerce-checkout #payment ul.payment_methods>li{display:flow-root;padding:14px 0;border-bottom:1px solid var(--sgd-line)}
body .woocommerce-checkout #payment ul.payment_methods>li:last-child{border-bottom:0}
body .woocommerce-checkout #payment ul.payment_methods>li>label{line-height:24px}
body .woocommerce-checkout #payment ul.payment_methods>li>label img{max-height:24px;width:auto;margin:0 0 4px 6px}
body .woocommerce-checkout #payment ul.payment_methods>li .payment_box{clear:both;margin:0;padding:6px 1.41575em 0}
body .woocommerce-checkout #payment ul.payment_methods>li .payment_box p{padding-top:0;color:var(--sgd-text);line-height:1.5}
body .woocommerce-checkout #payment .form-row.place-order{clear:both;margin:16px 0 0;padding:0}
body .woocommerce-checkout #payment .woocommerce-privacy-policy-text p{margin:0 0 12px;line-height:1.5;color:var(--sgd-muted)}
body .woocommerce-checkout #payment .place-order .button{margin-bottom:0}

/* ---------- Blog ---------- */
body .entry-title a{color:var(--sgd-ink)}
body .hentry,body .blog .post,body article.post{background:transparent;border-color:var(--sgd-line)}
body .entry-meta,body .posted-on,body .byline{color:var(--sgd-muted)}

/* ---------- Pie ---------- */
body .site-footer,body footer.copyright{background:var(--sgd-soft)!important;color:var(--sgd-muted)!important;border-top:1px solid var(--sgd-line)}
body .site-footer a,body footer.copyright a{color:var(--sgd-ink)!important}
body .site-footer .widget-title,body .site footer.site-footer .widget .widget-title,body .site-footer .widget.widget_block h2{color:var(--sgd-ink)}
body footer.copyright{border-top:1px solid var(--sgd-line);font-size:13px}
/* Reseña de demostración del tema: oculta hasta tener opiniones reales */
body .site-footer .review,body .site-footer .textwidget img[alt="Valoraciones de clientes"]{display:none}

/* ---------- Móvil ---------- */
@media (prefers-reduced-motion:reduce){body *{transition:none!important;animation:none!important}}

/* ---------- Franja de ventajas (portada) ---------- */
.sgd-strip{background:var(--sgd-surface);border-bottom:1px solid var(--sgd-line)}
.sgd-strip ul{max-width:1160px;margin:0 auto;padding:12px 20px;list-style:none;display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.sgd-strip li{display:flex;gap:10px;align-items:center;font-size:13px;color:var(--sgd-muted);line-height:1.3}
.sgd-strip svg{width:24px;height:24px;flex:none;stroke:var(--sgd-brand);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sgd-strip b{display:block;color:var(--sgd-ink);font-weight:600;font-size:14px}
@media (max-width:820px){.sgd-strip ul{grid-template-columns:repeat(2,1fr)}}

/* ---------- Confianza junto al botón de compra ---------- */
.sgd-trust{list-style:none;margin:16px 0 0;padding:16px 0 0;border-top:1px solid var(--sgd-line);display:grid;gap:9px;font-size:14px;color:var(--sgd-muted);width:100%}
.sgd-trust li{display:flex;gap:10px;align-items:flex-start}
.sgd-trust b{color:var(--sgd-ink);font-weight:600}
.sgd-trust svg{flex:none;width:18px;height:18px;margin-top:3px;stroke:var(--sgd-ok);fill:none;stroke-width:2.2}

/* ---------- Bloque final del pie: "Tu compra segura" + enlaces legales (inc/sgd-design.php) ---------- */
/* Para cambiar el color de fondo, edita --sgd-footer-bg */
.sgd-footer{--sgd-footer-bg:var(--sgd-brand);background:var(--sgd-footer-bg);color:rgba(255,255,255,.82);padding:44px 20px 30px;text-align:center}
.sgd-footer__inner{max-width:780px;margin:0 auto}
body .sgd-footer .sgd-footer__title{margin:0 0 16px;color:#fff;font-size:17px;font-weight:700;line-height:1.3;letter-spacing:.04em;text-transform:uppercase}
body .sgd-footer p{margin:0 0 12px;font-size:14.5px;line-height:1.65;color:inherit}
body .sgd-footer strong{color:#fff;font-weight:600}
body .sgd-footer a{color:#fff;text-decoration:underline;text-decoration-color:rgba(255,255,255,.45);text-underline-offset:3px;transition:text-decoration-color .15s}
body .sgd-footer a:hover{color:#fff;text-decoration-color:#fff}
.sgd-footer__sep{height:0;margin:26px 0 20px;border:0;border-top:1px solid rgba(255,255,255,.2);background:none}
.sgd-footer__links{list-style:none;margin:0 0 14px;padding:0;display:flex;flex-wrap:wrap;justify-content:center;row-gap:6px;font-size:14px}
.sgd-footer__links li{margin:0}
.sgd-footer__links li:not(:last-child)::after{content:"·";margin:0 10px;color:rgba(255,255,255,.45)}
body .sgd-footer .sgd-footer__copy{margin:0;font-size:13px;color:rgba(255,255,255,.65)}
@media (max-width:600px){
  .sgd-footer{padding:36px 16px 26px}
  body .sgd-footer .sgd-footer__title{font-size:16px}
  body .sgd-footer p{font-size:14px}
}

/* ---------- Productos agotados ---------- */
body ul.products li.product.outofstock .woocommerce-image__wrapper img{opacity:.5}
body ul.products li.product .product-out-of-stock{position:absolute;top:auto;right:auto;bottom:0;left:0;width:100%;height:auto;padding:6px 0;background:rgba(255,255,255,.92);color:var(--sgd-ink);font-size:12px;font-weight:600;text-align:center;border-radius:0 0 8px 8px;pointer-events:none}
body ul.products li.product .product-out-of-stock em{font-style:normal}

/* ---------- Etiquetas de oferta: el fondo rojo cubre todo el texto ---------- */
body .onsale,body span.onsale,body .summary .onsale,body .product-label,body .sale-item.product-label{
  display:inline-block!important;width:auto!important;height:auto!important;min-width:0!important;min-height:0!important;
  padding:4px 12px!important;margin:0!important;line-height:1.4!important;font-size:13px!important;font-weight:600!important;
  letter-spacing:0;text-transform:none;white-space:nowrap;overflow:visible!important;text-align:center;
  background:var(--sgd-sale)!important;color:#fff!important;border-radius:6px!important;box-shadow:none!important}
body .summary .onsale{position:static!important;margin:0 0 10px!important}
body ul.products li.product .onsale,body ul.products li.product .product-label{position:absolute!important;top:8px;left:8px;z-index:2}
