/*
Theme Name: Economía Digital

WooCommerce styles override
*/

/* Estilos base del recibo */
body .woocommerce {
  font-family: 'Inter', sans-serif;
  color: #0e3b45;
  background-color: #fff;
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  border: 1px solid #ddd;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  border-radius: 8px;
}

.woocommerce h2,
.woocommerce h3 {
  border-bottom: 2px solid #ddd;
  padding-bottom: 0.5rem;
  margin-top: 2rem;
  color: #0e3b45;
  margin-bottom: 0.5rem;
}

.woocommerce-notice {
  background-color: #e0f7e9;
  border-left: 4px solid #34a853;
  padding: 1rem;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* Página producto */
.single-product .product_title{
  font-size: 26px!important;
  line-height: 28px;
}
.woocommerce-tabs{
  border-top: 0!important;
  margin-top: 0!important;
}
.woocommerce-tabs .wc-tabs{
  display: none!important;
}

.products .add_to_cart_button{
  font-family: 'Open Sans', sans-serif;
}

h2.woocommerce-loop-product__title{
  font-size: 20px;
}

/* Lista de resumen */
.woocommerce-order-overview {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  border: 1px solid #ddd;
  padding: 1rem;
  border-radius: 6px;
  background-color: #fafafa;
}

.woocommerce-order-overview li {
  flex: 1 1 40%;
  font-size: 0.95rem;
  border-bottom: 1px dashed #ccc;
  padding: 0.5rem 0;
}

.woocommerce-order-overview strong {
  display: block;
  color: #0e3b45;
  font-weight: 600;
  margin-top: 0.25rem;
}

/* Tablas de detalles */
.woocommerce table.shop_table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: left;
  vertical-align: middle;
}
.woocommerce table.shop_table th {
  background-color: #f5f5f5;
  font-weight: 600;
}

.woocommerce .product-name a {
  color: #0071a1;
  text-decoration: none;
}
.woocommerce .product-name a:hover {
  text-decoration: underline;
}

/* Botón de descarga */
.woocommerce .woocommerce-MyAccount-downloads-file.button,
.add_to_cart_button {
  background-color: #00FFFF;
  color: #0e3b45;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  font-size: 0.9rem;
  max-height: fit-content;
}
.woocommerce .woocommerce-MyAccount-downloads-file.button:hover {
  background-color: #00FFFF;
}

/* Dirección del cliente */
.woocommerce-customer-details address {
  font-style: normal;
  background-color: #fafafa;
  border: 1px solid #ddd;
  padding: 1rem;
  border-radius: 6px;
  line-height: 1.5;
}
@media (max-width: 768px) {
  .woocommerce table.shop_table thead {
    display: none;
  }

  .woocommerce table.shop_table,
  .woocommerce table.shop_table tbody,
  .woocommerce table.shop_table tr,
  .woocommerce table.shop_table td {
    display: block;
    width: 100%;
  }

  .woocommerce table.shop_table tr {
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.75rem;
    background-color: #fdfdfd;
  }

  .woocommerce table.shop_table td {
    text-align: left;
    padding-left: 50%;
    position: relative;
    border: none;
    border-bottom: 1px solid #eee;
  }

  .woocommerce table.shop_table td::before {
    content: attr(data-title);
    position: absolute;
    left: 1rem;
    top: 0.75rem;
    width: 45%;
    padding-right: 1rem;
    white-space: nowrap;
    font-weight: 600;
    color: #555;
  }

  .woocommerce table.shop_table td:last-child {
    border-bottom: none;
  }

}

/* css cart ------------ */

/* Estructura general */
/* .woocommerce-active #header-ad{
    display: none;
  }
*/
.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout {
  font-family: 'Inter', sans-serif;
  padding: 2rem 1rem;
  background-color: #fff;
  color: #111;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  max-width: 1200px;
  margin: 20px 0;
}

/* Títulos */
.wp-block-woocommerce-cart h2,
.wp-block-woocommerce-cart .entry-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1a1a1a;
}

