/*
Theme Name: Ferk eCommerce
Theme URI: https://example.com/ferk-ecommerce
Author: Ferk
Author URI: https://example.com
Description: Optimized eCommerce theme for Ferk plugin.
Version: 1.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ferk
*/

/* Add screenshot.png in this directory to display the theme preview image. */

/* ============================
   WooCommerce Cart – Nike-like
   ============================ */
/* ===== GHUNA – Cart (layout tipo referencia) ===== */
body.woocommerce-cart{
  --card:#fff;
  --bg:#f7f7f7;
  --border:#e8e8e8;
  --text:#222;
  --muted:#6b7280;
  --btn:#000;           /* primario (Pagar) */
  --btnTxt:#fff;
  --radius:16px;
  --shadow:0 10px 30px rgba(0,0,0,.06);
}

/* Contenedor: 2 columnas en desktop (productos | resumen) */
body.woocommerce-cart .woocommerce{
  max-width:1200px;
  margin-inline:auto;
  padding-inline:16px;
  display:block;
  gap:40px;
}
@media (min-width: 1024px){
  body.woocommerce-cart .woocommerce{
    display:grid;
    align-items:start;
  }
  /* evitar floats heredados del tema */
  .woocommerce .cart-collaterals,
  .woocommerce-page .cart-collaterals,
  .woocommerce .cart_totals{ float:none; width:auto; }
  .woocommerce .cart-collaterals{ position:sticky; top:100px; }
}

/* ---------- LISTA DE PRODUCTOS (fila como tarjeta) ---------- */

/* sacamos cabecera de tabla (vamos a card por fila) */
body.woocommerce-cart .shop_table.cart thead{ display:none; }

/* cada <tr> vira a “card” con grid */
body.woocommerce-cart .shop_table.cart tbody{ display:block; }
body.woocommerce-cart .shop_table.cart tr.cart_item{
  display:grid;
  grid-template-columns: 140px 1fr auto auto;
  grid-template-areas:
    "thumb name qty price"
    "thumb meta  actions actions";
  gap:12px 20px;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:24px;
  margin:0 0 18px;
}
body.woocommerce-cart .shop_table.cart tr.cart_item > td{
  display:block; border:0; padding:0; background:transparent;
}

/* asigno áreas */
body.woocommerce-cart td.product-thumbnail{ grid-area:thumb; }
body.woocommerce-cart td.product-name{ grid-area:name; align-self:center; }
body.woocommerce-cart td.product-price{ display:none; } /* precio unit no se muestra */
body.woocommerce-cart td.product-subtotal{
  grid-area:price; align-self:start; justify-self:end;
  font-weight:800; font-size:1.05rem;
}
body.woocommerce-cart td.product-quantity{ grid-area:qty; justify-self:end; }
body.woocommerce-cart td.product-remove{ grid-area:actions; justify-self:end; }

/* neutralizo labels móviles del tema (evitan el “Subtotal:” duplicado) */
body.woocommerce-cart .shop_table_responsive tr td::before{ content:none !important; }

/* imagen */
body.woocommerce-cart td.product-thumbnail img{
  width:140px; height:140px; object-fit:cover; border-radius:12px;
  box-shadow:0 4px 18px rgba(0,0,0,.06);
}

/* nombre + meta */
body.woocommerce-cart td.product-name a{
  color:var(--text); font-weight:800; font-size:1.15rem; text-decoration:none;
}
body.woocommerce-cart td.product-name small,
body.woocommerce-cart td.product-name .variation{ color:var(--muted); }

/* cantidad (– 1 +) */
body.woocommerce-cart .quantity{
  display:inline-flex; align-items:center; overflow:hidden;
  border:1px solid var(--border); border-radius:12px; background:#fff;
  padding:0;
  gap:0;
}
body.woocommerce-cart .quantity .minus,
body.woocommerce-cart .quantity .plus{
  width:42px; height:44px; display:inline-grid; place-items:center; font-weight:300; font-size:14px;
  text-decoration:none; color:#111;
}
body.woocommerce-cart .quantity .qty{
  width:60px; height:44px; border:0; text-align:center; font-weight:700; background:#fff;
}

/* eliminar */
body.woocommerce-cart .product-remove a.remove{
  width:36px; height:36px; display:inline-grid; place-items:center;
  border-radius:50%; background:#f3f4f6; color:#9ca3af!important; text-decoration:none;
  font-size:18px; transition:.2s;
}
body.woocommerce-cart .product-remove a.remove:hover{
  background:#fee2e2; color:#991b1b!important;
}

