/* CR-06 D09: the Kit product page, cart, checkout, confirmation, error and cancelled states in the existing design system.
   Loaded only on WooCommerce pages (inc/shop.php). Tokens from tokens.css; no new colours, type or radii. */

.ic-shop .ic-crumbs{background:var(--bg-page)}
.ic-shop-notices:empty{display:none}

/* Product page */
.ic-kit{padding:clamp(28px,5vw,72px) 0 clamp(48px,7vw,96px)}
.ic-kit__grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr);gap:clamp(28px,5vw,72px);align-items:start}
.ic-kit__copy{display:flex;flex-direction:column;gap:16px}
.ic-kit__copy>*{margin:0}
.ic-kit__copy .lead p,.ic-kit__copy .body p{margin:0}
.ic-kit__copy .h3{margin-top:12px}
.ic-kit__buy{position:sticky;top:calc(var(--ic-header-h,84px) + 24px);gap:12px;box-shadow:var(--shadow-md);border-top:4px solid var(--ic-sand-500)}
.ic-kit__price{margin:0;font:600 clamp(40px,5vw,52px)/1 var(--font-sans);color:var(--fg-1);letter-spacing:-.015em}
.ic-kit__note{margin:0;font:500 15px/1.5 var(--font-sans);color:var(--fg-2)}
.ic-kit__form{margin:8px 0 0}
.ic-kit__btn{width:100%;white-space:normal;text-align:center;line-height:1.25;padding-top:12px;padding-bottom:12px}
.ic-kit__buy .small{margin:0;color:var(--fg-3)}
@media (max-width:960px){
	.ic-kit__grid{grid-template-columns:minmax(0,1fr)}
	.ic-kit__buy{position:static;order:-1}
}
@media (max-width:640px){
	.ic-kit__buy{padding:22px}
}

/* Cart and checkout pages */
.ic-shop__sec{padding-top:clamp(28px,4vw,56px)}
.ic-shop__wrap{max-width:1000px}
.ic-shop__title{margin:0 0 24px}
.ic-shop .woocommerce{font:var(--text-body);color:var(--fg-1)}
.ic-shop .woocommerce h2,.ic-shop .woocommerce h3{font:600 clamp(20px,2.2vw,24px)/1.3 var(--font-sans);color:var(--fg-1);margin:0 0 14px}

