/* Cart page: list of cards + one summary card. CSS only, the WooCommerce/Flatsome markup and form stay as they are. */

/* ---- Layout: aligned with the title, full width, no divider ---- */
body.pech-cart .woocommerce.row{display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:28px;align-items:start;max-width:none;width:auto;margin:0}
body.pech-cart .woocommerce.row > .col{width:auto;max-width:none;flex:none;padding:0;border:0;margin:0;min-width:0}
body.pech-cart .woocommerce.row > .col::after,body.pech-cart .woocommerce.row > .col::before{display:none}
body.pech-cart .cart-collaterals{display:block;margin:0;width:auto}
body.pech-cart .is-sticky-column,body.pech-cart .is-sticky-column__inner{width:100%}
body.pech-cart .cart-wrapper{overflow:visible;margin:0;padding:0}

/* ---- The table becomes a list of cards ---- */
body.pech-cart table.shop_table.cart{display:block;width:100%;border:0;border-radius:0;overflow:visible;background:none;margin:0}
body.pech-cart table.shop_table.cart thead{display:none}
body.pech-cart table.shop_table.cart tbody{display:flex;flex-direction:column;gap:14px}
body.pech-cart table.shop_table.cart tr.cart_item{display:grid;grid-template-columns:104px minmax(0,1fr) auto 30px;gap:0 20px;align-items:start;padding:20px;border:1px solid var(--line);border-radius:18px;background:#fff}
body.pech-cart table.shop_table.cart tr.cart_item > td{display:block;padding:0;border:0;background:none;text-align:left;min-width:0;width:auto}
body.pech-cart table.shop_table.cart tr.cart_item > td::before{display:none}

/* Photo */
body.pech-cart table.shop_table td.product-thumbnail{grid-column:1;grid-row:1 / span 2}
body.pech-cart table.shop_table td.product-thumbnail a{display:block}
body.pech-cart table.shop_table td.product-thumbnail img{display:block;width:104px;height:104px;max-width:none;min-width:0;object-fit:contain;box-sizing:border-box;padding:6px;margin:0;background:var(--mist);border-radius:12px}

/* Name + options */
body.pech-cart table.shop_table td.product-name{grid-column:2;grid-row:1;font-family:var(--display);font-weight:700;font-size:17px;line-height:1.3;color:var(--ink)}
body.pech-cart td.product-name dl.variation{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px 12px;margin:10px 0 0;padding:0;border:0;font-family:var(--body);font-size:13.5px;font-weight:400;line-height:1.4}
body.pech-cart td.product-name dl.variation dt{float:none;margin:0;padding:0;font-weight:400;color:var(--slate)}
body.pech-cart td.product-name dl.variation dd{float:none;margin:0;padding:0;color:var(--ink);overflow-wrap:anywhere}
body.pech-cart td.product-name dl.variation dd p{display:inline;margin:0;padding:0}
body.pech-cart td.product-name .mobile-product-price{display:none}

/* Price */
body.pech-cart table.shop_table td.product-subtotal{grid-column:3;grid-row:1;text-align:right;font-family:var(--display);font-weight:800;font-size:18px;line-height:1.3;color:var(--ink);white-space:nowrap}
body.pech-cart td.product-subtotal .pech-unit{margin-top:4px;font-size:13px;text-align:right}

/* Print runs are an option of the product: the quantity box is hidden and the price repeats the total */
body.pech-cart table.shop_table.cart tr.cart_item > td.product-price{display:none}
body.pech-cart table.shop_table td.product-quantity{grid-column:2;grid-row:2;margin-top:12px}
body.pech-cart table.shop_table.cart tr.cart_item > td.product-quantity:has(.ux-quantity.hidden){display:none}

/* Remove */
body.pech-cart table.shop_table td.product-remove{grid-column:4;grid-row:1;text-align:right}
body.pech-cart .product-remove a.remove{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;margin:0;border:0 !important;border-radius:50%;background:var(--mist);color:var(--slate) !important;font-size:18px;font-weight:400;line-height:1;text-decoration:none;transition:background .15s,color .15s}
body.pech-cart .product-remove a.remove:hover{background:var(--magenta);color:#fff !important}

/* Back to the shop */
body.pech-cart table.shop_table.cart tbody tr:not(.cart_item){display:block}
body.pech-cart table.shop_table.cart td.actions{display:flex;flex-wrap:wrap;gap:10px;padding:6px 0 0 !important;background:none;border:0}
body.pech-cart .continue-shopping{float:none;margin:0}
body.pech-cart a.button-continue-shopping{display:inline-flex;align-items:center;min-height:0;height:46px;margin:0;padding:0 20px;border:1.5px solid var(--line) !important;border-radius:999px;background:#fff !important;color:var(--ink) !important;font-family:var(--display);font-size:14.5px;font-weight:700;letter-spacing:0;line-height:1;text-transform:none;box-shadow:none}
body.pech-cart a.button-continue-shopping:hover{border-color:var(--ink) !important}

/* ---- One summary card ---- */
body.pech-cart .cart-sidebar{padding:22px !important;border:1px solid var(--line);border-radius:18px;background:#fff}
body.pech-cart .cart_totals{max-width:none}
body.pech-cart .cart_totals > table:first-child{display:none}
body.pech-cart .cart_totals > h2{display:block !important;margin:0 0 8px;font-size:19px;font-weight:800;line-height:1.3;color:var(--ink);text-transform:none;letter-spacing:-.01em}
body.pech-cart .cart_totals table.shop_table{display:table;border:0;border-radius:0;overflow:visible;background:none;margin:0}
body.pech-cart .cart_totals table.shop_table tr{display:table-row}
body.pech-cart .cart_totals table.shop_table > tbody > tr > th,body.pech-cart .cart_totals table.shop_table > tbody > tr > td{display:table-cell;padding:12px 0;border:0;background:none;font-family:var(--body);font-size:15px;font-weight:400;color:var(--ink);text-transform:none;letter-spacing:0;vertical-align:baseline}
body.pech-cart .cart_totals table.shop_table > tbody > tr > td{text-align:right;font-weight:600}
body.pech-cart .cart_totals table.shop_table > tbody > tr > td::before{display:none}

/* Delivery: heading + choices, no box in a box */
body.pech-cart .cart_totals tr.shipping > td.shipping__inner{display:table-cell;padding:12px 0 !important;border-top:1px solid var(--line) !important;border-bottom:1px solid var(--line) !important;text-align:left;font-weight:400}
body.pech-cart .shipping__table{display:block;width:100%;margin:0;border:0}
body.pech-cart .shipping__table tbody,body.pech-cart .shipping__table tr{display:block;width:100%}
body.pech-cart .shipping__table th{display:block;padding:0 0 8px;border:0;font-family:var(--body);font-size:15px;font-weight:400;color:var(--ink);text-transform:none;letter-spacing:0;text-align:left}
body.pech-cart .shipping__table td{display:block;padding:0;border:0;text-align:left}
body.pech-cart .shipping__table td::before{display:none}
body.pech-cart .shipping__list{margin:0;padding:0;list-style:none}
body.pech-cart .shipping__list_item{display:flex;align-items:flex-start;gap:10px;margin:0;padding:6px 0;font-size:14px;line-height:1.35}
body.pech-cart .shipping__list_item input{flex:none;margin:2px 0 0;accent-color:var(--magenta)}
body.pech-cart .shipping__list_label{margin:0;font-size:14px;font-weight:500;color:var(--ink);line-height:1.35;cursor:pointer}

/* Total */
body.pech-cart .cart_totals table.shop_table > tbody > tr.order-total > th,body.pech-cart .cart_totals table.shop_table > tbody > tr.order-total > td{padding:16px 0 4px;font-family:var(--display);font-size:19px;font-weight:800}
body.pech-cart .cart_totals tr.order-total td strong{font-size:23px;font-weight:800}
body.pech-cart .wc-proceed-to-checkout{padding:12px 0 0;margin:0}
body.pech-cart .wc-proceed-to-checkout a.checkout-button{width:100%;margin:0;box-shadow:none;text-transform:none;letter-spacing:0}

/* Coupon: one quiet row */
body.pech-cart form.checkout_coupon{margin:18px 0 0;padding:16px 0 0;border:0;border-top:1px solid var(--line);border-radius:0;background:none}
body.pech-cart form.checkout_coupon .coupon{display:flex;flex-wrap:wrap;gap:8px}
body.pech-cart form.checkout_coupon .widget-title{flex:0 0 100%;margin:0 0 2px;padding:0;border:0;font-family:var(--body);font-size:13.5px;font-weight:500;letter-spacing:0;line-height:1.3;color:var(--slate);text-transform:none}
body.pech-cart form.checkout_coupon .widget-title::after{display:none}
body.pech-cart form.checkout_coupon .widget-title i{display:none}
body.pech-cart form.checkout_coupon input.input-text{flex:1 1 120px;width:auto;min-width:0;height:44px;margin:0;padding:0 14px !important;border:1.5px solid var(--line) !important;border-radius:12px !important;background:#fff !important;box-shadow:none !important;font-size:14px}
body.pech-cart form.checkout_coupon input.input-text:focus{border-color:var(--ink) !important}
body.pech-cart form.checkout_coupon button.button{flex:0 1 auto;width:auto;min-height:0;height:44px;margin:0;padding:0 16px;border:1.5px solid var(--line) !important;border-radius:999px !important;background:#fff !important;color:var(--ink) !important;font-family:var(--display);font-size:13.5px;font-weight:700;letter-spacing:0;line-height:1;text-transform:none;white-space:nowrap;box-shadow:none}
body.pech-cart form.checkout_coupon button.button:hover{border-color:var(--ink) !important}

/* ---- Tablet: the summary goes under the products ---- */
@media (max-width:1000px){
  body.pech-cart .woocommerce.row{grid-template-columns:minmax(0,1fr);gap:20px}
}

/* ---- Phone ---- */
@media (max-width:640px){
  body.pech-cart table.shop_table.cart tr.cart_item{grid-template-columns:72px minmax(0,1fr) 28px;gap:0 12px;padding:14px;border-radius:16px}
  body.pech-cart table.shop_table td.product-thumbnail{grid-row:1}
  body.pech-cart table.shop_table td.product-thumbnail img{width:72px;height:72px;padding:4px;border-radius:10px}
  body.pech-cart table.shop_table td.product-name{font-size:15.5px}
  /* „Ламиниране: 30 микрона мат“ on one line: two columns would leave the value about 60 px */
  body.pech-cart td.product-name dl.variation{display:block;font-size:13px;line-height:1.5}
  body.pech-cart td.product-name dl.variation dt,body.pech-cart td.product-name dl.variation dd{display:inline}
  body.pech-cart td.product-name dl.variation dd::after{content:"\A";white-space:pre}
  body.pech-cart .pech-steps{gap:6px;font-size:13px}
  body.pech-cart .pech-step{padding:6px 11px}
  body.pech-cart table.shop_table td.product-remove{grid-column:3;grid-row:1}
  body.pech-cart .product-remove a.remove{width:28px;height:28px}
  /* „Общо“ on the left, the price and unit price on the right */
  body.pech-cart table.shop_table.cart tr.cart_item > td.product-subtotal{grid-column:1 / -1;grid-row:3;display:grid;grid-template-columns:1fr auto;margin-top:12px;padding-top:12px;border-top:1px solid var(--line);font-size:17px}
  body.pech-cart table.shop_table.cart tr.cart_item > td.product-subtotal::before{content:'Общо';display:block;grid-row:1 / span 2;align-self:center;font-family:var(--body);font-size:14px;font-weight:500;color:var(--slate);text-align:left}
  body.pech-cart td.product-subtotal .pech-unit{margin-top:1px}
  body.pech-cart table.shop_table td.product-quantity{grid-column:2 / -1}
  body.pech-cart .cart-sidebar{padding:18px !important;border-radius:16px}
  body.pech-cart table.shop_table.cart td.actions{justify-content:center}
}

/* Quantity, on the few products sold by the piece */
body.pech-cart td.product-quantity .ux-quantity{display:inline-flex;align-items:stretch;height:38px;margin:0;border:1.5px solid var(--line);border-radius:10px;overflow:hidden;background:#fff}
body.pech-cart td.product-quantity .ux-quantity input{height:100% !important;min-height:0;margin:0;border:0 !important;border-radius:0 !important;background:none !important;box-shadow:none !important;color:var(--ink)}
body.pech-cart td.product-quantity .ux-quantity input.button{width:34px;padding:0;font-size:16px;font-weight:600;line-height:1}
body.pech-cart td.product-quantity .ux-quantity input.qty{width:36px;padding:0;text-align:center;font-family:var(--display);font-weight:700}

/* Notices start at the card edge; empty cart */
body.pech-cart .message-wrapper,body.pech-cart .message-container{max-width:none;width:auto;margin-left:0;margin-right:0;padding-left:0;padding-right:0}
body.pech-cart .woocommerce-message,body.pech-cart .woocommerce-info{text-align:left}
body.pech-cart .woocommerce-message a,body.pech-cart .woocommerce-info a:not(.button){font-weight:600;color:var(--ink);text-decoration:underline}
body.pech-cart .return-to-shop{margin:26px 0 8px;text-align:left}
body.pech-cart .return-to-shop a.button{display:inline-flex;align-items:center;height:50px;min-height:0;margin:0;padding:0 26px;border:0;border-radius:999px;background:var(--magenta) !important;color:#fff !important;font-family:var(--display);font-size:15px;font-weight:700;letter-spacing:0;line-height:1;text-transform:none;box-shadow:none}
body.pech-cart .return-to-shop a.button:hover{background:#e60069 !important}