/* fila acciones (cupón + actualizar) como bloque limpio */
body.woocommerce-cart .actions{
  background:transparent; border:0; padding:0;
  margin-top:8px; display:flex; gap:10px; flex-wrap:wrap; align-items:center;
}
body.woocommerce-cart .coupon{
  display:flex; gap:8px; align-items:center; flex:1 1 320px;
}
body.woocommerce-cart .coupon input.input-text{
  height:46px; padding:0 12px; border:1px solid var(--border); border-radius:12px; width:100%;
}

/* botones */
body.woocommerce-cart a.button,
body.woocommerce-cart button.button{
  background:#2f2f2f; color:#fff; border:0; border-radius:12px;
  padding:12px 18px; font-weight:800; letter-spacing:.02em;
}
body.woocommerce-cart a.button:hover,
body.woocommerce-cart button.button:hover{ filter:brightness(.92); }

/* ---------- RESUMEN DEL PEDIDO (columna derecha) ---------- */
body.woocommerce-cart .cart_totals{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:22px;
}
body.woocommerce-cart .cart_totals h2{
  margin:0 0 14px; font-size:1.15rem; font-weight:900;
  letter-spacing:.01em; text-transform:none;
}

/* tabla totales */
body.woocommerce-cart .cart_totals .shop_table{ width:100%; border-collapse:separate; border-spacing:0; }
body.woocommerce-cart .cart_totals .shop_table th,
body.woocommerce-cart .cart_totals .shop_table td{
  padding:14px 0; border-top:1px solid var(--border);
}
body.woocommerce-cart .cart_totals .shop_table tr:first-child th,
body.woocommerce-cart .cart_totals .shop_table tr:first-child td{ border-top:0; }

/* total destacado */
body.woocommerce-cart .cart_totals .order-total th,
body.woocommerce-cart .cart_totals .order-total td{
  font-weight:900; font-size:1.05rem;
}

/* botón “Pagar” tipo barra negra */
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button{
  width:100%; height:56px; margin-top:16px;
  background:var(--btn); color:var(--btnTxt); border-radius:12px;
  font-weight:900; letter-spacing:.02em; position:relative;
}
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button::after{
  content:""; position:absolute; right:18px; top:50%; transform:translateY(-50%);
  width:12px; height:12px; border-right:2px solid var(--btnTxt); border-bottom:2px solid var(--btnTxt);
  rotate:-45deg;
}

/* ============================
   WooCommerce Checkout Hero
   ============================ */
body.woocommerce-checkout .ferk-checkout__hero{
  padding:15px;
  text-align:center;
}

/* Hide Elementor header on checkout */
body.woocommerce-checkout [data-elementor-type="header"]{
  display:none !important;
}

