/* ============================================================
   IASCOM Cart v1.1 — ΕΝΑ ενιαίο κουτί «Καλάθι» για το NATIVE WooCommerce.
   Scoped κάτω από .iasc-v2. Καμία αλλαγή λογικής — μόνο εμφάνιση.

   ┌ Καλάθι ───────────────────────────────────────────────────┐
   │ ×  img  Προϊόν      Τιμή   [− qty +]   Υποσύνολο            │
   │         200 mA                                             │
   ├───────────────────────────────────────────────────────────┤
   │ ⚡ Σύνολο Ampere … │[Ενημέρωση]│ Υποσύνολο 58,10€ │[Ολοκλήρωση]│
   └───────────────────────────────────────────────────────────┘
              [ Προσφορά Λιανικής ]   ← διακριτικά, κάτω
   ============================================================ */

/* ---------- Καθάρισμα spurious theme/Elementor περιγράμματος γύρω από το shortcode ---------- */
[class*="gdlr-core"]:has(.iasc-cart),
[class*="infinite-"]:has(.iasc-cart),
.elementor-section:has(.iasc-cart),
.elementor-column:has(.iasc-cart),
.elementor-widget:has(.iasc-cart),
.elementor-widget-wrap:has(.iasc-cart),
.elementor-widget-container:has(.iasc-cart),
.e-con:has(.iasc-cart),
.e-con-inner:has(.iasc-cart) {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}
.iasc-v2,
.iasc-v2 .woocommerce {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}
.iasc-v2 .woocommerce { font-size: 16px; }

/* ---------- Τίτλος «Καλάθι» πάνω από το κουτί ---------- */
.iasc-v2 .iasc-cart-heading {
    font-size: 24px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 16px;
}

/* ---------- Το κουτί (κάρτα) = η φόρμα ---------- */
.iasc-v2 .woocommerce-cart-form {
    display: block;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 18px 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

/* ---------- Πίνακας προϊόντων ---------- */
.iasc-v2 table.cart {
    border: none !important;
    margin: 0 !important;
    background: transparent !important;
    width: 100% !important;
    table-layout: fixed; /* σταθερές στήλες → άπλωμα σε όλο το πλάτος */
}
/* Πλάτη στηλών — απλώνονται ομοιόμορφα, ΥΠΟΣΥΝΟΛΟ τέρμα δεξιά */
.iasc-v2 table.cart th.product-remove,    .iasc-v2 table.cart td.product-remove    { width: 4%; }
.iasc-v2 table.cart th.product-thumbnail, .iasc-v2 table.cart td.product-thumbnail { width: 8%; }
.iasc-v2 table.cart th.product-name,      .iasc-v2 table.cart td.product-name      { width: 30%; }
.iasc-v2 table.cart th.product-price,     .iasc-v2 table.cart td.product-price     { width: 16%; text-align: center; }
.iasc-v2 table.cart th.product-quantity,  .iasc-v2 table.cart td.product-quantity  { width: 21%; text-align: center; }
.iasc-v2 table.cart th.product-subtotal,  .iasc-v2 table.cart td.product-subtotal  { width: 21%; text-align: center; }
.iasc-v2 table.cart thead th {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid #f3f3f3 !important;
    padding: 0 14px 12px !important;
    font-size: 15px;
    font-weight: 700;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-align: left;
}
.iasc-v2 table.cart tbody td {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #f3f3f3 !important;
    padding: 9px 14px !important; /* μαζεμένο — λιγότερο κενό μεταξύ προϊόντων */
    vertical-align: middle;
}
.iasc-v2 table.cart tbody tr:last-child td { border-bottom: none !important; }

/* Διαγραφή (×) */
.iasc-v2 table.cart td.product-remove { width: 36px; }
.iasc-v2 table.cart td.product-remove a.remove {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f3f3f3 !important;
    color: #999 !important;
    font-size: 20px;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.2s ease, color 0.2s ease;
}
.iasc-v2 table.cart td.product-remove a.remove:hover {
    background: #c62828 !important;
    color: #fff !important;
}

/* Φωτογραφία */
.iasc-v2 table.cart td.product-thumbnail { width: 74px; }
.iasc-v2 table.cart td.product-thumbnail img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
}

