/* ==========================================================================
   Infusion Store — WooCommerce screens
   Replaces WooCommerce's general/layout/smallscreen CSS (disabled in PHP).
   ========================================================================== */

.shop-wrap { padding-bottom: 20px; }

/* Archive header (Shop / exam category) ----------------------------------- */
.woocommerce-products-header {
	background: var(--cream); margin-inline: calc(50% - 50vw); padding-block: 26px 30px;
	padding-inline: max(var(--gutter), calc(50vw - var(--wrap) / 2 + var(--gutter)));
	margin-bottom: 26px;
}
.woocommerce-products-header__title { margin: 0 0 8px; }
.woocommerce-products-header .term-description,
.woocommerce-products-header .page-description { color: #4e5969; max-width: 75ch; }
.woocommerce-products-header .term-description p:last-child,
.woocommerce-products-header .page-description p:last-child { margin-bottom: 0; }
.category-chips { margin-top: 16px; }
.woocommerce-products-header:not(:has(h1, .term-description, .page-description, .category-chips, p)) { display: none; }

.sectionhead--catalogue { margin-top: 8px; }

/* Toolbar: result count + ordering */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-result-count { float: left; margin: 12px 0 18px; color: var(--muted); font-size: .875rem; }
.woocommerce-ordering { float: right; margin: 0 0 18px; }
.woocommerce-ordering select { width: auto; min-width: 220px; padding: 10px 12px; }
ul.products { clear: both; }

/* Product grid and cards -------------------------------------------------- */
ul.products {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
	list-style: none; margin: 0; padding: 0;
}
ul.products::before,
ul.products::after { display: none; }
@media (min-width: 700px) { ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1051px) { ul.products.columns-4,
	ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

ul.products li.product {
	display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 15px; overflow: hidden;
	background: var(--white); transition: box-shadow .2s, transform .2s; position: relative; margin: 0; width: auto; float: none;
}
ul.products li.product:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
ul.products li.product a.woocommerce-LoopProduct-link { display: flex; flex-direction: column; flex: 1; text-decoration: none; color: inherit; padding-bottom: 4px; }

.card-media {
	display: grid; place-items: center; position: relative; aspect-ratio: 1 / 1; padding: 14px;
	background: linear-gradient(#fff, #f5f7fa);
}
.card-media img { width: 100%; height: 100%; object-fit: contain; display: block; margin: 0 !important; }
.card-media .book-cover { width: 58%; max-width: 150px; transform: perspective(600px) rotateY(-9deg); box-shadow: 8px 10px 0 rgb(255 255 255 / 77%), 12px 16px 20px rgb(27 43 58 / 22%); }
.card-media .book-cover strong { font-size: clamp(1rem, 2.4vw, 1.5rem); }

.onsale {
	position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--sale); color: var(--white);
	border-radius: 7px; padding: 4px 8px; font-size: .75rem; font-weight: 700; line-height: 1.3;
}

.card-meta { display: block; padding: 12px 14px 0; font-size: .75rem; font-weight: 700; color: var(--muted); }
ul.products li.product .woocommerce-loop-product__title,
ul.products li.product h2,
ul.products li.product h3 {
	font-size: .875rem; line-height: 1.45; font-weight: 700; color: var(--navy); letter-spacing: 0;
	margin: 6px 14px 8px; padding: 0;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
ul.products li.product .price { display: block; padding: 0 14px; margin-top: auto; font-size: 1rem; font-weight: 700; color: var(--ink); }
.price del { color: var(--muted); font-size: .8125rem; font-weight: 400; margin-right: 6px; opacity: 1; }
.price ins { text-decoration: none; }
.price .screen-reader-text { position: absolute; }
ul.products li.product .star-rating { margin: 0 14px 6px; }
ul.products li.product .button {
	margin: 12px 14px 14px; padding: 11px 10px; font-size: .8125rem; border-radius: 10px;
}
ul.products li.product .added_to_cart { margin: -6px 14px 12px; font-size: .8125rem; font-weight: 700; }
ul.products li.product .button.loading { opacity: .6; }
ul.products li.product .button.added::after { content: " ✓"; }

@media (min-width: 700px) {
	.card-meta { padding: 16px 18px 0; font-size: .8125rem; }
	ul.products li.product .woocommerce-loop-product__title,
	ul.products li.product h2 { font-size: .9375rem; margin: 6px 18px 10px; min-height: 2.9em; }
	ul.products li.product .price { padding: 0 18px; font-size: 1.25rem; }
	ul.products li.product .button { margin: 14px 18px 18px; }
	.card-media { padding: 22px; }
}

/* Star rating (glyph-free, CSS only) */
.star-rating { position: relative; display: inline-block; width: 5.4em; height: 1em; font-size: .875rem; line-height: 1; }
.star-rating::before,
.star-rating span::before { content: "★★★★★"; letter-spacing: .08em; position: absolute; left: 0; top: 0; }
.star-rating::before { color: #d4dae3; }
.star-rating span { overflow: hidden; position: absolute; left: 0; top: 0; height: 100%; padding-top: 1.5em; }
.star-rating span::before { color: #e0a100; }

/* Notices ------------------------------------------------------------------ */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews,
p.no-comments {
	list-style: none; margin: 0 0 20px; padding: 14px 18px; border-radius: 10px; font-size: .9375rem;
	background: #fff5d4; border-left: 4px solid var(--yellow); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
}
.woocommerce-message { background: #e8f8ed; border-left-color: var(--success); }
.woocommerce-error { background: #fdeced; border-left-color: var(--sale); display: block; }
.woocommerce-error li { margin: 2px 0; }
.woocommerce-message .button,
.woocommerce-info .button { order: 2; padding: 9px 14px; font-size: .8125rem; }
.woocommerce-store-notice,
p.demo_store { position: fixed; bottom: 0; left: 0; right: 0; margin: 0; z-index: 60; background: var(--navy); color: var(--white); padding: 12px var(--gutter); font-size: .875rem; }
.woocommerce-store-notice a { color: var(--yellow); }

/* Single product ------------------------------------------------------------ */
div.product { position: relative; }
div.product::after { content: ""; display: table; clear: both; }
.single-product div.product { display: grid; gap: 28px; padding-bottom: 20px; }
@media (min-width: 900px) {
	.single-product div.product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 55px; align-items: start; }
	.single-product div.product > .woocommerce-product-gallery { position: sticky; top: 140px; }
	.single-product div.product > :not(.woocommerce-product-gallery):not(.summary) { grid-column: 1 / -1; }
}
.single-product div.product > .onsale { top: 14px; left: 14px; font-size: .875rem; }

/* Gallery */
.woocommerce-product-gallery { margin: 0; opacity: 1 !important; }
.woocommerce-product-gallery__wrapper { margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.woocommerce-product-gallery__image { background: #f7f8fb; border-radius: 12px; overflow: hidden; }
.woocommerce-product-gallery__image:first-child { grid-column: 1 / -1; border-radius: var(--radius-xl); display: grid; place-items: center; min-height: 320px; padding: 20px; }
.woocommerce-product-gallery__image:first-child img { max-height: 560px; width: auto; object-fit: contain; }
.woocommerce-product-gallery__image:not(:first-child) a { display: block; aspect-ratio: 1; padding: 4px; border: 2px solid transparent; border-radius: 12px; }
.woocommerce-product-gallery__image:not(:first-child) img { width: 100%; height: 100%; object-fit: contain; }
.woocommerce-product-gallery__image a[aria-current="true"] { border-color: var(--navy); }
.woocommerce-product-gallery__image img { display: block; }
.woocommerce-product-gallery__image--placeholder,
.woocommerce-product-gallery .book-cover { margin: 30px auto; width: 60%; max-width: 245px; }
.woocommerce-product-gallery__trigger { display: none; }

/* Summary */
.summary .product_title { font-size: clamp(1.625rem, 3vw, 2.25rem); line-height: 1.2; letter-spacing: -.02em; margin-bottom: 10px; }
.product-facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; }
.product-facts li { background: var(--cream); border: 1px solid #f3e3a8; border-radius: 30px; padding: 5px 12px; font-size: .8125rem; font-weight: 700; color: var(--navy); }
.summary .price { font-size: 1.875rem; font-weight: 700; color: var(--ink); margin: 6px 0 14px; }
.summary .price del { font-size: 1.0625rem; }
.summary .woocommerce-product-details__short-description { color: #3f4a5a; }
.summary .stock { font-weight: 700; }
.summary .stock.in-stock { color: var(--success); }
.summary .stock.out-of-stock { color: var(--sale); }
.summary .woocommerce-product-rating { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; font-size: .875rem; }

form.cart { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; margin: 20px 0; }
form.cart.variations_form { display: block; }
form.cart .quantity input.qty,
.quantity input.qty { width: 76px; text-align: center; padding: 12px 8px; }
form.cart .single_add_to_cart_button { flex: 1 1 220px; background: var(--yellow); border-color: var(--yellow); color: var(--navy); padding: 15px 24px; font-size: 1rem; }
form.cart .single_add_to_cart_button:hover { background: #ffd65c; color: var(--navy); }
form.cart .single_add_to_cart_button.disabled,
form.cart .single_add_to_cart_button:disabled { background: var(--yellow-soft); border-color: #f0dc8e; color: var(--navy); cursor: not-allowed; }
.woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
table.variations { border-collapse: collapse; width: 100%; margin-bottom: 8px; }
table.variations th,
table.variations td { display: block; text-align: left; padding: 0 0 6px; }
table.variations td { padding-bottom: 14px; }
table.variations label { font-size: .9375rem; }
.reset_variations { display: inline-block; margin-top: 8px; font-size: .8125rem; }
.single_variation_wrap .woocommerce-variation-price .price { font-size: 1.5rem; }

.delivery-box { display: grid; grid-template-columns: 26px 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 18px 0; font-size: .9375rem; }
.delivery-box svg { width: 26px; height: 26px; color: var(--navy); }
.delivery-box p { margin: 0 0 4px; }
.delivery-box__help { color: var(--muted); }
.delivery-box__help a { margin-left: 6px; font-weight: 700; color: var(--navy); }

.product_meta { font-size: .8125rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.product_meta > span { display: block; margin-bottom: 4px; }

/* Sections below the summary */
.product-sections { display: grid; gap: 0; border-top: 1px solid var(--line); margin-top: 10px; }
.product-section { padding-block: 28px; border-bottom: 1px solid var(--line); max-width: 900px; }
.product-section h2 { font-size: 1.5rem; margin-bottom: 14px; }
.product-section--description { font-size: 1.0625rem; line-height: 1.75; }
.product-section--description h2,
.product-section--description h3 { margin-top: 1.4em; }
.product-section table,
table.shop_attributes,
table.spec-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.product-section th,
.product-section td { border: 1px solid var(--line); padding: 11px 14px; text-align: left; vertical-align: top; }
.product-section th { background: var(--surface); width: 38%; color: var(--navy); }
table.shop_attributes p { margin: 0; }
.table-scroll + h3 { margin-top: 26px; }
.syllabus-list li,
.sample-list li { margin-bottom: 6px; }
.sample-list a { font-weight: 700; }
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 0 17px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; padding: 15px 0; color: var(--navy); }
.faq details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.faq details div { color: #3f4a5a; }

/* Reviews */
#reviews .commentlist { list-style: none; padding: 0; }
#reviews .comment_container { display: grid; grid-template-columns: 48px 1fr; gap: 12px; border-bottom: 1px solid var(--line); padding: 14px 0; }
#reviews img.avatar { border-radius: 50%; }
#review_form .comment-form-rating .stars a { font-size: 1.25rem; text-decoration: none; }
#review_form p { margin-bottom: 14px; }
#review_form label { display: block; margin-bottom: 6px; }

/* Related / upsells */
.related.products,
.upsells.products { padding-top: 34px; }
.related.products > h2,
.upsells.products > h2 { font-size: 1.5rem; margin-bottom: 18px; }

/* Shared tables and forms (classic cart, checkout, account) ------------------ */
.store-page { padding-block: 24px 56px; }
.store-page .entry-content { font-size: 1rem; line-height: 1.6; }
.shop_table { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: .9375rem; }
.shop_table th,
.shop_table td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.shop_table thead th { font-size: .8125rem; color: var(--muted); }
.shop_table img { width: 64px; height: auto; border-radius: 6px; }
.shop_table .product-remove a { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); text-decoration: none; font-size: 1.25rem; line-height: 1; }
.shop_table .actions { text-align: right; }
.shop_table .coupon { display: inline-flex; gap: 8px; float: left; }
.shop_table .coupon input { width: 180px; }
.cart-collaterals { display: grid; }
.cart_totals { background: var(--surface); border-radius: var(--radius-l); padding: 22px; }
.cart_totals h2 { font-size: 1.25rem; }
.wc-proceed-to-checkout .checkout-button { width: 100%; background: var(--yellow); border-color: var(--yellow); color: var(--navy); padding: 16px; font-size: 1rem; }
@media (min-width: 900px) { .cart-collaterals { grid-template-columns: 1fr 420px; } .cart_totals { grid-column: 2; } }
@media (max-width: 699px) {
	.shop_table_responsive thead { display: none; }
	.shop_table_responsive tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
	.shop_table_responsive td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 6px 0; text-align: right; }
	.shop_table_responsive td::before { content: attr(data-title); font-weight: 700; text-align: left; }
	.shop_table_responsive td.product-remove::before,
	.shop_table_responsive td.product-thumbnail::before,
	.shop_table_responsive td.actions::before { content: none; }
	.shop_table .coupon { float: none; display: flex; width: 100%; margin-bottom: 10px; }
	.shop_table .coupon input { flex: 1; width: auto; }
}

.form-row { margin: 0 0 16px; }
.form-row label { display: block; margin-bottom: 6px; }
.form-row .required { color: var(--sale); text-decoration: none; border: 0; }
.form-row .optional { color: var(--muted); font-weight: 400; }
.form-row.woocommerce-invalid input.input-text { border-color: var(--sale); }
.form-row-first,
.form-row-last { width: 100%; }
@media (min-width: 700px) {
	.form-row-first,
	.form-row-last { width: calc(50% - 8px); float: left; }
	.form-row-last { margin-left: 16px; }
	.form-row-wide { clear: both; }
}
.clear { clear: both; }
.woocommerce-form__label-for-checkbox { display: inline-flex !important; gap: 8px; align-items: center; font-weight: 400; }
.woocommerce-form__input-checkbox { width: 18px; height: 18px; }

/* Classic checkout */
form.checkout { display: grid; gap: 30px; }
@media (min-width: 1000px) {
	form.checkout { grid-template-columns: 1.4fr 1fr; align-items: start; }
	form.checkout #customer_details { grid-column: 1; grid-row: 1 / span 3; }
	form.checkout #order_review_heading,
	form.checkout #order_review { grid-column: 2; }
	form.checkout #order_review { position: sticky; top: 110px; }
}
#customer_details .col-1,
#customer_details .col-2 { width: 100%; }
#order_review_heading { font-size: 1.25rem; margin: 0; }
#order_review { background: var(--surface); border-radius: var(--radius-l); padding: 20px; }
#payment ul.payment_methods { list-style: none; padding: 0; margin: 0 0 16px; }
#payment ul.payment_methods li { border: 1px solid var(--line); background: var(--white); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
#payment .payment_box { font-size: .875rem; color: var(--muted); margin-top: 8px; }
#payment .payment_box p { margin: 0; }
#place_order { width: 100%; background: var(--yellow); border-color: var(--yellow); color: var(--navy); padding: 16px; font-size: 1.0625rem; }
#place_order:hover { background: #ffd65c; }
.woocommerce-terms-and-conditions-wrapper { font-size: .875rem; margin-bottom: 14px; }
.select2-container .select2-selection--single { height: 46px !important; border: 1px solid #cfd7e2 !important; border-radius: var(--radius-s) !important; }
.select2-container .select2-selection__rendered { line-height: 44px !important; padding-left: 13px !important; }
.select2-container .select2-selection__arrow { height: 44px !important; }

/* Order received */
.woocommerce-order-overview { list-style: none; padding: 18px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); background: var(--surface); border-radius: var(--radius-l); }
.woocommerce-order-overview li { font-size: .8125rem; color: var(--muted); }
.woocommerce-order-overview strong { display: block; font-size: 1rem; color: var(--ink); }
.woocommerce-thankyou-order-received { font-size: 1.25rem; font-weight: 700; color: var(--success); }

/* My account */
.woocommerce-account .entry-content > .woocommerce { display: grid; gap: 28px; }
@media (min-width: 900px) { .woocommerce-account.logged-in .entry-content > .woocommerce { grid-template-columns: 240px 1fr; align-items: start; } }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 900px) { .woocommerce-MyAccount-navigation ul { flex-direction: column; } }
.woocommerce-MyAccount-navigation a { display: block; border: 1px solid var(--line); border-radius: 30px; padding: 10px 17px; font-size: .875rem; font-weight: 700; text-decoration: none; }
.woocommerce-MyAccount-navigation .is-active a { background: var(--navy); border-color: var(--navy); color: var(--white); }
.woocommerce-MyAccount-content { min-width: 0; }
.u-columns.col2-set { display: grid; gap: 28px; }
@media (min-width: 900px) { .u-columns.col2-set { grid-template-columns: 1fr 1fr; } }
.woocommerce-form-login,
.woocommerce-form-register,
.woocommerce-ResetPassword,
form.track_order,
.woocommerce-form-coupon { border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px; max-width: 560px; }
.woocommerce-form-login .button,
.woocommerce-form-register .button { margin-top: 6px; }
.woocommerce-Addresses { display: grid; gap: 20px; }
@media (min-width: 700px) { .woocommerce-Addresses { grid-template-columns: 1fr 1fr; } }
.woocommerce-Address { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.woocommerce-Address-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.woocommerce-Address-title h2 { font-size: 1.125rem; }
.password-input { position: relative; display: block; }
.show-password-input { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px; cursor: pointer; }
.show-password-input::after { content: "👁"; }

/* Block cart / checkout: align brand colours, keep WooCommerce's layout */
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout { font-size: 1rem; }
.wc-block-components-button:not(.is-link) { background: var(--navy); color: var(--white); border-radius: 11px; font-weight: 700; }
.wc-block-components-button:not(.is-link):hover { background: var(--ink); color: var(--white); }
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button { background: var(--yellow) !important; color: var(--navy) !important; }
.wc-block-components-checkout-place-order-button:hover,
.wc-block-cart__submit-button:hover { background: #ffd65c !important; }
.wc-block-components-product-badge { border-radius: 6px; }
.wc-block-components-sale-badge { background: var(--sale); color: var(--white); border: 0; }
.wp-block-woocommerce-checkout-order-summary-block,
.wc-block-components-totals-wrapper { border-color: var(--line); }