body.woocommerce-checkout .ferk-checkout__hero-inner{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

body.woocommerce-checkout .ferk-checkout__logo-wrap{
  text-align:center;
  padding:16px 0;
  width:100%;
}

body.woocommerce-checkout .ferk-checkout__hero-logo,
body.woocommerce-checkout .ferk-checkout__logo{
  max-width:100%;
  height:auto;
}

body.woocommerce-checkout .ferk-checkout__hero-title{
  font-size:1.75rem;
  font-weight:700;
  margin:0;
  display:inline-block;
}

/* Envío: lista prolija */
body.woocommerce-cart .woocommerce-shipping-totals .woocommerce-shipping-methods{
  margin:6px 0 0; padding:0; list-style:none;
}
body.woocommerce-cart .woocommerce-shipping-destination{ color:var(--muted); margin-top:6px; }

/* ---------- Responsive ---------- */
@media (max-width: 767px){
  /* producto en columna */
  body.woocommerce-cart .shop_table.cart tr.cart_item{
    grid-template-columns: 100px 1fr;
    grid-template-areas:
      "thumb name"
      "thumb qty"
      "thumb price"
      "actions actions";
    padding:16px;
  }
  body.woocommerce-cart td.product-subtotal{ font-size:1rem; }
  body.woocommerce-cart .coupon{ flex:1 1 100%; }
  body.woocommerce-cart .woocommerce{ display:block; } /* stack columnas */
  body.woocommerce-cart .cart_totals{ margin-top:12px; }
}

/* ---------- Guardrail anti-overflow dentro del carrito ---------- */
body.woocommerce-cart #main,
body.woocommerce-cart .woocommerce,
body.woocommerce-cart .woocommerce-cart-form{
  max-width:100%;
  overflow-x:visible;
}

/* Elementor motion effects no deben cubrir el carrito */
body.woocommerce-cart .elementor-motion-effects-layer{
  left:0 !important; right:0 !important; width:100% !important;
}
body.woocommerce-cart [class*="elementor-motion-effects"]{ z-index:auto !important; }

/* ============================
   WooCommerce Cart – Nike x Converse layout
   ============================ */
body.woocommerce-cart .ferk-cart{
  padding:0;
  background:#fff;
}

body.woocommerce-cart .ferk-cart__layout{
  margin-inline:auto;
  max-width:1200px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

@media (min-width: 1024px){
  body.woocommerce-cart .ferk-cart__layout{
    flex-direction:row;
    align-items:flex-start;
    gap:10px;
  }
}

body.woocommerce-cart .ferk-cart__items{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:32px;
}

body.woocommerce-cart .ferk-cart__empty{
  font-size:1.05rem;
  color:#374151;
}

body.woocommerce-cart .ferk-cart-item{
  display:flex;
  flex-direction:column;
  gap:24px;
  padding:24px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#fff;
  box-shadow:0 22px 60px rgba(17,24,39,0.08);
}

@media (max-width: 767px){
  body.woocommerce-cart .ferk-cart-item{
    flex-direction:row;
    align-items:flex-start;
    gap:16px;
  }

  body.woocommerce-cart .ferk-cart-item__media{
    flex:0 0 96px;
    max-width:96px;
  }

  body.woocommerce-cart .ferk-cart-item__media img{
    width:100%;
    height:auto;
  }
}

@media (min-width: 768px){
  body.woocommerce-cart .ferk-cart-item{
    flex-direction:row;
    gap:36px;
  }
}

body.woocommerce-cart .ferk-cart-item__media{
  flex-shrink:0;
  max-width:320px;
  background:#fafafa;
  border-radius:12px;
  padding:0;
  margin-bottom:0;
  display:flex;
  align-items:center;
  justify-content:center;
}

body.woocommerce-cart .ferk-cart-item__media img{
  width:100%;
  height:auto;
  max-height:100px;
  object-fit:contain;
}

body.woocommerce-cart .ferk-cart-item__body{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:16px;
  font-size:0.95rem;
  color:#4b5563;
}

body.woocommerce-cart .ferk-cart-item__header{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
}

body.woocommerce-cart .ferk-cart-item__title{
  margin:0;
  font-size:1.15rem;
  font-weight:600;
  line-height:1.35;
  color:#111827;
}

body.woocommerce-cart .ferk-cart-item__title a{
  color:inherit;
  text-decoration:none;
  font-size:16px;
  font-weight:400;
}

body.woocommerce-cart .ferk-cart-item__title a:hover{
  text-decoration:underline;
}

body.woocommerce-cart .ferk-cart-item__price{
  margin:0;
  margin-top:1px;
  font-weight:600;
  color:#111827;
  white-space:nowrap;
}

body.woocommerce-cart .ferk-cart-item__alert{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 16px;
  max-width:90%;
  border-radius:6px;
  background:#d9f9ff;
  color:#2a8db7;
  font-weight:300;
  font-size:12px;
}

body.woocommerce-cart .ferk-cart-item__alert-icon{
  width:15px;
  height:15px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(42,141,183,.18);
  font-weight:700;
}

body.woocommerce-cart .ferk-cart-item__meta{
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  gap:12px 20px;
  flex-wrap:wrap;
}

body.woocommerce-cart .ferk-cart-item__meta-label{
  color:#6b7280;
  font-weight:500;
  margin-right:4px;
}

body.woocommerce-cart .ferk-cart-item__meta-value{
  color:#1f2937;
  font-weight:500;
}

body.woocommerce-cart .ferk-cart-item__sku{
  margin:0;
  color:#6b7280;
  font-weight:500;
  display:flex;
  gap:6px;
}

body.woocommerce-cart .ferk-cart-item__footer{
  margin-top:auto;
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  align-items:center;
  justify-content:space-between;
}

body.woocommerce-cart .ferk-cart-item__quantity{
  display:flex;
  align-items:center;
  gap:12px;
  color:#6b7280;
  font-weight:300;
  font-size:12px;
}

body.woocommerce-cart .ferk-quantity-control{
  display:inline-flex;
  align-items:center;
  border:0;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
  gap:0;
}

body.woocommerce-cart .ferk-quantity-control__btn{
  display:none;
}

body.woocommerce-cart .ferk-quantity-control .qty{
  width:40px;
  height:44px;
  border:0;
  text-align:center;
  font-weight:300;
  font-size:14px;
  background:#fff;
  -moz-appearance:textfield;
}

body.woocommerce-cart .ferk-quantity-control .qty::-webkit-outer-spin-button,
body.woocommerce-cart .ferk-quantity-control .qty::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}

body.woocommerce-cart .ferk-cart-item__actions{
  display:flex;
  align-items:center;
  gap:12px;
}

body.woocommerce-cart .ferk-cart-item__remove{
  width:20px;
  height:20px;
  border-radius:50%;
  border:1px solid #e5e7eb;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:#6b7280!important;
  font-size:12px;
  transition:all .2s ease;
}

body.woocommerce-cart .ferk-cart-item__remove:hover{
  color:#b91c1c!important;
  border-color:#fecaca;
  background:#fee2e2;
}

body.woocommerce-cart .ferk-cart__summary{
  width:100%;
  max-width:380px;
  margin-left:auto;
  display:flex;
  flex-direction:column;
  gap:20px;
  border-radius:12px;
  padding:28px;
  background:none;
  border:0;
  box-shadow:none;
}

@media (min-width: 1024px){
  body.woocommerce-cart .ferk-cart__summary{
    position:sticky;
    top:120px;
  }
}

body.woocommerce-cart .ferk-cart__summary-title{
  margin:0 0 10px;
  font-size:0.95rem;
  font-weight:700;
  text-transform:uppercase;
  text-align:left;
  letter-spacing:.06em;
  color:#111827;
}

body.woocommerce-cart .ferk-cart__summary-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  color:#111827;
  font-size:0.95rem;
}