/* Tabla de productos */
.wc-block-cart-items {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.wc-block-cart-items__header {
  border-bottom: 2px solid #ddd;
}

.wc-block-cart-items__header th {
  padding: 1rem;
  text-align: left;
  font-weight: 500;
}

.wc-block-cart-items__row td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #eee;
}

.wc-block-cart-item__image img {
  border-radius: 0.5rem;
  max-width: 80px;
}

/* Detalles del producto */
.wc-block-cart-item__product {
  font-size: 0.95rem;
}

.wc-block-cart-item__product a {
  text-decoration: none;
  font-weight: 500;
}

.wc-block-cart-item__product a:hover {
  text-decoration: underline;
}

/* Cantidad */
.wc-block-components-quantity-selector {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.wc-block-components-quantity-selector__input {
  width: 50px;
  text-align: center;
  padding: 0.25rem;
  border: 1px solid #ccc;
  border-radius: 0.25rem;
}

/* Botones */
.wp-block-button__link,
.wc-block-cart__submit-button, .wc-block-components-button {
  background-color: #00FFFF;
  color: #0e3b45;
  border-radius: 0.5rem;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  transition: background-color 0.3s;
}

.wp-block-button__link:hover,
.wc-block-cart__submit-button:hover {
  background-color: #00FFFF;
}

/* Totales */
.wc-block-cart__sidebar, .wp-block-woocommerce-checkout-order-summary-block{
  background: #fafafa;
  border-radius: 0.75rem;
  padding: 5px 10px!important;
  border: 1px solid #eee;
}

.wc-block-components-totals-wrapper{
  border-top: 0!important;
}

.wc-block-components-totals-item__label {
  font-weight: 500;
  color: #333;
}

.wc-block-components-totals-item__value {
  font-weight: bold;
  font-size: 1.1rem;
}

/* Cross-sells */
.wp-block-woocommerce-cart-cross-sells-block {
  margin-top: 3rem;
}

.wp-block-cart-cross-sells-product__product-title a {
  font-weight: 500;
  color: #222;
}

.cross-sells-product {
  border: 1px solid #eee;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  transition: transform 0.2s ease;
}

.cross-sells-product:hover {
  transform: translateY(-3px);
}

.wc-block-cart-items__header th {
  padding: 1rem;
  font-weight: 600;
  border-bottom: 2px solid #ddd;
  text-align: left;
  font-size: 0.95rem;
  color: #333;
}

 .wp-block-heading.has-large-font-size {
   font-size: 24px !important; 
   font-weight: normal;  
   color: #0e3b45;
 }

 .wc-block-components-formatted-money-amount{
    color: #0e3b45;
    font-weight: 600;
 }

/* ---- fin css cart --- */

/* Responsive styles for order details table */

@media (max-width: 768px) {
  .woocommerce-table--order-details thead {
    display: none;
  }

    .woocommerce-table--order-details tfoot th {
    display: none;
  }

  .woocommerce-table--order-details,
  .woocommerce-table--order-details tbody,
  .woocommerce-table--order-details tr,
  .woocommerce-table--order-details td,
  .woocommerce-table--order-details tfoot,
  .woocommerce-table--order-details tfoot tr,
  .woocommerce-table--order-details tfoot td {
    display: block;
    width: 100%;
  }

  .woocommerce-table--order-details tr {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 0.75rem;
    background-color: #fff;
  }

  .woocommerce-table--order-details td {
    position: relative;
    padding-left: 50%;
    text-align: left;
    border: none;
    border-bottom: 1px solid #eee;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    font-size: 0.95rem;
  }

  .woocommerce-table--order-details td::before {
    content: attr(data-label);
    position: absolute;
    left: 1rem;
    top: 0.75rem;
    width: 45%;
    padding-right: 1rem;
    white-space: nowrap;
    font-weight: 600;
    color: #444;
  }

  .woocommerce-table--order-details tfoot td::before {
    content: attr(scope);
    font-weight: 600;
    color: #444;
  }

  .woocommerce-table--order-details tfoot tr {
    border-top: 1px solid #eee;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 1rem;
    border-radius: 0 !important;
    border-collapse: collapse;
  }
}

/* === Página de login de WooCommerce === */
.woocommerce form.woocommerce-form-login {
  background-color: #fafafa;
  border: 1px solid #ddd;
  padding: 2rem;
  border-radius: 10px;
  max-width: 500px;
  margin: 2rem auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.woocommerce form .form-row {
  margin-bottom: 1.5rem;
}

.woocommerce form .form-row label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
  color: #0e3b45;
}

.woocommerce form .input-text,
.woocommerce .password-input input[type="password"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  background-color: #fff;
  transition: border-color 0.3s ease;
}

.woocommerce form .input-text:focus {
  border-color: #00ffff;
  outline: none;
}

.woocommerce .password-input {
  position: relative;
}

.woocommerce .show-password-input {
  background: none;
  border: none;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%230e3b45" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 5c-7.633 0-11 7-11 7s3.367 7 11 7 11-7 11-7-3.367-7-11-7zm0 12c-2.757 0-5-2.243-5-5s2.243-5 5-5 5 2.243 5 5-2.243 5-5 5zm0-8c-1.656 0-3 1.344-3 3s1.344 3 3 3 3-1.344 3-3-1.344-3-3-3z"/></svg>');
  background-repeat: no-repeat;
  background-size: contain;
  cursor: pointer;
}

.woocommerce .woocommerce-form-login__rememberme {
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  color: #555;
}

.woocommerce .woocommerce-form-login__submit {
  background-color: #00ffff;
  color: #0e3b45;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.woocommerce .woocommerce-form-login__submit:hover {
  background-color: #00e6e6;
}

.woocommerce .lost_password a {
  color: #0071a1;
  text-decoration: none;
  font-size: 0.95rem;
}

.woocommerce .lost_password a:hover {
  text-decoration: underline;
}

/* === Avisos y errores === */
.woocommerce-notices-wrapper {
  max-width: 500px;
  margin: 1rem auto 2rem;
}

.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
  list-style: none;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid;
  border-radius: 6px;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  font-size: 0.95rem;
}

