/*
Theme Name: Terina Child
Theme URI: http://terina.novaworks.net
Description: This is a child theme for Terina Theme.
Author: Novaworks
Author URI: http: //www.novaworks.net/
Template: terina
Version: 1.0
*/

/****************************************************************/
/*************** ADD YOUR CUSTOM CSS IN THIS AREA ***************/
/****************************************************************/







/****************************************************************/
/****************************************************************/
/****************************************************************/


/* Seletor de variação com aparência claramente clicável */
.single-product .variations_form .variations .value select {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 0 48px 0 16px;
  border: 1px solid #a682ae !important;
  border-radius: 4px;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%236b287f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 14px 8px;
  box-shadow: 0 1px 2px rgba(64, 30, 72, .08);
  color: #2f1240;
  -webkit-appearance: none;
  appearance: none;
}

.single-product .variations_form .variations .value select:hover {
  border-color: #6b287f !important;
}

.single-product .variations_form .variations .value select:focus {
  border-color: #6b287f !important;
  outline: 3px solid rgba(107, 40, 127, .18);
  outline-offset: 2px;
}


/* Caixa visual do seletor Select2 de variações */
.single-product .variations_form .select2-container--default .select2-selection--single {
  box-sizing: border-box;
  height: 48px;
  border: 1px solid #a682ae !important;
  border-radius: 4px;
  background-color: #fff !important;
  box-shadow: 0 1px 2px rgba(64, 30, 72, .08);
}

.single-product .variations_form .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 16px;
  padding-right: 48px;
  color: #2f1240;
  line-height: 46px;
}

.single-product .variations_form .select2-container--default .select2-selection--single .select2-selection__arrow {
  right: 16px;
  height: 46px;
}

.single-product .variations_form .select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: #6b287f transparent transparent transparent;
  border-width: 6px 5px 0;
  margin-left: -5px;
  margin-top: -3px;
}

.single-product .variations_form .select2-container--default.select2-container--open .select2-selection--single,
.single-product .variations_form .select2-container--default .select2-selection--single:focus {
  border-color: #6b287f !important;
  box-shadow: 0 0 0 3px rgba(107, 40, 127, .18);
}


/* Alinhamento central dos rótulos de variação */
.single-product .variations_form .variations th.label,
.single-product .variations_form .variations td.label,
.single-product .variations_form .variations td.value {
  vertical-align: middle !important;
}


/* Centraliza visualmente rótulo e seletor de variação */
.single-product .variations_form .variations th.label {
  padding: 0 15px !important;
  vertical-align: middle !important;
}
.single-product .variations_form .variations th.label label {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 48px !important;
}
.single-product .variations_form .variations td.value select {
  margin-bottom: 0 !important;
}


/* Aproxima o seletor do nome da variação */
.single-product .variations_form .variations th.label {
  width: 120px !important;
}


/* Catálogo organizado no celular */
@media (max-width: 767px) {
  body.post-type-archive-product ul.products.products-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 !important;
    padding: 0 12px;
  }

  body.post-type-archive-product ul.products.products-grid > li.product_item {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.post-type-archive-product .product-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 8px;
    background: #fff;
    border: 1px solid #f0e5f1;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(64, 0, 78, .08);
    overflow: hidden;
  }

  body.post-type-archive-product .product-item__thumbnail {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 7px;
    overflow: hidden;
    background: #f8f3f8;
  }

  body.post-type-archive-product .product-item__thumbnail-placeholder,
  body.post-type-archive-product .product-item__thumbnail-placeholder a,
  body.post-type-archive-product .product-item__thumbnail img {
    display: block;
    width: 100% !important;
    height: 100% !important;
  }

  body.post-type-archive-product .product-item__thumbnail img {
    object-fit: cover;
  }

  body.post-type-archive-product .product-item__description--info {
    display: flex;
    flex: 1;
    flex-direction: column;
    margin-top: 12px;
  }

  body.post-type-archive-product .woocommerce-loop-product__title {
    display: -webkit-box;
    min-height: 57px;
    margin: 0 0 8px !important;
    overflow: hidden;
    color: #4b1761;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  body.post-type-archive-product .product-item__description .price {
    min-height: 46px;
    margin-top: auto;
    color: #6b287f;
    font-size: 18px;
    line-height: 1.25;
    text-align: left;
  }

  body.post-type-archive-product .product-item__badges {
    top: 8px;
    left: 8px;
  }
}


/* Leitura compacta dos cards no catálogo mobile */
@media (max-width: 767px) {
  body.post-type-archive-product .woocommerce-loop-product__title {
    min-height: 38px;
    -webkit-line-clamp: 2;
  }

  body.post-type-archive-product .product-item__description .price {
    min-height: 22px;
    font-size: 16px;
    line-height: 1.2;
    white-space: nowrap;
  }

  /* Faixa de preço de variações cabe em uma linha */
  body.post-type-archive-product .product-item__description .price:has(> .woocommerce-Price-amount ~ .woocommerce-Price-amount) {
    font-size: 13px;
    letter-spacing: -.25px;
  }

  /* Promoção: preço anterior e atual em duas linhas claras */
  body.post-type-archive-product .product-item__description .price:has(del) {
    min-height: 42px;
    white-space: normal;
  }

  body.post-type-archive-product .product-item__description .price del,
  body.post-type-archive-product .product-item__description .price ins {
    display: block;
  }

  body.post-type-archive-product .product-item__description .price del {
    margin-bottom: 3px;
    font-size: 12px;
    line-height: 1.1;
  }

  body.post-type-archive-product .product-item__description .price ins {
    font-size: 16px;
    line-height: 1.1;
  }
}


