/**
 * ===========================================
 *  EYE CARE CHILD – CINGOLANI (STYLE.CSS)
 *  Archivo: style.css
 * ===========================================
 *
 * Theme Name: Eye Care Child
 * Description: This is a child theme of Eye Care.
 * Author: <a href="https://cmsmasters.net/">cmsmasters</a>
 * Template: eye-care
 * Version: 1.0.0
 * Tested up to: 6.6
 * Requires PHP: 7.4
 * Text Domain: eye-care-child
 *
 * Paleta marca Cingolani:
 * - Azul: #283f5a
 * - Celeste: #d5deec
 * - Blanco: #ffffff
 * Tipografía institucional: Plus Jakarta Sans
 */


/* =========================================================
   0) BLOQUE: PRODUCT MEASUREMENTS (icons + valores)
   - Usado por el shortcode [cingolani_measurements]
========================================================= */

.cingolani-measurements {
  padding: 18px 0;
}

.cingolani-measurements__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.cingolani-measurements__title {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cingolani-measurements__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 34px;
}

.cingolani-measurements__item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cingolani-measurements__img img {
  width: 160px;
  max-width: 160px;
  height: auto;
  display: block;
}

.cingolani-measurements__label {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.cingolani-measurements__value {
  margin-top: 4px;
  font-size: 14px;
  opacity: 0.85;
}

@media (max-width: 767px) {
  .cingolani-measurements__grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .cingolani-measurements__img img {
    width: 130px;
    max-width: 130px;
  }
}


/* =========================================================
   1) BLOQUE: GALERÍA (BASE)
   - Usado por el shortcode [cingolani_gallery]
========================================================= */

.cingolani-gallery {
  width: 100%;
  max-width: 100%;
  position: relative;
}

/* MAIN (base) */
.cingolani-gallery-main {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 320px;
}

/* Imagen MAIN */
.cingolani-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.25s ease;
}

.cingolani-gallery-main:hover img {
  transform: scale(1.04);
}

/* DOTS (base) */
.cingolani-gallery-dots {
  position: absolute;
  left: -34px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 5;
}

.cingolani-dot {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.35);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.cingolani-dot.is-active {
  background: #111;
  border-color: #111;
}

/* THUMBS (base) */
.cingolani-gallery-thumbs {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  overflow: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.cingolani-thumb {
  flex: 0 0 auto;
  scroll-snap-align: start;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.85;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.cingolani-thumb:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.cingolani-thumb.is-active {
  opacity: 1;
  outline: 2px solid #111;
  outline-offset: 2px;
}

.cingolani-thumb img {
  display: block;
  width: 92px;
  height: 64px;
  object-fit: cover;
}

@media (min-width: 1100px) {
  .cingolani-gallery-main {
    height: 600px;
  }
}

@media (max-width: 767px) {
  .cingolani-gallery-main {
    height: 320px;
  }

  .cingolani-gallery-dots {
    left: 10px;
  }

  .cingolani-thumb img {
    width: 84px;
    height: 58px;
  }
}





/* =========================================================
   3) BLOQUE: LIGHTBOX (modal al click en el hero)
========================================================= */

.cingo-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999999;
}

.cingo-lightbox.is-open {
  display: block;
}

.cingo-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
}

.cingo-lightbox__content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(1100px, 92vw);
  height: min(720px, 86vh);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cingo-lightbox__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cingo-lightbox__close {
  position: absolute;
  right: 14px;
  top: 10px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.08);
  font-size: 26px;
  line-height: 40px;
  cursor: pointer;
}


/* =========================================================
   4) RELATED: simplificar galería en productos relacionados
========================================================= */

.woocommerce .related .cingolani-gallery-thumbs,
.woocommerce .related .cingolani-gallery-dots {
  display: none !important;
}

.woocommerce .related .cingolani-gallery-main {
  height: 260px !important;
  min-height: 260px !important;
  background: #fff !important;
  border: 1px solid #eee !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  cursor: default !important;
}

.woocommerce .related .cingolani-gallery-main img {
  object-fit: contain !important;
}


/* =========================================================
   5) ESPACIADOS (tabs + related + breadcrumbs)
========================================================= */

.single-product .woocommerce-tabs {
  margin-top: 26px !important;
  padding-top: 0 !important;
}

.single-product .woocommerce-tabs .tabs {
  margin-bottom: 14px !important;
}

.single-product .related {
  margin-top: 34px !important;
  padding-top: 0 !important;
}

.single-product .related > h2,
.single-product .related h2 {
  margin: 0 0 18px !important;
  font-size: 34px !important;
  line-height: 1.1 !important;
}

.single-product .woocommerce-breadcrumb,
.single-product .product-breadcrumb,
.single-product .breadcrumbs {
  margin-bottom: 10px !important;
}