.woocommerce-error {
  border-color: #d93025;
  background-color: #ffe9e7;
  color: #8b0000;
}

.woocommerce-message {
  border-color: #34a853;
  background-color: #e0f7e9;
  color: #1b5e20;
}

.woocommerce-info {
  border-color: #4285f4;
  background-color: #e7f0fd;
  color: #0e3b45;
}

/* === Página de producto === */
.single-product .product {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  margin: 2rem auto;
  max-width: 1200px;
}

.single-product .woocommerce-product-gallery {
  flex: 1 1 45%;
}

.single-product .woocommerce-product-gallery img {
  border-radius: 0.75rem;
  width: 100%;
  height: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Eliminar lupa (zoom) */
.woocommerce-product-gallery__wrapper .woocommerce-product-gallery__trigger {
  display: none !important;
}

.single-product .summary {
  flex: 1 1 50%;
  font-family: 'Inter', sans-serif;
  color: #0e3b45;
}
.single-product .summary h2{
  display: none;
}

.single-product .product_title {
  font-size: 2rem;
  font-weight: 600;
  color: #0e3b45;
  margin-bottom: 1rem;
  border-bottom: 2px solid #eee;
  padding-bottom: 0.5rem;
}

.single-product .woocommerce-Price-amount {
  font-size: 1.5rem;
  font-weight: bold;
  color: #0e3b45;
  margin: 1rem 0;
  font-family: 'Open Sans', sans-serif;
}

.single-product .woocommerce-product-details__short-description {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: #444;
}

/* Botón Añadir al carrito */
.single-product .single_add_to_cart_button, .add_to_cart_button {
  background-color: #00FFFF;
  color: #0e3b45;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;

  @media (min-width: 980px) {
    width: auto;
    margin: 0 auto;
  }
}

.single-product .single_add_to_cart_button:hover {
  background-color: #00e6e6;
}

.single-product form.cart {
  margin-top: 1rem;
}

.single-product .quantity input {
  border-radius: 0.5rem;
  border: 1px solid #ccc;
  padding: 0.5rem;
  width: 60px;
  margin-right: 1rem;
}

/* Reviews y tabs */
.woocommerce-tabs {
  margin-top: 3rem;
  border-top: 1px solid #eee;
  padding-top: 2rem;
}

.woocommerce-tabs .wc-tabs {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin-bottom: 1rem;
  border-bottom: 2px solid #ddd;
}

.woocommerce-tabs .wc-tabs li a {
  padding: 0.5rem 1rem;
  font-weight: 600;
  color: #0e3b45;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.woocommerce-tabs .wc-tabs li.active a {
  border-bottom-color: #00FFFF;
}

.woocommerce-Tabs-panel {
  color: #333;
  line-height: 1.6;
}

/* CHECHKOUT */

body.woocommerce-checkout .entry-content .woocommerce{
   max-width: 1000px;
   padding: 20px;
}

@media (min-width: 980px) {
  .woocommerce-checkout #checkout-main-block{
    display: flex;
  }

  .woocommerce-checkout #customer_details .col-1, #customer_details .col-2{
    max-width: 95%;
  }

  .woocommerce-checkout #customer_details{
    width: 100%;
  }


  .woocommerce-checkout .woocommerce-checkout-review-order{
    max-width: 35%;
    height: 100%;
    position: sticky;
    top: 110px;
  }

  .woocommerce-checkout #payment{
    padding-right: 15px;
    padding-left: 15px;
  }
}

