/* =========================================================================
   CART-CHECKOUT.CSS
   Παίρνει το output των ΚΛΑΣΙΚΩΝ shortcodes [woocommerce_cart] / [woocommerce_checkout]
   (πιο σταθερά με το Divi Builder απ' ό,τι τα WooCommerce Blocks) και το
   στυλάρει ώστε να μοιάζει με σύγχρονο block-based cart/checkout.
   ========================================================================= */

/* ---------------------------------------------------------------------- */
/* CART PAGE                                                              */
/* ---------------------------------------------------------------------- */

.woocommerce-cart .woocommerce{
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 992px){
  .woocommerce-cart form.woocommerce-cart-form{
    grid-column: 1;
  }
}

/* Κάνουμε layout δύο στηλών: cart items αριστερά, totals sticky δεξιά */
@media (min-width: 992px){
  .woocommerce-cart .woocommerce{
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }
  .woocommerce-cart .cart-collaterals{
    grid-column: 2;
    grid-row: 1 / span 2;
    position: sticky;
    top: 24px;
  }
}

/* Table -> "card list" */
table.shop_table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--shop-border-light);
  border-radius: var(--shop-radius-md);
  overflow: hidden;
  background: var(--shop-card-bg);
}
table.shop_table thead{
  display: none; /* κρύβουμε headers, το κάνουμε πιο "block" στυλ */
}
table.shop_table tr{
  border-bottom: 1px solid var(--shop-border-light);
}
table.shop_table tr:last-child{ border-bottom: none; }
table.shop_table td{
  padding: 16px !important;
  vertical-align: middle;
  border: none !important;
}

.woocommerce-cart-form__cart-item td.product-thumbnail img{
  width: 76px;
  border-radius: var(--shop-radius-sm);
  object-fit: cover;
}
.woocommerce-cart-form__cart-item td.product-name a{
  font-weight: 600;
  color: var(--shop-text);
  text-decoration: none;
  font-size: 14px;
}
.woocommerce-cart-form__cart-item td.product-price{
  font-weight: 600;
  font-size: 14px;
}
.woocommerce-cart-form__cart-item td.product-remove a{
  color: var(--shop-text-muted) !important;
  font-size: 20px;
  border: none !important;
  background: none !important;
}
.woocommerce-cart-form__cart-item td.product-remove a:hover{
  color: var(--shop-error) !important;
}

/* Mobile: κάθε γραμμή γίνεται flex "κάρτα" αντί για table row */
@media (max-width: 768px){
  table.shop_table, table.shop_table tbody, table.shop_table tr, table.shop_table td{
    display: block;
    width: 100%;
  }
  table.shop_table tr{
    display: grid;
    grid-template-columns: 76px 1fr;
    grid-template-areas:
      "thumb name"
      "thumb price"
      "thumb qty"
      "thumb subtotal"
      "remove remove";
    gap: 4px 12px;
    padding: 14px;
    position: relative;
  }
  table.shop_table td{ padding: 0 !important; }
  table.shop_table td.product-thumbnail{ grid-area: thumb; }
  table.shop_table td.product-name{ grid-area: name; }
  table.shop_table td.product-price{ grid-area: price; font-size: 13px; color: var(--shop-text-muted); }
  table.shop_table td.product-quantity{ grid-area: qty; }
  table.shop_table td.product-subtotal{ grid-area: subtotal; font-weight: 700; }
  table.shop_table td.product-remove{
    grid-area: remove;
    position: absolute;
    top: 10px; right: 10px;
  }
}

/* Update cart / coupon row */
.woocommerce-cart-form .actions{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 0;
}
.woocommerce-cart-form .coupon{
  display: flex;
  gap: 8px;
  flex: 1 1 260px;
}
.woocommerce-cart-form .coupon .input-text{
  flex: 1;
  border: 1px solid var(--shop-border) !important;
  border-radius: var(--shop-radius-pill) !important;
  padding: 10px 16px !important;
  font-size: 14px;
}

/* Cart totals -> κάρτα σαν "order summary block" */
.cart-collaterals .cart_totals{
  background: var(--shop-bg-alt);
  border-radius: var(--shop-radius-lg);
  padding: 24px;
  width: 100% !important;
  float: none !important;
}
.cart-collaterals .cart_totals h2{
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 16px !important;
}
.cart-collaterals table.shop_table{
  border: none;
  border-radius: 0;
  background: transparent;
}
.cart-collaterals table.shop_table th,
.cart-collaterals table.shop_table td{
  border: none !important;
  border-bottom: 1px solid var(--shop-border) !important;
  padding: 12px 0 !important;
  font-size: 14px;
}
.cart-collaterals table.shop_table thead{ display: table-header-group; }
.cart-collaterals .order-total .woocommerce-Price-amount{
  font-size: 20px;
  font-weight: 700;
}
.cart-collaterals .wc-proceed-to-checkout a.checkout-button{
  width: 100%;
  text-align: center;
  margin-top: 16px !important;
  padding: 14px 20px !important;
  font-size: 15px !important;
}