/* Notices: success, information and errors */
.ic-shop .woocommerce-message,.ic-shop .woocommerce-info,.ic-shop .woocommerce-error,.ic-shop .woocommerce-notice{list-style:none;margin:0 0 24px;padding:16px 18px 16px 20px;border:1px solid var(--border-2);border-left:4px solid var(--ic-teal-800);border-radius:var(--radius-md);background:#fff;color:var(--fg-1);font:500 15px/1.5 var(--font-sans)}
.ic-shop .woocommerce-message::before,.ic-shop .woocommerce-info::before,.ic-shop .woocommerce-error::before{display:none}
.ic-shop .woocommerce-error{border-left-color:var(--ic-danger);background:var(--ic-danger-bg)}
.ic-shop .woocommerce-error li{margin:0;padding:0}
.ic-shop .woocommerce-message .button,.ic-shop .woocommerce-info .button{float:none;margin-left:12px}
.ic-shop-state{margin:0 0 28px;padding:22px 24px;border-radius:var(--radius-lg);background:#fff;border:1px solid var(--border-2);border-left:4px solid var(--ic-danger)}
.ic-shop-state .h2{margin:0 0 8px}
.ic-shop-state p{margin:0 0 12px}
.ic-shop .woocommerce-thankyou-order-failed,.ic-shop .woocommerce-thankyou-order-failed-actions{display:none}

/* Buttons: WooCommerce's buttons take the site's primary button */
.ic-shop .woocommerce a.button,.ic-shop .woocommerce button.button,.ic-shop .woocommerce input.button,.ic-shop .woocommerce #place_order,.ic-shop .wc-block-components-button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:0 22px;border:1.5px solid transparent;border-radius:var(--radius-pill);background:var(--action-primary);color:#fff;font:600 15px/1 var(--font-sans);text-decoration:none;cursor:pointer}
.ic-shop .woocommerce a.button:hover,.ic-shop .woocommerce button.button:hover,.ic-shop .woocommerce #place_order:hover{background:var(--action-primary-hover);color:#fff}
.ic-shop .woocommerce #place_order{width:100%;min-height:54px;font-size:16px;float:none;margin-top:8px}
.ic-shop .woocommerce #place_order[disabled],.ic-shop .woocommerce #place_order[aria-busy="true"]{opacity:.7;cursor:progress}
.ic-shop .woocommerce a.button:focus-visible,.ic-shop .woocommerce button:focus-visible,.ic-shop .woocommerce input:focus-visible{outline:3px solid var(--ic-teal-800);outline-offset:3px}

/* Form fields: the same look as the site's own forms */
.ic-shop .woocommerce form .form-row{display:flex;flex-direction:column;gap:6px;margin:0 0 16px;padding:0;float:none;width:100%}
.ic-shop .woocommerce form .form-row label{font:500 14px/1.4 var(--font-sans);color:var(--fg-1);margin:0}
.ic-shop .woocommerce form .form-row .required{color:var(--fg-3);text-decoration:none}
.ic-shop .woocommerce form .form-row input.input-text,.ic-shop .woocommerce form .form-row select,.ic-shop .woocommerce form .form-row textarea{width:100%;min-height:48px;padding:12px 14px;border:1px solid var(--border-field);border-radius:var(--radius-md);background:#fff;font:400 15.5px var(--font-sans);color:var(--fg-1);box-sizing:border-box}
.ic-shop .woocommerce form .form-row input.input-text:focus{outline:3px solid var(--ic-teal-700);outline-offset:2px;border-color:var(--ic-teal-700)}
.ic-shop .woocommerce form .form-row .description{display:block!important;position:static;margin:0;padding:0;background:none;color:var(--fg-3);font:400 13.5px/1.5 var(--font-sans)}
.ic-shop .woocommerce form .form-row .description::before{display:none}
.ic-shop .woocommerce form .form-row.woocommerce-invalid input.input-text{border-color:var(--ic-danger);box-shadow:none}
.ic-shop .woocommerce form .form-row.woocommerce-validated input.input-text{border-color:var(--ic-success)}
.ic-shop .woocommerce-checkout .col2-set{display:block;width:100%}
.ic-shop .woocommerce-checkout .col2-set .col-1,.ic-shop .woocommerce-checkout .col2-set .col-2{float:none;width:100%;max-width:none}
.ic-shop .woocommerce-checkout .col2-set .col-2:empty{display:none}
.ic-shop .woocommerce-billing-fields__field-wrapper{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 20px}
@media (max-width:640px){.ic-shop .woocommerce-billing-fields__field-wrapper{grid-template-columns:minmax(0,1fr)}}

/* Checkout layout: details and the order side by side on desktop, stacked on tablets and phones. Named areas keep
   WooCommerce's error group above both columns whenever it is inserted. */
.ic-shop form.woocommerce-checkout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:"notice notice" "details head" "details review";gap:16px 40px;align-items:start}
.ic-shop form.woocommerce-checkout>*{grid-column:1/-1}
.ic-shop form.woocommerce-checkout>.woocommerce-NoticeGroup{grid-area:notice}
.ic-shop form.woocommerce-checkout #customer_details{grid-area:details}
.ic-shop form.woocommerce-checkout #order_review_heading{grid-area:head;margin:0}
.ic-shop form.woocommerce-checkout #order_review{grid-area:review}
@media (max-width:900px){
	.ic-shop form.woocommerce-checkout{grid-template-columns:minmax(0,1fr);grid-template-areas:"notice" "details" "head" "review"}
}

/* Order summary tables (checkout, cart, confirmation) */
.ic-shop .woocommerce table.shop_table{width:100%;border:1px solid var(--border-2);border-radius:var(--radius-lg);border-collapse:separate;border-spacing:0;background:#fff;margin:0 0 20px;overflow:hidden}
.ic-shop .woocommerce table.shop_table th,.ic-shop .woocommerce table.shop_table td{padding:14px 18px;border:0;border-bottom:1px solid var(--border-2);text-align:left;vertical-align:top;font:400 15px/1.5 var(--font-sans)}
.ic-shop .woocommerce table.shop_table thead th{background:var(--ic-sand-50);font-weight:600}
.ic-shop .woocommerce table.shop_table tr:last-child>*{border-bottom:0}
.ic-shop .woocommerce table.shop_table .order-total th,.ic-shop .woocommerce table.shop_table .order-total td{font-weight:600;font-size:17px;background:var(--bg-tint)}
.ic-shop .woocommerce table.shop_table td:last-child,.ic-shop .woocommerce table.shop_table th:last-child{text-align:right}

/* Payment box: shows the provider's fields once Stripe is connected; until then WooCommerce's "no payment methods" notice */
.ic-shop .woocommerce-checkout #payment{background:#fff;border:1px solid var(--border-2);border-radius:var(--radius-lg)}
.ic-shop .woocommerce-checkout #payment ul.payment_methods{padding:16px 18px;border-bottom:1px solid var(--border-2);margin:0}
.ic-shop .woocommerce-checkout #payment ul.payment_methods li{list-style:none}
.ic-shop .woocommerce-checkout #payment div.form-row{padding:18px}
.ic-shop .woocommerce-checkout #payment div.payment_box{background:var(--bg-page);color:var(--fg-1)}
.ic-shop .woocommerce-checkout #payment div.payment_box::before{display:none}

/* Reg 37 boxes, directly above the pay button */
.ic-reg37{border:0;padding:0;margin:0 0 12px;display:flex;flex-direction:column;gap:12px}
.ic-reg37 .form-row{margin:0!important}
.ic-reg37 .ic-check{display:flex;gap:12px;align-items:flex-start;font:400 14.5px/1.5 var(--font-sans);color:var(--fg-1)}
.ic-reg37 .ic-check input{width:24px;height:24px;margin:1px 0 0;flex:none;accent-color:var(--ic-teal-800)}
.ic-reg37 .form-row.woocommerce-invalid .ic-check{color:var(--ic-danger)}
.ic-reg37__b2b{margin:0;color:var(--fg-3)}
.ic-reg37 .ic-req{color:var(--fg-3);font-size:13px}

/* Confirmation: overview list and downloads */
.ic-shop .woocommerce-order-overview{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;list-style:none;margin:0 0 28px;padding:0}
.ic-shop .woocommerce-order-overview li{margin:0;padding:14px 16px;border:1px solid var(--border-2);border-radius:var(--radius-md);background:#fff;font:400 13px/1.4 var(--font-sans);color:var(--fg-3);float:none;border-right:1px solid var(--border-2)}
.ic-shop .woocommerce-order-overview li strong{display:block;margin-top:4px;font:600 15px/1.4 var(--font-sans);color:var(--fg-1)}
.ic-shop .woocommerce-thankyou-order-received:empty{display:none}
.ic-shop .woocommerce-thankyou-order-received{font:500 18px/1.5 var(--font-sans);border-left-color:var(--ic-success)}
.ic-shop .woocommerce-order-downloads .download-file a{font-weight:600}
.ic-shop .woocommerce-customer-details address{border:1px solid var(--border-2);border-radius:var(--radius-md);padding:14px 16px;font-style:normal}

/* Phones: tables reflow without sideways scrolling */
@media (max-width:640px){
	.ic-shop .woocommerce table.shop_table_responsive thead{display:none}
	.ic-shop .woocommerce table.shop_table_responsive tr,.ic-shop .woocommerce table.shop_table_responsive td{display:block;text-align:left!important}
	.ic-shop .woocommerce table.shop_table_responsive td::before{content:attr(data-title) ": ";font-weight:600}
	.ic-shop .woocommerce table.shop_table th,.ic-shop .woocommerce table.shop_table td{padding:12px 14px}
	.ic-shop .woocommerce table.woocommerce-table--order-downloads td,.ic-shop .woocommerce table.woocommerce-table--order-downloads th{display:block;text-align:left!important;overflow-wrap:anywhere}
	.ic-shop .woocommerce table.woocommerce-table--order-downloads thead{display:none}
	.ic-shop .woocommerce table.woocommerce-table--order-downloads td::before{content:attr(data-title) ": ";font-weight:600}
	.ic-shop .woocommerce-order-overview{grid-template-columns:minmax(0,1fr)}
	.ic-shop .woocommerce-order-overview li strong{overflow-wrap:anywhere}
}