.woocommerce-checkout #customer_details{
    width: -webkit-fill-available;
}


@media (max-width: 768px) {
  .woocommerce-checkout #customer_details .col-1, #customer_details .col-2{
    max-width: 100%;
    padding: 0;
  }
  .woocommerce-checkout table.shop_table tr.cart-subtotal, .woocommerce table.shop_table tr.order-total{
    display: inline-table;
    width: 82vw;
  }


  .woocommerce-checkout table.shop_table td{
    padding-left: 0;
      text-align: right;
  }

  .woocommerce-checkout fieldset, .form-row.place-order{
    padding: 0;
    max-width: 95%;
  }
}



.woocommerce-checkout button[type=submit]{
    min-height: 3em;
    height: auto;
    padding: 1em;
    font-weight: 600;
    border-radius: 0.5rem;
    border: 1px solid black;
    -webkit-appearance: button;
    transition: box-shadow .1s linear;
}

.woocommerce-checkout fieldset, .form-row.place-order{
  border: none;
}

.woocommerce-checkout tfoot tr.cart-subtotal{
  display: none;
}

/* Ocultar descripción estándar */
.woocommerce-Tabs-panel--description {
    display: none!important;
}

.quantity, .woocommerce-checkout table.shop_table tr.cart-subtotal{
  display: none;
}

.woocommerce-input-wrapper select{
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.3s ease;
    color: darkgrey;
    -webkit-appearance: auto;
    position: relative;
}

.woocommerce-input-wrapper select::after{
  content: "▼";
  font-size: 1rem;
  top: 6px;
  right: 10px;
  position: absolute;
}


@media (min-width: 980px) {
  /* Fuerza que el texto esté debajo de la imagen */
  .single-product .product {
    display: block !important;
  }

  .single-product .woocommerce-product-gallery {
    width: 46% !important;
    float: left !important;
    margin-right: 20px;
  }

  .single-product .summary p{
    margin-bottom: 20px;
  }

  /* Asegura que el texto empiece justo debajo de la imagen */
  .single-product .summary {
    margin-top: 1.5em;
  }

  /*Relacionados 2 columnas */
  .up-sells ul.products, .related ul.products{
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 20px;
  }

  .up-sells ul.products .button, .related ul.products .button{
    margin-left: 20px;
  }
}


@media (max-width: 980px) {
  .up-sells ul.products .button, .related ul.products .button{
    width: 100%;
    text-align: center;
  }
}