/* ---------------------------------------------------------------------- */
/* CHECKOUT PAGE                                                          */
/* ---------------------------------------------------------------------- */

.woocommerce-checkout .woocommerce{
  max-width: var(--shop-container-max);
  margin: 0 auto;
}

@media (min-width: 992px){
  .woocommerce-checkout form.checkout.woocommerce-checkout{
    display: grid;
    grid-template-columns: minmax(0,1fr) 400px;
    gap: 40px;
    align-items: start;
  }
  .woocommerce-checkout #customer_details{ grid-column: 1; }
  .woocommerce-checkout #order_review,
  .woocommerce-checkout #order_review_heading{
    grid-column: 2;
    grid-row: 1 / span 3;
    position: sticky;
    top: 24px;
  }
}

/* Section headings */
.woocommerce-checkout h3{
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
  margin: 28px 0 14px 0 !important;
}
.woocommerce-checkout #customer_details h3:first-child{ margin-top: 0 !important; }

/* Form fields, moderno */
.woocommerce form .form-row{ margin-bottom: 14px !important; }
.woocommerce form .form-row label{
  font-size: 13px;
  color: var(--shop-text-muted);
  margin-bottom: 4px;
}
.woocommerce form .input-text,
.woocommerce form select,
.woocommerce-checkout select{
  border: 1px solid var(--shop-border) !important;
  border-radius: var(--shop-radius-sm) !important;
  padding: 12px 14px !important;
  font-size: 14px !important;
  background: var(--shop-bg) !important;
  transition: var(--shop-transition);
}
.woocommerce form .input-text:focus,
.woocommerce form select:focus{
  border-color: var(--shop-primary) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

/* Order review box -> κάρτα */
#order_review, .woocommerce-checkout-review-order{
  background: var(--shop-bg-alt);
  border-radius: var(--shop-radius-lg);
  padding: 24px;
}
#order_review table.shop_table{
  border: none;
  background: transparent;
}
#order_review table.shop_table thead{ display: table-header-group; }
#order_review table.shop_table th,
#order_review table.shop_table td{
  border: none !important;
  border-bottom: 1px solid var(--shop-border) !important;
  padding: 10px 0 !important;
  font-size: 14px;
}
#order_review .order-total .woocommerce-Price-amount{
  font-size: 20px;
  font-weight: 700;
}

/* Payment methods -> κάρτες αντί για radio list */
ul.wc_payment_methods{
  list-style: none;
  margin: 16px 0 0 0 !important;
  padding: 0 !important;
}
ul.payment_methods li{
  border: 1px solid var(--shop-border) !important;
  border-radius: var(--shop-radius-md);
  padding: 12px 14px !important;
  margin-bottom: 10px !important;
  background: var(--shop-bg);
  transition: var(--shop-transition);
}
ul.payment_methods li input[type="radio"]{ margin-right: 8px; }
ul.payment_methods li label{ font-weight: 600; font-size: 14px; }
ul.payment_methods li .payment_box{
  margin-top: 10px;
  font-size: 13px;
  color: var(--shop-text-muted);
  background: var(--shop-bg-alt);
  border-radius: var(--shop-radius-sm);
  padding: 12px;
}

#place_order{
  width: 100%;
  padding: 16px 20px !important;
  font-size: 16px !important;
  margin-top: 10px !important;
}

/* ---------------------------------------------------------------------- */
/* THANK YOU / ORDER RECEIVED                                             */
/* ---------------------------------------------------------------------- */
.woocommerce-order-received .woocommerce-thankyou-order-received{
  background: var(--shop-bg-alt);
  border-radius: var(--shop-radius-lg);
  padding: 28px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}
.woocommerce-order-received table.shop_table{
  margin-top: 24px;
}

/* ---------------------------------------------------------------------- */
/* MINI CART (αν χρησιμοποιείς το widget) - πιο μοντέρνο dropdown         */
/* ---------------------------------------------------------------------- */
.widget_shopping_cart_content ul.woocommerce-mini-cart{
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
}
.widget_shopping_cart_content ul.woocommerce-mini-cart li{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--shop-border-light);
  position: relative;
}
.widget_shopping_cart_content ul.woocommerce-mini-cart li img{
  width: 48px;
  border-radius: var(--shop-radius-sm);
}
.widget_shopping_cart_content .total{
  font-weight: 700;
  margin-top: 10px !important;
}
.widget_shopping_cart_content .woocommerce-mini-cart__buttons a{
  display: block;
  text-align: center;
  margin-top: 8px !important;
}
