/* ==========================================================================
   WooCommerce Dark Luxury (/tienda/, /carrito/, /finalizar-compra/, /mi-cuenta/)
   ========================================================================== */

.ef-wc-page {
  padding: clamp(2.25rem, 5vw, 4.25rem) 0;
}

.woocommerce,
.woocommerce-page {
  color: var(--ef-color-texto);
}

/* Mensajes y alertas WooCommerce */
.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
  background: #0d0f15 !important;
  color: var(--ef-color-blanco) !important;
  border: 1px solid rgba(212, 175, 55, 0.35) !important;
  border-top: 3px solid var(--ef-color-primario) !important;
  border-radius: var(--ef-radius-sm);
}

/* Grilla de productos */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
  gap: 1.4rem !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
  display: none !important;
}

.woocommerce ul.products li.product {
  width: 100% !important;
  margin: 0 !important;
  padding: 1.1rem !important;
  background: var(--ef-color-superficie) !important;
  border: 1px solid rgba(212, 175, 55, 0.3) !important;
  border-radius: var(--ef-radius-md) !important;
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--ef-transition), border-color var(--ef-transition), box-shadow var(--ef-transition);
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-4px);
  border-color: var(--ef-color-dorado-claro) !important;
  box-shadow: var(--ef-shadow-gold);
}

.woocommerce ul.products li.product a img,
.woocommerce div.product div.images img {
  width: 100% !important;
  aspect-ratio: 1 / 1;
  height: auto !important;
  object-fit: contain;
  background: #ffffff;
  padding: 10px;
  border-radius: var(--ef-radius-sm);
  margin-bottom: 0.85rem !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: var(--ef-color-blanco) !important;
  font-family: var(--ef-fuente-display) !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  letter-spacing: 0.03em;
  padding: 0 0 0.45rem !important;
}

/* Precio regular vs Precio Socio Club */
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price {
  color: var(--ef-color-dorado-claro) !important;
  font-family: var(--ef-fuente-display) !important;
  font-weight: 800 !important;
  font-size: 1.05rem !important;
}

.woocommerce p.price .ef-club-regular-price,
.woocommerce .price del {
  font-size: 0.85em;
  color: #8c8f9c !important;
  margin-right: 0.55rem;
  opacity: 0.85;
}

.ef-club-member-price {
  display: inline-block;
  background: var(--ef-color-primario);
  color: var(--ef-color-blanco);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-weight: 800;
}

.ef-club-discount-note {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--ef-fuente-cuerpo);
  font-size: 0.74rem;
  color: var(--ef-color-dorado-claro);
  font-weight: 600;
}

/* Badge Exclusivo Miembros */
.onsale.ef-exclusivo-badge {
  position: absolute;
  top: 14px !important;
  left: 14px !important;
  right: auto !important;
  background: linear-gradient(135deg, #d4af37, #f6e08a) !important;
  color: #050507 !important;
  font-family: var(--ef-fuente-display) !important;
  font-weight: 800 !important;
  font-size: 0.7rem !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.7rem !important;
  border-radius: 4px !important;
  line-height: 1.2 !important;
  min-height: auto !important;
  min-width: auto !important;
}

/* Botones WooCommerce */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  background: linear-gradient(135deg, var(--ef-color-primario), #b01d1d) !important;
  color: var(--ef-color-blanco) !important;
  border: 1px solid rgba(246, 224, 138, 0.45) !important;
  border-radius: var(--ef-radius-sm) !important;
  font-family: var(--ef-fuente-display) !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem !important;
  padding: 0.75rem 1.2rem !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  background: var(--ef-color-primario-hover) !important;
  color: var(--ef-color-blanco) !important;
}

/* Tablas Carrito / Checkout / Mi Cuenta */
.woocommerce table.shop_table,
.woocommerce-cart table.shop_table,
.woocommerce-checkout #order_review {
  background: #0b0d12 !important;
  color: var(--ef-color-blanco) !important;
  border: 1px solid rgba(212, 175, 55, 0.28) !important;
  border-radius: var(--ef-radius-md) !important;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--ef-color-texto) !important;
}

.woocommerce-checkout #payment {
  background: #0c0e14 !important;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--ef-radius-md);
}

.woocommerce-checkout #payment div.payment_box {
  background: #141722 !important;
  color: var(--ef-color-texto) !important;
}

.woocommerce-checkout #payment div.payment_box::before {
  border-bottom-color: #141722 !important;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea,
.woocommerce .quantity .qty,
.woocommerce .woocommerce-ordering select,
.woocommerce-cart table.cart td.actions .coupon .input-text,
#coupon_code {
  background: #080a0e !important;
  color: var(--ef-color-blanco) !important;
  border: 1px solid rgba(212, 175, 55, 0.35) !important;
  border-radius: var(--ef-radius-sm);
  padding: 0.65rem 0.9rem;
  color-scheme: dark;
}

.woocommerce .quantity .qty {
  width: 4.5rem !important;
  text-align: center;
  font-weight: 700;
}

.woocommerce-cart table.cart td.actions .coupon .input-text,
#coupon_code {
  min-width: 200px !important;
  width: auto !important;
  margin-right: 0.5rem !important;
}

.woocommerce-products-header__title.page-title {
  display: none !important;
}

/* Select2 en Checkout Dark Mode */
.select2-container--default .select2-selection--single {
  background-color: #080a0e !important;
  border: 1px solid rgba(212, 175, 55, 0.35) !important;
  border-radius: var(--ef-radius-sm) !important;
  height: auto !important;
  padding: 0.45rem 0.5rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--ef-color-blanco) !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 50% !important;
  transform: translateY(-50%);
}

.select2-dropdown {
  background-color: #0c0d12 !important;
  border: 1px solid rgba(212, 175, 55, 0.4) !important;
  color: var(--ef-color-texto) !important;
}

.select2-search--dropdown .select2-search__field {
  background-color: #080a0e !important;
  color: var(--ef-color-blanco) !important;
  border: 1px solid rgba(212, 175, 55, 0.3) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[data-selected] {
  background-color: var(--ef-color-primario) !important;
  color: var(--ef-color-blanco) !important;
}

.woocommerce-MyAccount-navigation ul li a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: var(--ef-radius-sm);
  background: #0d0f15;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.5rem;
  font-family: var(--ef-fuente-display);
  font-size: 0.85rem;
  font-weight: 700;
}

.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li a:hover {
  border-color: var(--ef-color-dorado);
  background: rgba(221, 51, 51, 0.16);
  color: var(--ef-color-dorado-claro);
}

@media (max-width: 600px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.85rem !important;
  }

  .woocommerce ul.products li.product {
    padding: 0.7rem !important;
  }

  .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.8rem !important;
  }

  .woocommerce .col2-set .col-1,
  .woocommerce .col2-set .col-2,
  .woocommerce-page .col2-set .col-1,
  .woocommerce-page .col2-set .col-2 {
    width: 100% !important;
    float: none !important;
  }
}
