/*
Theme Name: Crude Crow TT5 Preview
Theme URI: https://crudecrow.com
Description: Local unreleased patch of crudecrow-tt5 0.3.0. Shows PDP stars and a reviews section when a product has approved reviews; hides the "Reviews (0)" label; keeps a "Write a review" / #reviews form so a first review is still possible. Do not upload or activate until the owner approves. Preview with ?wp_theme_preview=crudecrow-tt5
Author: The Crude Crow
Template: twentytwentyfive
Version: 0.3.3
Requires at least: 6.7
Requires PHP: 7.4
Text Domain: crudecrow-tt5
*/

/* ------------------------------------------------------------------
   Global overflow root-cause guards (no html/body overflow-x hack).
   ------------------------------------------------------------------ */
img,
video,
iframe,
.wp-block-image img {
	max-width: 100%;
}

img {
	height: auto;
}

.wp-block-post-content,
.wp-block-post-content p,
.wp-block-post-content li,
.woocommerce-Tabs-panel,
.woocommerce-product-details__short-description,
.wp-block-woocommerce-product-summary,
.cc-pdp-excerpt,
.wp-block-woocommerce-breadcrumbs,
.woocommerce-breadcrumb {
	overflow-wrap: anywhere;
	word-break: normal;
}

.wp-block-table,
.woocommerce-Tabs-panel table,
table.shop_attributes,
table.shop_table {
	max-width: 100%;
}

@media (max-width: 781px) {
	.wp-block-table,
	.woocommerce-Tabs-panel table {
		display: block;
		overflow-x: auto;
	}
}

