/*
 * Cartonomic storefront: WordPress and WooCommerce integration.
 * Loaded after style.css and vibrant.css (the approved design, unchanged).
 * These rules only fit markup that WordPress and WooCommerce produce
 * (block templates, the real order form, notices, cart and checkout,
 * page text from the editor) into the approved design.
 */

/* Block-theme page frame: no gaps or padding between the design's parts. */
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }
/* Header/footer inside a template part wrapper (WooCommerce's own templates):
   the wrapper must not stop the header from sticking. */
.wp-block-template-part:has(> .site-header),
.wp-block-template-part:has(> .site-footer) { display: contents; }
/* The design's headings break where it says; the older theme balanced them. */
h1, h2, h3 { text-wrap: wrap; }

/* Prices from the store: "From" and "· digital file" stay part of the price. */
.price .cn-from, .detail-price .cn-from, .price .cn-format, .detail-price .cn-format { font-weight: inherit; }
.price .cn-format, .detail-price .cn-format { display: none; }
.detail-price .woocommerce-Price-amount, .price .woocommerce-Price-amount { white-space: nowrap; }
.price del, .detail-price del { opacity: .55; font-weight: 600; margin-right: 6px; }
.price ins, .detail-price ins { text-decoration: none; }

/* Basket count (same badge as the saved count). */
.cart-count { background: var(--teal); }

