/* Estilos para el carrito de WooCommerce - Magna Jewelry *
/* Estilos generales */
.site-main {
  background-color: #f9f9f9 !important;
  padding: 2rem 0 !important;
}

.wp-block-woocommerce-cart {
  max-width: 1200px !important;
  margin: 0 auto !important;
}

/* Diseño de dos columnas */
.wc-block-components-sidebar-layout {
  display: grid !important;
  grid-template-columns: 2fr 1fr !important;
  gap: 2rem !important;
  padding: 1rem !important;
}

@media (max-width: 768px) {
  .wc-block-components-sidebar-layout {
    grid-template-columns: 1fr !important;
  }
}

.wc-block-components-sidebar-layout .wc-block-components-main {
  width: 100% !important;
}

/* Estilos para la tabla de productos */
.wc-block-cart-items {
  width: 100% !important;
  border-collapse: collapse !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background-color: #fff !important;
}

.wc-block-cart-items__header {
  background-color: #f3f3f3 !important;
  text-transform: uppercase !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.5px !important;
}

.wc-block-cart-items__header th {
  padding: 1rem !important;
  text-align: left !important;
  font-weight: 600 !important;
  color: #333 !important;
}

.wc-block-cart-items__row {
  border-bottom: 1px solid #eee !important;
  transition: background-color 0.2s !important;
}

.wc-block-cart-items__row:hover {
  background-color: #f9f9f9 !important;
}

.wc-block-cart-items__row:last-child {
  border-bottom: none !important;
}

.wc-block-cart-item__image {
  width: 210px !important;
  padding: 1rem !important;
}

.wc-block-cart-item__image img {
  width: 100% !important;
  height: auto !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.wc-block-cart-item__product {
  padding: 1rem !important;
}

.wc-block-cart-item__product .wc-block-cart-item__wrap .wc-block-cart-item__quantity {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem !important;
}

.wc-block-cart-item__total {
  padding: 1rem !important;
  text-align: right !important;
  vertical-align: top !important;
}

/* Estilo para nombre de producto */
.wc-block-components-product-name {
  color: #222 !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  text-decoration: none !important;
  display: block !important;
  margin-bottom: 0.5rem !important;
  transition: color 0.2s !important;
}

.wc-block-components-product-name:hover {
  color: #d4af37 !important; /* Color dorado para hover, adecuado para joyería */
}

/* Estilos para precios */
.wc-block-components-product-price {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: #333 !important;
  display: block !important;
  margin: 0.5rem 0 !important;
}

.wc-block-components-product-price__regular {
  text-decoration: line-through !important;
  color: #888 !important;
  font-weight: normal !important;
  margin-right: 0.5rem !important;
}

.wc-block-components-product-price__value.is-discounted {
  color: #c53030 !important;
  font-weight: 600 !important;
}

/* Insignia de descuento */
.wc-block-components-sale-badge {
  background-color: #c53030 !important;
  color: white !important;
  padding: 0.3rem 0.6rem !important;
  border-radius: 4px !important;
  font-size: 0.8rem !important;
  display: inline-block !important;
  margin-top: 0.5rem !important;
}

/* Metadatos del producto */
.wc-block-components-product-metadata {
  font-size: 0.9rem !important;
  color: #666 !important;
  margin: 1rem 0 !important;
}

.wc-block-components-product-details {
  list-style: none !important;
  padding: 0 !important;
  margin: 0.5rem 0 !important;
}

.wc-block-components-product-details li {
  margin-bottom: 0.3rem !important;
}

.wc-block-components-product-details__name {
  font-weight: 600 !important;
  margin-right: 0.5rem !important;
}

/* Selector de cantidad */
.wc-block-components-quantity-selector {
  display: flex !important;
  align-items: center !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  width: fit-content !important;
  margin: 1rem 0 !important;
  overflow: hidden !important;
}

.wc-block-components-quantity-selector__input {
  width: 50px !important;
  text-align: center !important;
  border: none !important;
  padding: 0.5rem !important;
  font-size: 0.9rem !important;
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

.wc-block-components-quantity-selector__input::-webkit-outer-spin-button,
.wc-block-components-quantity-selector__input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

.wc-block-components-quantity-selector__button {
  background: #f5f5f5 !important;
  border: none !important;
  width: 30px !important;
  height: 30px !important;
  font-size: 1.2rem !important;
  cursor: pointer !important;
  transition: background-color 0.2s !important;
}

.wc-block-components-quantity-selector__button:hover:not(:disabled) {
  background-color: #e0e0e0 !important;
}

.wc-block-components-quantity-selector__button:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

/* Botón eliminar */
.wc-block-cart-item__remove-link {
  background: none !important;
  border: none !important;
  color: #888 !important;
  font-size: 0.8rem !important;
  text-decoration: underline !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin-top: 0.5rem !important;
  transition: color 0.2s !important;
}

.wc-block-cart-item__remove-link:hover {
  color: #c53030 !important;
}

.wc-block-components-sidebar {
  width: 100% !important;
}

/* Panel lateral del carrito */
.wc-block-cart__sidebar {
  background-color: #fff !important;
  padding: 1.5rem !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
  align-self: start !important;
}

.wc-block-cart__totals-title {
  font-size: 1.2rem !important;
  margin-top: 0 !important;
  margin-bottom: 1.5rem !important;
  font-weight: 600 !important;
  color: #333 !important;
  border-bottom: 1px solid #eee !important;
  padding-bottom: 1rem !important;
}

/* Estilos para cupones */
.wc-block-components-totals-coupon {
  margin-bottom: 1.5rem !important;
}

.wc-block-components-panel__button {
  background-color: #f5f5f5 !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 0.7rem 1rem !important;
  display: flex !important;
  align-items: center !important;
  cursor: pointer !important;
  width: 100% !important;
  transition: background-color 0.2s !important;
}

.wc-block-components-panel__button:hover {
  background-color: #e0e0e0 !important;
}

.wc-block-components-panel__button-icon {
  margin-right: 0.5rem !important;
}

/* Estilos para totales */
.wc-block-components-totals-wrapper {
  margin-bottom: 1.5rem !important;
}

.wc-block-components-totals-item {
  display: flex !important;
  justify-content: space-between !important;
  padding: 0.5rem 0 !important;
}

.wc-block-components-totals-item__label {
  font-weight: 500 !important;
}

.wc-block-components-totals-footer-item {
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  padding-top: 1rem !important;
  border-top: 1px solid #eee !important;
}

/* Botón proceder al pago */
.wc-block-cart__submit-container {
  margin-top: 1.5rem !important;
}

.wc-block-cart__submit-button {
  background-color: #d4af37 !important; /* Color dorado para joyería */
  color: white !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 1rem 1.5rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: background-color 0.3s !important;
  width: 100% !important;
  text-align: center !important;
  letter-spacing: 0.5px !important;
  text-decoration: none !important;
  display: block !important;
}

.wc-block-cart__submit-button:hover {
  background-color: #c09c2c !important;
}

/* Estilos responsive adicionales */
@media (max-width: 600px) {
  .wc-block-cart-items__header-image {
    display: none !important;
  }

  .wc-block-cart-item__image {
    display: none !important;
  }

  .wc-block-components-quantity-selector {
    margin: 0.5rem 0 !important;
  }

  .wc-block-components-product-name {
    font-size: 1rem !important;
  }

  .wc-block-cart-item__total {
    padding: 0.5rem !important;
  }
}