/* Correção de preços no catálogo mobile */
@media (max-width: 767px) {
  /* Faixa de preços de variações: mantém os dois valores dentro do card */
  body.post-type-archive-product .product-item__description .price:has(> .woocommerce-Price-amount ~ .woocommerce-Price-amount) {
    overflow: visible !important;
    font-size: 13px !important;
    letter-spacing: -.35px;
  }

  /* Oferta: preço anterior na primeira linha; atual e desconto na segunda */
  body.post-type-archive-product .product-item__description .price:has(> del) {
    min-height: 42px;
    white-space: normal;
  }
  body.post-type-archive-product .product-item__description .price > del {
    display: block !important;
    width: max-content !important;
    margin: 0 0 3px !important;
    color: #8e718f;
    text-decoration: line-through !important;
    text-decoration-thickness: 1px;
  }
  body.post-type-archive-product .product-item__description .price > del::before,
  body.post-type-archive-product .product-item__description .price > del::after {
    display: none !important;
    content: none !important;
  }
  body.post-type-archive-product .product-item__description .price > ins {
    display: inline-block !important;
    color: #e33c59;
    text-decoration: none !important;
  }
  body.post-type-archive-product .product-item__description .price > .onsale {
    display: inline-block !important;
    margin: 0 0 0 6px !important;
    padding: 3px 6px;
    vertical-align: baseline;
    line-height: 1;
  }
}


/* Ajuste final: seletores compatíveis com o catálogo atual */
@media (max-width: 767px) {
  body.post-type-archive-product .product-item__description .price > .woocommerce-Price-amount[aria-hidden="true"],
  body.post-type-archive-product .product-item__description .price > span[aria-hidden="true"]:not(.woocommerce-Price-amount) {
    font-size: 13px !important;
    letter-spacing: -.35px;
  }
  body.post-type-archive-product .product-item__description .price > del {
    display: block !important;
    width: max-content !important;
    margin: 0 0 3px !important;
    color: #8e718f;
    text-decoration: line-through !important;
    text-decoration-thickness: 1px;
  }
  body.post-type-archive-product .product-item__description .price > del::before,
  body.post-type-archive-product .product-item__description .price > del::after {
    display: none !important;
    content: none !important;
  }
  body.post-type-archive-product .product-item__description .price > ins {
    display: inline-block !important;
    color: #e33c59;
    text-decoration: none !important;
  }
  body.post-type-archive-product .product-item__description .price > .onsale {
    display: inline-block !important;
    margin: 0 0 0 6px !important;
    padding: 3px 6px;
    vertical-align: baseline;
    line-height: 1;
  }
}


/* Refinos finais do catálogo */
/* Remove o selo percentual vermelho dos cards */
body.post-type-archive-product .product-item__description .price > .onsale {
  display: none !important;
}

/* Desktop: título do produto em até duas linhas */
@media (min-width: 768px) {
  body.post-type-archive-product .woocommerce-loop-product__title {
    display: -webkit-box !important;
    min-height: 2.7em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}


/* Refinos finais do catálogo */
body.post-type-archive-product .product-item__description .price > .onsale {
  display: none !important;
}

@media (min-width: 768px) {
  body.post-type-archive-product .woocommerce-loop-product__title {
    display: -webkit-box !important;
    min-height: 2.7em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}


/* Preço final com escala consistente no catálogo mobile */
@media (max-width: 767px) {
  body.post-type-archive-product .product-item__description .price > .woocommerce-Price-amount:not([aria-hidden="true"]),
  body.post-type-archive-product .product-item__description .price > ins {
    font-size: 16px !important;
    line-height: 1.2 !important;
  }
  body.post-type-archive-product .product-item__description .price > del {
    font-size: 12px !important;
    line-height: 1.1 !important;
  }
}


/* Aplica os mesmos refinamentos à vitrine de produtos da home */
body.home .product-item__description .price > .onsale {
  display: none !important;
}

@media (min-width: 768px) {
  body.home .woocommerce-loop-product__title {
    display: -webkit-box !important;
    min-height: 2.7em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 767px) {
  body.home .product-item__description .price > .woocommerce-Price-amount:not([aria-hidden="true"]),
  body.home .product-item__description .price > ins {
    font-size: 16px !important;
    line-height: 1.2 !important;
  }
  body.home .product-item__description .price > del {
    font-size: 12px !important;
    line-height: 1.1 !important;
  }
}


/* Catálogo desktop: preço final consistente e sem selo de desconto */
body.post-type-archive-product .product_item .price .onsale,
body.home .product_item .price .onsale {
    display: none !important;
}

@media (min-width: 768px) {
    body.post-type-archive-product .product_item .price > .woocommerce-Price-amount,
    body.post-type-archive-product .product_item .price ins .woocommerce-Price-amount,
    body.home .product_item .price > .woocommerce-Price-amount,
    body.home .product_item .price ins .woocommerce-Price-amount {
        color: #40004e !important;
        font-size: 23px !important;
        font-weight: 300 !important;
        line-height: 1.4 !important;
    }

    body.post-type-archive-product .product_item .price del,
    body.home .product_item .price del {
        color: #8a748e !important;
        font-size: 13px !important;
        font-weight: 400 !important;
        line-height: 1.2 !important;
        text-decoration: line-through !important;
        text-decoration-thickness: 1px !important;
        text-decoration-color: currentColor !important;
    }
}