/* ---------- Product page: WooCommerce's real order form ---------- */
.sf-order-form form.cart { margin: 0; display: block; }
.sf-order-form .cn-personalise { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.sf-order-form .cn-personalise legend { font: 800 15px/1.4 'Manrope', 'DM Sans', Arial, sans-serif; letter-spacing: -.01em; margin-bottom: 12px; padding: 0; color: var(--navy); }
.sf-order-form .cn-field { margin: 0 0 14px; }
.sf-order-form .cn-field label,
.sf-order-form table.variations th label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.sf-order-form .cn-req { color: var(--orange); }
.sf-order-form input[type="text"],
.sf-order-form input[type="tel"],
.sf-order-form input[type="date"],
.sf-order-form input[type="time"],
.sf-order-form input[type="number"],
.sf-order-form textarea,
.sf-order-form select {
	display: block; width: 100%; max-width: 100%; min-height: 47px; border: 1px solid #cfd6dc; border-radius: 7px;
	padding: 11px 13px; background-color: #fff; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.35;
}
.sf-order-form select { padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.sf-order-form textarea { min-height: 84px; resize: vertical; }
.sf-order-form input:focus-visible, .sf-order-form select:focus-visible, .sf-order-form textarea:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-color: var(--teal); }
.sf-order-form .cn-personalise__small, .sf-order-form .cn-personalise__note { font-size: 13px; color: var(--muted); margin: 4px 0 0; line-height: 1.6; }
.sf-order-form table.variations { width: 100%; border: 0; border-collapse: collapse; margin: 0 0 16px; }
.sf-order-form table.variations tr, .sf-order-form table.variations th, .sf-order-form table.variations td { display: block; padding: 0; border: 0; text-align: left; background: none; }
.sf-order-form table.variations td.value { margin-bottom: 8px; }
.sf-order-form .reset_variations { font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; display: inline-block; margin-top: 8px; }
.sf-order-form .woocommerce-variation-price { font-size: 20px; font-weight: 800; margin: 4px 0 12px; }
.sf-order-form .woocommerce-variation-description p { font-size: 14px; color: var(--muted); }
.sf-order-form .woocommerce-variation-add-to-cart, .sf-order-form form.cart:not(.variations_form) { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.sf-order-form form.cart:not(.variations_form) > .cn-product-facts,
.sf-order-form form.cart:not(.variations_form) > .cn-personalise,
.sf-order-form form.cart:not(.variations_form) > .cn-offer { flex: 0 0 100%; }
.sf-order-form .quantity { flex: 0 0 auto; }
.sf-order-form .quantity .qty { width: 78px; min-height: 54px; text-align: center; padding: 10px 6px; }
body .personalise-block .sf-order-form .single_add_to_cart_button.button,
body .personalise-block .sf-order-form button.single_add_to_cart_button {
	flex: 1 1 200px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 54px;
	padding: 13px 24px; border-radius: 7px; background: var(--orange); border: 1px solid var(--orange); color: #fff;
	font: 800 16px/1.35 'DM Sans', Arial, sans-serif; letter-spacing: 0; text-transform: none; position: relative; isolation: isolate; overflow: hidden;
	transition: transform .35s var(--motion-ease, ease), box-shadow .35s, background .3s, border-color .3s; cursor: pointer;
}
body .personalise-block .sf-order-form .single_add_to_cart_button:hover { background: #de391d; transform: translateY(-2px); box-shadow: 0 12px 26px #fa4d2b33; }
body .personalise-block .sf-order-form .single_add_to_cart_button.disabled,
body .personalise-block .sf-order-form .single_add_to_cart_button:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.sf-order-form .stock { font-size: 14px; font-weight: 700; color: #24716a; }
.sf-order-form .stock.out-of-stock { color: #b4261a; }
.sf-order-form .cn-offer { border-left: 3px solid var(--teal); background: linear-gradient(110deg, #dbf8ed, #eee4fb); padding: 12px 15px; border-radius: 0 8px 8px 0; font-size: 14px; margin: 0 0 14px; }
.sf-order-form .cn-product-notes { margin-top: 18px; font-size: 13px; color: var(--muted); line-height: 1.7; flex: 0 0 100%; }
.sf-order-form .cn-product-notes ul { margin: 0 0 8px; padding-left: 18px; }
.sf-order-form .cn-product-notes li + li { margin-top: 5px; }
.sf-order-form .cn-product-notes strong { color: var(--ink); }
.sf-order-form .cn-product-notes a { font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.sf-order-form .cn-ai-line { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.sf-order-form .cn-product-facts { display: none; }
.details-accordion .sf-description > :last-child { margin-bottom: 0; }
.details-accordion .sf-description p, .details-accordion .sf-description li { color: var(--muted); }
.details-accordion .sf-reviews .woocommerce-Reviews-title { font-size: 18px; margin: 14px 0; }
.details-accordion .sf-reviews .comment-form input[type="text"],
.details-accordion .sf-reviews .comment-form input[type="email"],
.details-accordion .sf-reviews .comment-form textarea { width: 100%; border: 1px solid #cfd6dc; border-radius: 7px; padding: 10px 12px; }
.details-accordion .sf-reviews .submit { background: var(--navy); color: #fff; border: 0; border-radius: 7px; padding: 12px 20px; font-weight: 800; }

/* ---------- WooCommerce notices (added to basket, errors) ---------- */
#main .woocommerce-notices-wrapper:empty { display: none; }
#main .woocommerce-message, #main .woocommerce-info, #main .woocommerce-error,
#main .wc-block-components-notice-banner {
	list-style: none; margin: 18px 0; padding: 14px 18px; border: 0; border-left: 3px solid var(--teal); border-radius: 0 8px 8px 0;
	background: linear-gradient(110deg, #dbf8ed, #eee4fb); color: var(--ink); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
}
#main .woocommerce-error, #main .wc-block-components-notice-banner.is-error { border-left-color: #d63c25; background: #fff1ee; }
#main .woocommerce-message::before, #main .woocommerce-info::before, #main .woocommerce-error::before { content: none; }
#main .woocommerce-message .button, #main .woocommerce-message a.wc-forward { order: 2; margin-left: auto; background: var(--navy); color: #fff; border-radius: 7px; padding: 9px 16px; font-weight: 800; font-size: 13px; text-decoration: none; }
#main .woocommerce-error li { margin: 0; }

/* ---------- Page text from the editor (help pages, policies, journal) ---------- */
.article-shell .cn-section, .article-shell .cn-light { padding: 0; background: none; color: inherit; }
.article-shell .wp-block-group + .wp-block-group, .article-shell .wp-block-group + h2 { margin-top: 30px; }
.article-shell .cn-lead { font-size: 18px; color: #4d5d6c; max-width: none; }
.article-shell ul, .article-shell ol { padding-left: 22px; margin: 0 0 1.2em; }
.article-shell li + li { margin-top: 7px; }
.article-shell strong { color: var(--ink); }
.article-shell .cn-eyebrow { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 800; color: #633b95; }
.article-shell .cn-notice { background: linear-gradient(110deg, #dbf8ed, #eee4fb); border-left: 3px solid #8c5bcb; padding: 20px 25px; border-radius: 0 8px 8px 0; margin: 25px 0; }
.article-shell .cn-notice p { margin: 0; }
.article-shell .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 0; }
.article-shell .wp-block-button__link, .sf-commerce .wp-block-button__link {
	display: inline-flex; justify-content: center; align-items: center; min-height: 51px; padding: 13px 24px; border-radius: 7px;
	background: var(--navy); border: 1px solid var(--navy); color: #fff !important; font-size: 14px; font-weight: 800; line-height: 1.35; text-decoration: none !important; text-transform: none; letter-spacing: 0;
}
.article-shell .is-style-outline .wp-block-button__link { background: transparent; border-color: #cbd1db; color: var(--navy) !important; }
.article-shell .wp-block-image img { border-radius: 12px; }
.article-shell .wp-block-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; margin: 22px 0; }
.article-shell .wp-block-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.article-shell .wp-block-table td, .article-shell .wp-block-table th { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }
.faq-list .wp-block-details > :not(summary) { margin-top: 0; }
.faq-list .wp-block-details p { color: var(--muted); }
.faq-list > h2, .faq-list .wp-block-group > h2 { margin-bottom: 18px; }
.sf-page-extra { padding-top: 0; }
.sf-social .cn-social, .sf-social ul { display: flex; flex-wrap: wrap; gap: 10px 18px; list-style: none; padding: 0; margin: 0; }
.sf-social a { font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }

/* Journal list */
.sf-post-item { padding: 0 0 28px; margin: 0 0 28px; border-bottom: 1px solid var(--line); }
.sf-post-item h2 { margin: 0 0 6px; }
.sf-post-item h2 a { text-decoration: none; color: var(--navy); }
.sf-pagination { display: flex; gap: 12px; flex-wrap: wrap; font-weight: 800; }

/* ---------- Basket, checkout and account (WooCommerce blocks unchanged) ---------- */
.sf-commerce { padding: 40px 0 80px; }
.sf-commerce .wc-block-components-button:not(.is-link),
.sf-commerce .wc-block-cart__submit-button,
.sf-commerce .wc-block-components-checkout-place-order-button,
.sf-commerce .woocommerce .button {
	background: var(--orange); color: #fff; border: 0; border-radius: 7px; font-weight: 800; text-transform: none; letter-spacing: 0; min-height: 51px;
}
.sf-commerce .wc-block-components-button:not(.is-link):hover, .sf-commerce .woocommerce .button:hover { background: #de391d; color: #fff; }
.sf-commerce .wc-block-components-text-input input,
.sf-commerce .wc-block-components-combobox .wc-block-components-combobox-control input,
.sf-commerce .woocommerce form .form-row input.input-text,
.sf-commerce .woocommerce form .form-row textarea,
.sf-commerce select { border: 1px solid #cfd6dc; border-radius: 7px; background-color: #fff; color: var(--ink); }
.sf-commerce .wc-block-components-sidebar, .sf-commerce .wc-block-components-totals-wrapper { border-color: var(--line); }
.sf-commerce a:not(.wc-block-components-button):not(.button):not(.wp-block-button__link) { color: #166b75; text-decoration: underline; text-underline-offset: 4px; }
.sf-commerce h2, .sf-commerce h3 { font-size: 22px; letter-spacing: -.02em; }
.sf-commerce .woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.sf-commerce .woocommerce-MyAccount-navigation a { font-weight: 800; }

/* Cookie choice banner: the design's navy. */
.cn-consent-banner { background: var(--navy); border-color: #ffffff2b; border-radius: 12px; font-family: 'DM Sans', Arial, sans-serif; }
.cn-consent-banner button { border-radius: 7px; font-weight: 800; }

/* Pre-launch notice bar keeps the design's colours. */
.cn-prelaunch { background: var(--orange); color: #fff; text-align: center; font-weight: 700; padding: 8px 16px; font-size: 13px; }

@media (max-width: 720px) {
	.sf-order-form .quantity .qty { width: 64px; }
	.article-shell .cn-lead { font-size: 16px; }
}

/* Phone fix (also present in the reference): the gallery column must not grow to fit its thumbnail strip; the strip scrolls instead. */
.product-detail>*{min-width:0}

/* Basket and checkout: no motion to pause, and the floating button must never cover a total or the payment form. */
.woocommerce-cart .motion-toggle,.woocommerce-checkout .motion-toggle{display:none!important}

/* Footer logo: transparent artwork straight on the dark footer (no white card). */
.footer-brand img{background:none;padding:0;border-radius:0}