body.woocommerce-cart .ferk-cart__summary-row + .ferk-cart__summary-row{
  border-top:1px solid #f3f4f6;
  padding-top:14px;
}

body.woocommerce-cart .ferk-cart__summary-label{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:300;
}

body.woocommerce-cart .ferk-cart__summary-value{
  font-weight:600;
  white-space:nowrap;
}

body.woocommerce-cart .ferk-cart__summary-row--shipping .ferk-cart__shipping{
  display:flex;
  justify-content:flex-end;
  width:100%;
  text-align:right;
}

body.woocommerce-cart .ferk-cart__shipping .woocommerce-shipping-methods{
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:flex-end;
}

body.woocommerce-cart .ferk-cart__shipping .woocommerce-shipping-methods li{
  display:flex;
  align-items:center;
  gap:8px;
}

body.woocommerce-cart .ferk-cart__shipping .woocommerce-shipping-methods label{
  display:flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
  color:#111827;
}

body.woocommerce-cart .ferk-cart__shipping .woocommerce-shipping-methods .amount{
  font-weight:700;
}

body.woocommerce-cart .ferk-cart__shipping-note{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 16px;
  border-radius:6px;
  background:#7fff7f;
  font-weight:800;
  font-size:0.85rem;
  color:#0f172a;
}

body.woocommerce-cart .woocommerce-shipping-destination{
  display:none;
}

body.woocommerce-cart .ferk-cart__coupon{
  display:flex;
  align-items:center;
  gap:12px;
  padding-bottom:12px;
  border-bottom:1px solid #111827;
}

body.woocommerce-cart .ferk-cart__coupon .input-text{
  flex:1;
  border:0;
  padding:6px 0;
  font-size:0.95rem;
  font-weight:500;
  color:#111827;
  background:transparent;
}

body.woocommerce-cart .ferk-cart__coupon .input-text::placeholder{
  color:#111827;
  opacity:0.6;
}

body.woocommerce-cart .ferk-cart__coupon-button{
  border:0;
  background:transparent;
  font-size:1.6rem;
  font-weight:700;
  line-height:1;
  color:#111827;
  cursor:pointer;
  padding:0 6px;
}

body.woocommerce-cart .ferk-cart__summary-row--total{
  margin-top:20px;
  font-size:1.05rem;
  font-weight:700;
}

body.woocommerce-cart .ferk-cart__checkout{
  display:flex;
  flex-direction:column;
  gap:16px;
  margin-top:30px;
}

body.woocommerce-cart .ferk-cart__checkout .checkout-button{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:18px;
  background:#111827;
  color:#fff;
  border-radius:8px;
  font-weight:600;
  letter-spacing:.02em;
  transition:filter .2s ease;
}

body.woocommerce-cart .ferk-cart__checkout .checkout-button::after{
  content:"\203A";
  font-size:1.6rem;
  line-height:1;
}

body.woocommerce-cart .ferk-cart__checkout .checkout-button:hover{
  filter:brightness(.9);
}


body.woocommerce-cart .ferk-cart__secure{
  margin:0;
  text-align:center;
  font-size:0.9rem;
  color:rgba(17,24,39,.8);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}

@media (max-width: 767px){
  body.woocommerce-cart .ferk-cart{
    padding:0;
  }

  body.woocommerce-cart .ferk-cart-item{
    padding:18px;
  }

  body.woocommerce-cart .ferk-cart-item__media{
    max-width:100%;
    padding:0;
  }

  body.woocommerce-cart .ferk-cart__summary{
    max-width:100%;
  }
}