/* Όνομα προϊόντος + space δίπλα στον τίτλο */
.iasc-v2 table.cart td.product-name { padding-right: 28px !important; }
.iasc-v2 table.cart td.product-name a {
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
}
.iasc-v2 table.cart td.product-name a:hover { color: #c62828; }

/* mA δίπλα στο προϊόν — μπορντό, με ΚΕΝΟ από τον τίτλο, χωρίς εικονίδιο */
.iasc-v2 table.cart td.product-name .iascom-line-ma-name {
    display: inline;
    margin-left: 9px;
    color: #c62828 !important;
    font-weight: 700;
    font-size: 0.82em;
    white-space: nowrap;
}
.iasc-v2 table.cart td.product-name .iascom-line-ma-name .iascom-ma-icon,
.iasc-v2 table.cart td.product-subtotal .iascom-line-ma .iascom-ma-icon {
    display: none !important;
}
.iasc-v2 table.cart td.product-subtotal .iascom-line-ma { color: #c62828 !important; }

/* Τιμή / Υποσύνολο γραμμής */
.iasc-v2 table.cart td.product-price { font-weight: 600; color: #1a1a1a; }
.iasc-v2 table.cart td.product-subtotal { font-weight: 700; color: #1a1a1a; }

/* Ποσότητα — input + βελάκια +/- */
.iasc-v2 table.cart td.product-quantity .quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.iasc-v2 table.cart td.product-quantity input.qty {
    width: 46px;
    height: 38px;
    border: none;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    background: transparent;
    -moz-appearance: textfield;
}
.iasc-v2 table.cart td.product-quantity input.qty::-webkit-outer-spin-button,
.iasc-v2 table.cart td.product-quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.iasc-v2 .iasc-qty-btn {
    width: 36px;
    height: 38px;
    border: none;
    background: #f7f7f7;
    color: #c62828;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease;
}
.iasc-v2 .iasc-qty-btn:hover { background: #c62828; color: #fff; }
.iasc-v2 .iasc-qty-btn:active { background: #a51c1c; color: #fff; }

/* ============================================================
   FOOTER ROW (μέσα στον πίνακα) — ευθυγραμμισμένο με τις στήλες:
   [κενό remove+thumb] [Σύνολο Ampere] [Ενημέρωση] [Υποσύνολο]
   ============================================================ */
.iasc-v2 table.cart tr.iasc-bar-row td {
    border-top: 1px solid #f3f3f3 !important;
    border-bottom: none !important;
    padding: 16px 14px !important;
    vertical-align: middle;
    background: transparent !important;
}

/* Σύνολο Ampere (μόνο τιμή) — κάτω από Προϊόν/Τιμή */
.iasc-v2 td.iasc-bar-ma {
    text-align: left;
    white-space: nowrap;
    font-size: 16px;
    color: #c62828;
}
.iasc-v2 td.iasc-bar-ma .iascom-ma-icon { color: #c62828; stroke: #c62828; vertical-align: middle; }
.iasc-v2 .iasc-bar-ma-label { color: #555; font-weight: 600; }
.iasc-v2 .iasc-bar-ma-val { color: #c62828; font-weight: 800; }

/* Ενημέρωση — κεντραρισμένο κάτω από ΠΟΣΟΤΗΤΑ */
.iasc-v2 td.iasc-bar-update { text-align: center; }
.iasc-v2 .iasc-update-btn {
    height: 42px;
    padding: 0 22px;
    border: 1px solid #ddd;
    border-radius: 9px;
    background: #fff;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.iasc-v2 .iasc-update-btn:not(:disabled):hover { border-color: #c62828; color: #c62828; }
.iasc-v2 .iasc-update-btn:disabled { opacity: 0.5; cursor: default; }

/* Υποσύνολο — κεντραρισμένο κάτω από ΥΠΟΣΥΝΟΛΟ */
.iasc-v2 td.iasc-bar-subtotal { text-align: center; white-space: nowrap; }
.iasc-v2 .iasc-bar-subtotal-label { font-size: 14px; color: #555; font-weight: 600; margin-right: 6px; }
.iasc-v2 .iasc-bar-subtotal-val { font-size: 23px; font-weight: 800; color: #1a1a1a; }
.iasc-v2 .iasc-bar-subtotal-val .amount { color: #1a1a1a; }

/* ============================================================
   ΕΞΩ ΑΠΟ ΤΟ ΚΟΥΤΙ: Προσφορά Λιανικής + Ολοκλήρωση Παραγγελίας (δεξιά)
   ============================================================ */
.iasc-v2 .iasc-actions-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 16px;
}
/* Προσφορά Λιανικής — διακριτικό κουμπί */
.iasc-v2 .iasc-actions-quote a.button {
    display: inline-block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 13px 22px !important;
    background: #fff !important;
    color: #555 !important;
    border: 1px solid #ddd !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.iasc-v2 .iasc-actions-quote a.button:hover { border-color: #c62828 !important; color: #c62828 !important; }
/* Ολοκλήρωση Παραγγελίας — κόκκινο CTA */
.iasc-v2 .iasc-actions-checkout a.checkout-button {
    display: inline-block;
    margin: 0;
    padding: 15px 34px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%) !important;
    color: #fff !important;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.iasc-v2 .iasc-actions-checkout a.checkout-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.4);
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .iasc-v2 .woocommerce-cart-form { padding: 14px; }
    /* Στο κινητό το shop_table_responsive στοιβάζει — άφησε auto πλάτη */
    .iasc-v2 table.cart { table-layout: auto; }
    /* Footer row σε στοίβα, κεντραρισμένα */
    .iasc-v2 table.cart tr.iasc-bar-row td.iasc-bar-spacer { display: none !important; }
    .iasc-v2 table.cart tr.iasc-bar-row td {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        border: none !important;
        padding: 8px 0 !important;
    }
    .iasc-v2 table.cart tr.iasc-bar-row td.iasc-bar-ma {
        border-top: 1px solid #f3f3f3 !important;
        padding-top: 16px !important;
        text-align: center !important;
    }
    .iasc-v2 td.iasc-bar-subtotal { text-align: center !important; }
    .iasc-v2 .iasc-update-btn { width: 100%; }
    .iasc-v2 .iasc-actions-row { justify-content: center; }
    .iasc-v2 .iasc-actions-quote,
    .iasc-v2 .iasc-actions-checkout { flex: 1 1 100%; text-align: center; }
    .iasc-v2 .iasc-actions-quote a.button,
    .iasc-v2 .iasc-actions-checkout a.checkout-button { display: block; width: 100%; }
}