/* Draft homepage title is editorial, not shopper-facing. */
body.page-id-883 .wp-block-post-title,
body.page-homepage-preview-flower-first .wp-block-post-title {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Homepage (883 draft): centered 1100px column; images never wider than the column. */
.cc-home {
	margin-inline: auto;
}

.cc-home img {
	max-width: 100%;
	height: auto;
}

.cc-home .cc-product-row {
	align-items: center;
}

.cc-home .cc-product-row .wp-block-image img {
	border-radius: 12px;
	background: #ffffff;
}

.cc-home .cc-hero-image img {
	max-height: 520px;
	width: auto;
	margin-inline: auto;
	display: block;
}

.cc-home .cc-reviews {
	min-height: 120px;
}

.cc-promo-bar {
	background: #111111;
	color: #ffffff;
}

.cc-promo-bar p,
.cc-promo-bar a {
	color: #ffffff;
	margin: 0;
}

.cc-promo-bar a:hover,
.cc-promo-bar a:focus {
	text-decoration: underline;
}

.cc-site-header {
	border-bottom: 1px solid #e8e2d8;
}

.cc-header-row {
	padding: 12px 0 16px;
}

@media (max-width: 781px) {
	.cc-header-row {
		padding-left: 16px;
		padding-right: 16px;
	}
}

.cc-cart-link {
	margin: 0;
	font-weight: 600;
}

.cc-site-footer {
	background: #111111;
	color: #faf6f0;
	margin-top: 3rem;
}

.cc-site-footer a {
	color: #faf6f0;
}

.cc-site-footer h2,
.cc-site-footer h3 {
	color: #ffffff;
}

/* Shop order is set by product menu_order in WooCommerce (807, 608, 618, 128, 472), not CSS. */

/* ------------------------------------------------------------------
   Ported from the live "cc-site-fixes" Elementor HTML widget (header 116).
   Elementor-only selectors were skipped; see CUTOVER.md.
   ------------------------------------------------------------------ */
.woocommerce-product-details__short-description,
.wp-block-woocommerce-product-summary,
.woocommerce-Tabs-panel {
	text-transform: none !important;
}

/* Product grids: classic ul.products (shortcodes/related) and block Product Collection. */
.woocommerce ul.products li.product,
.wc-block-product-template .wc-block-product,
.wp-block-woocommerce-product-template .wc-block-product {
	text-align: center;
}

.woocommerce ul.products li.product a img,
.wc-block-product .wc-block-components-product-image img {
	border-radius: 12px;
	background: #ffffff;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.wc-block-product .wp-block-post-title,
.wc-block-product .wp-block-post-title a {
	font-size: 18px !important;
	font-weight: 800 !important;
	color: #141414 !important;
	text-transform: none !important;
	padding-top: 10px !important;
}

.woocommerce ul.products li.product .price,
.wc-block-product .wc-block-components-product-price {
	color: #141414 !important;
	font-weight: 700 !important;
	font-size: 16px !important;
}

.woocommerce ul.products li.product .button,
.wc-block-product .wp-block-button__link,
.wc-block-product .wc-block-components-product-button__button {
	background: #e01b1c !important;
	color: #ffffff !important;
	border-radius: 6px !important;
	padding: 12px 22px !important;
	font-weight: 700 !important;
	text-transform: none !important;
}

.woocommerce ul.products li.product .button:hover,
.wc-block-product .wp-block-button__link:hover,
.wc-block-product .wc-block-components-product-button__button:hover {
	background: #b31415 !important;
}

.woocommerce ul.products li.product .button.product_type_external,
.wc-block-product .product_type_external {
	background: #141414 !important;
}

/* ------------------------------------------------------------------
   Product pages
   ------------------------------------------------------------------ */

/* Stars in the summary only when the product has at least one approved review.
   The reviews form / #reviews panel stays available so a first review (and a
   review-request email link) still works. The "Reviews (0)" tab label is
   retitled in functions.php; this CSS only hides the empty star block. */
body.single-product.cc-no-reviews .cc-pdp-summary > .wp-block-woocommerce-product-rating,
body.single-product.cc-no-reviews .woocommerce-product-rating {
	display: none !important;
}

/* Tag list removed from templates; belt-and-braces for any tag output. */
.single-product .tagged_as,
.single-product .wp-block-post-terms.taxonomy-product_tag {
	display: none !important;
}

.cc-amazon-link {
	margin: 0;
}

.cc-amazon-link a {
	color: inherit;
	text-decoration: underline;
}

/* Gallery: keep the classic flexslider gallery inside its column. */
.single-product .woocommerce-product-gallery,
.single-product .wp-block-woocommerce-product-image-gallery {
	max-width: 100%;
	overflow: hidden;
}

.single-product .woocommerce-product-gallery .flex-viewport {
	max-width: 100%;
}

/* Mobile PDP: title, price, compact photo, Add to cart, then deal box and details. */
@media (max-width: 781px) {
	.single-product .wp-block-woocommerce-breadcrumbs {
		display: none;
	}

	.single-product .cc-pdp-columns {
		display: flex;
		flex-direction: column;
		flex-wrap: nowrap !important;
		gap: 12px;
	}

	/* Flatten both columns so their blocks can be ordered as one stack. */
	.single-product .cc-pdp-columns > .cc-pdp-media,
	.single-product .cc-pdp-columns > .cc-pdp-summary {
		display: contents;
	}

	.single-product .cc-pdp-summary > * {
		order: 20;
		margin-block: 0;
		max-width: 100%;
	}

	.single-product .cc-pdp-summary > .wp-block-post-title {
		order: 1;
		font-size: 1.75rem;
		line-height: 1.15;
	}

	.single-product .cc-pdp-summary > .wp-block-woocommerce-product-rating {
		order: 2;
	}

	.single-product .cc-pdp-summary > .wp-block-woocommerce-product-price {
		order: 3;
	}

	.single-product .cc-pdp-media > * {
		order: 4;
		width: 100%;
		max-width: 100%;
		margin: 0;
	}

	.single-product .cc-pdp-summary > .wp-block-add-to-cart-form,
	.single-product .cc-pdp-summary > .wc-block-add-to-cart-form {
		order: 5;
	}

	.single-product .cc-pdp-summary > .cc-deal-box {
		order: 6;
	}

	.single-product .cc-pdp-summary > .cc-amazon-link {
		order: 7;
	}

	.single-product .cc-pdp-summary > .wp-block-post-excerpt,
	.single-product .cc-pdp-summary > .wp-block-woocommerce-product-summary,
	.single-product .cc-pdp-summary > .cc-pdp-excerpt {
		order: 8;
	}

	.single-product .cc-pdp-summary > .wp-block-woocommerce-product-meta {
		order: 9;
	}

	/* Compact gallery so Add to cart lands above the fold at 375px and 414px. */
	.single-product .woocommerce-product-gallery {
		margin: 0 !important;
		width: 100% !important;
		float: none !important;
	}

	.single-product .woocommerce-product-gallery__image img,
	.single-product .woocommerce-product-gallery .wp-post-image {
		display: block;
		max-height: 220px;
		width: auto !important;
		max-width: 100%;
		object-fit: contain;
		margin-inline: auto;
	}

	/* If flexslider has not initialised, show only the first photo instead of a tall stack. */
	.single-product .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__image:not(:first-child) {
		display: none !important;
	}

	/* Hover zoom paints a full-size image; not useful on touch screens and a source of overflow. */
	.single-product .woocommerce-product-gallery .zoomImg {
		display: none !important;
	}

	.single-product .flex-control-nav,
	.single-product ol.flex-control-nav,
	.single-product .flex-control-thumbs {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		gap: 6px;
		position: static !important;
		inset: auto !important;
		width: 100%;
		max-width: 100%;
		margin: 6px 0 0 !important;
		padding: 0;
		overflow-x: auto;
		overflow-y: hidden;
		list-style: none;
	}

	.single-product .flex-control-thumbs li,
	.single-product .flex-control-nav li {
		flex: 0 0 48px;
		width: 48px !important;
		height: 48px;
		margin: 0 !important;
		float: none !important;
	}

	.single-product .flex-control-thumbs img,
	.single-product .flex-control-nav img {
		width: 48px;
		height: 48px;
		max-height: 48px;
		object-fit: cover;
	}

	.single-product form.cart {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
		margin: 0;
	}

	.single-product form.cart .single_add_to_cart_button {
		flex: 1 1 auto;
		max-width: 100%;
		white-space: normal;
	}

	.single-product .woocommerce-tabs ul.tabs {
		display: flex;
		flex-wrap: wrap;
		padding: 0;
	}

	.single-product .woocommerce-tabs ul.tabs li::before,
	.single-product .woocommerce-tabs ul.tabs li::after {
		display: none;
	}

	body.postid-128 .wine-nutz-quotes {
		flex-direction: column;
	}

	body.postid-128 .wine-nutz-faq details {
		margin: 6px 0;
	}
}

/* Wine Nutz tabs and PayPal stay scoped to product 128 only. */
body.postid-128 .woocommerce-tabs,
body.postid-128 #tab-description {
	background: #faf6f0 !important;
	padding: 20px !important;
}

body.postid-128 ul.tabs {
	display: none !important;
}

body.postid-128 .woocommerce-Tabs-panel:not(#tab-description) {
	display: none !important;
}

body.postid-128 .wine-nutz-quotes {
	display: flex;
	gap: 8px;
}

body.postid-128 .wine-nutz-quotes blockquote {
	background: #fff;
	border: 2px solid #111;
	border-left: 5px solid #e11;
	margin: 0;
	padding: 8px;
	flex: 1;
}

body.postid-128 .wine-nutz-faq details {
	background: #fff;
	border: 2px solid #111;
	margin: 6px;
	padding: 8px;
}

body.postid-128 .single_add_to_cart_button {
	background: #111 !important;
	color: #fff !important;
}

body.postid-128 .ppc-button-wrapper {
	display: none !important;
}

/* Review Wire deal box (Flower 608). Live site carries it in 608's short description; the theme template carries it here. */
.cc-deal-box { border: 2px solid #111; border-radius: 8px; padding: 14px 16px; margin: 4px 0 16px; background: #faf6f0; }
.cc-deal-box p { margin: 0 0 10px; font-size: 1.05em; }
.cc-deal-box .cc-deal-btn { display: inline-block; background: #111; color: #fff !important; padding: 10px 18px; border-radius: 6px; text-decoration: none; }
.wp-block-post-excerpt .cc-deal-box,
.wp-block-woocommerce-product-summary .cc-deal-box,
.woocommerce-product-details__short-description .cc-deal-box { display: none !important; }

/* ------------------------------------------------------------------
   Cart / checkout
   ------------------------------------------------------------------ */
.cc-free-ship-notice strong {
	white-space: nowrap;
}

.woocommerce-cart .shop_table,
.woocommerce-checkout .shop_table {
	width: 100%;
}

@media (max-width: 781px) {
	.woocommerce-cart table.shop_table_responsive tr td,
	.woocommerce-cart .coupon input.input-text {
		max-width: 100%;
	}
}

/* ------------------------------------------------------------------
   Static page templates (Wholesale, About, Contact, guides, policies)
   ------------------------------------------------------------------ */
/* .cc-line (Wholesale "The line" grid) styles travel with the wp:html block in page-wholesale.html. */

.cc-eyebrow {
	letter-spacing: 0.12em;
	font-weight: 700;
	color: #e01b1c;
	text-transform: uppercase;
}

/* v0.3.1 color fixes (2026-11-10): page titles dark, footer headings readable, mobile menu icon dark */
body.woocommerce-cart h1.wp-block-post-title,
body.woocommerce-checkout h1.wp-block-post-title,
body.woocommerce-account h1.wp-block-post-title,
body.page h1.wp-block-post-title { color: #141414 !important; }
footer.wp-block-template-part h1, footer.wp-block-template-part h2,
footer.wp-block-template-part h3, footer.wp-block-template-part h4,
footer.wp-block-template-part .wp-block-heading { color: #faf6f0 !important; opacity: 1 !important; }
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close { color: #141414 !important; background: transparent !important; }
.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg { fill: currentColor !important; }

/* v0.3.2 (2026-11-10): one-row header, no clipped Cart at mid widths, short mobile hero, checkout font */
.cc-header-row { flex-wrap: nowrap !important; gap: 16px; padding-left: 24px; padding-right: 24px; box-sizing: border-box; max-width: 100%; }
.cc-header-row .wp-block-site-title { flex: 0 1 auto; min-width: 0; white-space: nowrap; }
.cc-header-actions { flex-wrap: nowrap !important; gap: 18px; min-width: 0; }
.cc-cart-link { white-space: nowrap; flex: 0 0 auto; }
@media (max-width: 1100px) {
	.cc-header-row .wp-block-navigation { font-size: 15px; --wp--style--block-gap: 14px; gap: 14px; }
}
@media (max-width: 900px) {
	.cc-header-row .wp-block-navigation { font-size: 14px; gap: 10px; --wp--style--block-gap: 10px; }
	.cc-header-actions { gap: 12px; }
}
@media (max-width: 781px) {
	.cc-header-row { padding: 8px 16px !important; gap: 10px; }
	.cc-header-row .wp-block-site-title { font-size: 18px !important; }
	.cc-header-actions { gap: 14px; }
	.cc-promo-bar { padding-top: 6px !important; padding-bottom: 6px !important; }
	.cc-promo-bar p { font-size: 12px !important; line-height: 1.3; margin: 0; }
	.cc-home > h1 { font-size: 26px !important; line-height: 1.2; margin-top: 8px; }
	.cc-home .cc-hero-image img { max-height: 300px; width: auto; object-fit: contain; }
}
body.woocommerce-checkout .wp-site-blocks,
body.woocommerce-checkout .woocommerce,
body.woocommerce-checkout input,
body.woocommerce-checkout select,
body.woocommerce-checkout textarea,
body.woocommerce-checkout button { font-family: var(--wp--preset--font-family--manrope, inherit) !important; }