.single-product .woocommerce div.product {
  padding-top: 24px !important;
  margin-top: 0 !important;
}


/* =========================================================
   6) FULL WIDTH REAL + RAYBAN-LIKE (OVERRIDE FINAL)
   - Esto es lo que “abre” el ancho de verdad.
   - Pegado al final para que gane siempre.
========================================================= */

/* FULL WIDTH: atacar wrappers típicos cmsmasters / Eye Care */
body.single-product #page,
body.single-product #middle,
body.single-product #main,
body.single-product .middle_content,
body.single-product .mid_content_wrap,
body.single-product .content_wrap,
body.single-product .cmsmasters_row,
body.single-product .cmsmasters_row_inner,
body.single-product .cmsmasters_column_inner,
body.single-product .site-content,
body.single-product .content-area,
body.single-product .container {
  max-width: none !important;
  width: 100% !important;
}

/* evitar centrado “boxed” */
body.single-product .mid_content_wrap,
body.single-product .content_wrap,
body.single-product .cmsmasters_row_inner,
body.single-product .site-content,
body.single-product .content-area,
body.single-product .container {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* padding lateral tipo Target */
body.single-product .mid_content_wrap,
body.single-product .content_wrap,
body.single-product .cmsmasters_row_inner {
  padding-left: clamp(16px, 3vw, 44px) !important;
  padding-right: clamp(16px, 3vw, 44px) !important;
}

/* si hubiera sidebar ocupando lugar */
body.single-product .sidebar,
body.single-product #sidebar {
  display: none !important;
  width: 0 !important;
}

/* PRODUCT GRID “Rayban” */
body.single-product .woocommerce div.product {
  width: 100% !important;
  max-width: none !important;
  display: grid !important;
  grid-template-columns: 62% 38% !important;
  gap: 56px !important;
  align-items: start !important;
}

/* imágenes + summary sin floats */
body.single-product .woocommerce div.product div.images,
body.single-product .woocommerce div.product div.summary {
  float: none !important;
  width: auto !important;
}

/* galería full sin límites */
body.single-product .cingolani-gallery {
  max-width: none !important;
  width: 100% !important;
}

/* hero “sin caja” + alto relativo a viewport */
body.single-product .cingolani-gallery-main {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  height: 72vh !important;
  min-height: 520px !important;
}

/* dots finitos y más cerca */
body.single-product .cingolani-gallery-dots {
  left: 18px !important;
}

body.single-product .cingolani-dot {
  width: 8px;
  height: 8px;
  border-color: rgba(0, 0, 0, 0.25);
}

body.single-product .cingolani-dot.is-active {
  background: #111;
  border-color: #111;
}

/* thumbs más grandes */
body.single-product .cingolani-gallery-thumbs {
  margin-top: 18px !important;
  gap: 14px !important;
}

body.single-product .cingolani-thumb {
  border-radius: 14px !important;
  border-color: #eee !important;
}

body.single-product .cingolani-thumb img {
  width: 110px !important;
  height: 78px !important;
}

/* summary sticky */
body.single-product .woocommerce div.product .summary {
  position: sticky !important;
  top: 110px !important;
}

/* tipografía / jerarquía */
body.single-product .product_title {
  font-size: 54px !important;
  line-height: 1.02 !important;
  letter-spacing: -0.02em !important;
  margin-bottom: 12px !important;
}

body.single-product .summary .price,
body.single-product .summary .woocommerce-product-details__short-description {
  font-size: 16px !important;
  line-height: 1.5 !important;
  color: rgba(0, 0, 0, 0.72) !important;
}

/* CTA tipo pill */
body.single-product .single_add_to_cart_button {
  border-radius: 999px !important;
  padding: 16px 22px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
}

@media (max-width: 900px) {
  body.single-product .woocommerce div.product {
    grid-template-columns: 1fr !important;
    gap: 26px !important;
  }

  body.single-product .cingolani-gallery-main {
    height: 50vh !important;
    min-height: 340px !important;
  }

  body.single-product .cingolani-gallery-dots {
    left: 10px !important;
  }
}


/* =========================
   THUMBS MÁS CERCA (SINGLE)
   ========================= */

/* Achica el “aire” del hero (antes: 72vh + min 520) */
body.single-product .cingolani-gallery-main{
  height: clamp(360px, 52vh, 520px) !important;  /* antes 72vh */
  min-height: 360px !important;                 /* antes 520px */
}

/* Thumbs más cerca del hero */
body.single-product .cingolani-gallery-thumbs{
  margin-top: 8px !important;   /* antes 18px */
  gap: 12px !important;         /* si querés un pelín más compacto */
  padding-bottom: 4px !important;
}

.cingo-card-img{
  width:100%;
  height:260px;
  object-fit:contain;
  display:block;
  margin:0 auto;
  background:#fff;
  padding:20px;
  border-radius:12px;
}
