/**
 * Theme Name: Fowoke Nigeria Limited Child
 * Template: hello-elementor
 * Description: A custom child theme for Fowoke Nigeria Limited, optimized for WooCommerce.
 * Author: Fowoke
 * Author URI: https://fowokenl.com
 * Version: 1.2.5
 * Text Domain: fowoke-child-theme
 *
 * This stylesheet is organized for maintainability and performance.
 *
 * TABLE OF CONTENTS
 * -----------------
 * 1.0 - Foundation & Variables
 * 2.0 - Global Styles & Typography
 * 3.0 - General WooCommerce Overrides (Buttons, Forms, Badges)
 * 4.0 - Header & Redesigned Mini Cart (Corrected)
 * 5.0 - Shop / Archive Page Styles
 * 6.0 - Single Product Page Styles
 * 7.0 - Related Components (Upsells, Reviews, FAQ)
 */

/* ==========================================================================
   1.0 - Foundation & Variables
   ========================================================================== */
:root {
	--fresh-green: #009c60;
	--rich-orange: #f57c00;
	--rich-orange-darker: #e67000;
	--deep-brown: #5d4037;
	--light-bg: #f8f7f5;
	--text-color: #4a4a4a;
	--border-color: #e0e0e0;
	--white: #ffffff;
	--shadow-color: rgba(93, 64, 55, 0.1);
	--font-body: 'Inter', sans-serif;
	--font-heading: 'Montserrat', sans-serif;

	/* Added for consistency */
	--radius-base: 12px;
	--radius-sm: 8px;
	--radius-pill: 9999px;
	--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
	--shadow-md: 0 6px 14px rgba(0, 0, 0, 0.15);
	--shadow-lg: 0 12px 28px var(--shadow-color);
}


/* ==========================================================================
   2.0 - Global Styles & Typography
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body.woocommerce-page {
	font-family: var(--font-body);
	color: var(--text-color);
	background-color: var(--light-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.woocommerce-page h1,
.woocommerce-page h2,
.woocommerce-page h3,
.woocommerce-page h4,
.woocommerce-page h5,
.woocommerce-page h6 {
	font-family: var(--font-heading);
	color: var(--deep-brown);
	font-weight: 700;
	letter-spacing: -0.5px;
}

.woocommerce-page h1.product_title {
	font-size: 2.5rem;
}

.woocommerce-page h2 {
	font-size: 2rem;
	margin-bottom: 1.5em;
	text-align: center;
}


/* ==========================================================================
   3.0 - General WooCommerce Overrides (Buttons, Forms, Badges)
   ========================================================================== */

/* --- Primary Buttons --- */
.fowoke-btn,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
	background-color: var(--rich-orange);
	color: var(--white) !important;
	border-radius: var(--radius-base);
	font-family: var(--font-heading);
	font-weight: 700;
	padding: 14px 28px;
	transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
	line-height: normal;
	text-shadow: none;
	border: none;
	box-shadow: var(--shadow-sm);
}

.fowoke-btn:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-md);
	background-color: var(--rich-orange-darker);
	color: var(--white) !important;
}

/* --- Alt Buttons --- */
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
	background-color: var(--fresh-green);
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
	background-color: #007a4d;
}

/* --- Sale Badge --- */
.woocommerce span.onsale {
	background-color: var(--rich-orange);
	color: var(--white);
	font-family: var(--font-heading);
	font-size: 0.9rem;
	font-weight: 700;
	border-radius: var(--radius-pill);
	min-height: 0;
	padding: 6px 14px;
	line-height: 1;
}

/* --- Quantity Inputs --- */
.woocommerce .quantity .qty {
	border: 1px solid var(--border-color);
	border-radius: var(--radius-sm);
	height: 48px;
	width: 60px;
	text-align: center;
	font-family: var(--font-heading);
}

.woocommerce .quantity .plus,
.woocommerce .quantity .minus {
	background-color: #f0f0f0;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-sm);
	width: 48px;
	height: 48px;
	transition: background-color 0.2s;
}
.woocommerce .quantity .plus:hover,
.woocommerce .quantity .minus:hover {
    background-color: #e0e0e0;
}


/* ==========================================================================
   4.0 - Header & Redesigned Mini Cart (Corrected)
   ========================================================================== */

/* --- Header Action Buttons (Search, Account, Cart) --- */
#masthead .header-action-button {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem;
	color: #444;
	background-color: transparent;
	border-radius: var(--radius-pill);
	transition: color 0.2s, background-color 0.2s;
}
#masthead .header-action-button:hover,
#masthead .header-action-button:focus-visible {
	color: #000;
	background-color: #f3f4f6;
	outline: none;
}

/* --- Cart Icon Container --- */
#masthead .header-cart-container {
	position: relative;
}

/* --- Item Count Badge --- */
#masthead .cart-item-count {
	position: absolute;
	top: 2px;
	right: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	color: var(--white);
	background-color: var(--rich-orange);
	border: 2px solid var(--white);
	border-radius: var(--radius-pill);
	transform: scale(1);
	transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#masthead .header-cart-container:hover .cart-item-count {
	transform: scale(1.1);
}

/* --- Mini Cart Popup Container --- */
#masthead .mini-cart-dropdown {
	position: absolute;
	top: calc(100% + 12px);
	right: 0;
	width: 384px;
	max-width: 384px;
	background-color: var(--white);
	border-radius: 12px;
	border: 1px solid #e5e7eb;
	box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s;
	z-index: 1000;
	overflow: hidden;
	text-align: left;
}
#masthead .header-cart-container:hover .mini-cart-dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0s;
}

/* Responsive adjustments */
@media (max-width: 420px) {
    #masthead .mini-cart-dropdown {
        position: fixed;
        top: 1rem;
        right: 1rem;
        left: 1rem;
        width: auto;
        max-width: none;
    }
}

/* --- Inner content styling --- */
#masthead .mini-cart-dropdown .widget_shopping_cart_content { padding: 0; }
#masthead .woocommerce-mini-cart__empty-message { padding: 2rem 1.5rem; text-align: center; color: #6b7280; }
#masthead .mini-cart-header { padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e5e7eb; }
#masthead .mini-cart-header .mini-cart-title { font-size: 1.25rem; font-weight: 700; color: #1f2937; }
#masthead .mini-cart-header .mini-cart-count { font-size: 0.875rem; font-weight: 500; color: #6b7280; }

/* --- Product List --- */
#masthead .woocommerce-mini-cart { list-style: none; padding: 0 1.5rem; margin: 0; max-height: 320px; overflow-y: auto; }
#masthead .woocommerce-mini-cart::-webkit-scrollbar { width: 6px; }
#masthead .woocommerce-mini-cart::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
#masthead .woocommerce-mini-cart::-webkit-scrollbar-thumb { background: #d1ab6a; border-radius: 10px; }
#masthead .woocommerce-mini-cart::-webkit-scrollbar-thumb:hover { background: #b98b4b; }

/* --- Individual Product Item --- */
#masthead .woocommerce-mini-cart-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid #f3f4f6; }
#masthead .woocommerce-mini-cart-item:last-child { border-bottom: none; }

/* --- CORRECTED IMAGE STYLE (V2) --- */
/* Target both the wrapping figure and the image for max specificity. */
#masthead .woocommerce-mini-cart-item a figure,
#masthead .woocommerce-mini-cart-item a img {
    width: 60px !important;
    height: 72px !important;
    max-width: 60px !important;
    margin: 0 !important;
    padding: 0 !important;
}

#masthead .woocommerce-mini-cart-item a img {
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    display: block;
}

#masthead .woocommerce-mini-cart-item a:not(.remove_from_cart_button) { font-size: 0.9rem; font-weight: 600; color: #1f2937; text-decoration: none; transition: color 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#masthead .woocommerce-mini-cart-item a:not(.remove_from_cart_button):hover { color: var(--rich-orange); }
#masthead .woocommerce-mini-cart-item .quantity { display: block; font-size: 0.875rem; color: #6b7280; margin-top: 2px; }
#masthead .woocommerce-mini-cart-item .woocommerce-Price-amount { margin-top: 4px; font-size: 0.875rem; font-weight: 500; color: #4b5563; }
#masthead .woocommerce-mini-cart-item .remove_from_cart_button { margin-left: auto; color: #9ca3af; text-decoration: none; transition: color 0.2s; flex-shrink: 0; padding: 0.5rem; background: none; border: none; cursor: pointer; }
#masthead .woocommerce-mini-cart-item .remove_from_cart_button:hover { color: #ef4444; }
#masthead .woocommerce-mini-cart-item .remove_from_cart_button::before { display: none; }
#masthead .woocommerce-mini-cart-item .remove_from_cart_button::after { content: '✕'; font-size: 1.5rem; line-height: 1; font-family: Arial, sans-serif; }

/* --- Mini Cart Footer --- */
#masthead .woocommerce-mini-cart__total { background-color: #f9fafb; padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #e5e7eb; }
#masthead .woocommerce-mini-cart__total strong { font-size: 1rem; font-weight: 500; color: #4b5563; }
#masthead .woocommerce-mini-cart__total .woocommerce-Price-amount { font-size: 1.25rem; font-weight: 700; color: #111827; }
#masthead .woocommerce-mini-cart__buttons { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.5rem; background-color: #f9fafb; border-top: 1px solid #f3f4f6; }
#masthead .woocommerce-mini-cart__buttons .button { width: 100%; padding: 0.875rem 1rem; border-radius: 8px; font-weight: 600; font-size: 0.875rem; text-decoration: none; text-transform: uppercase; transition: all 0.2s; border: 2px solid transparent; margin: 0 !important; }
#masthead .woocommerce-mini-cart__buttons .button.checkout { background-color: #111827; color: var(--white) !important; }
#masthead .woocommerce-mini-cart__buttons .button.checkout:hover { background-color: #374151; transform: scale(1.02); }
#masthead .woocommerce-mini-cart__buttons .button:not(.checkout) { background-color: var(--white); color: #111827 !important; border-color: #111827; }
#masthead .woocommerce-mini-cart__buttons .button:not(.checkout):hover { background-color: #f9fafb; }
#masthead .widget_shopping_cart_content.loading, #masthead .woocommerce-mini-cart-item.loading { opacity: 0.6; pointer-events: none; cursor: progress; }


/* ==========================================================================
   5.0 - Shop / Archive Page Styles
   ========================================================================== */
.shop-archive.container {
	max-width: 1300px;
	margin: 0 auto;
	padding: 30px 15px;
}
.shop-header {
	text-align: center;
	margin-bottom: 35px;
}
.shop-title {
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 20px;
	color: var(--deep-brown);
}
.enhanced-search {
	display: flex;
	max-width: 600px;
	margin: 0 auto 25px;
	border-radius: var(--radius-pill);
	overflow: hidden;
	background: var(--white);
	border: 2px solid var(--border-color);
	box-shadow: 0 6px 15px rgba(0, 0, 0, 0.07);
	transition: all 0.3s ease;
}
.enhanced-search:focus-within {
	border-color: var(--rich-orange);
	box-shadow: 0 4px 18px rgba(245, 124, 0, 0.2);
}
.enhanced-search input.search-field {
	border: none;
	padding: 14px 22px;
	width: 100%;
	font-size: 1rem;
	outline: none;
	background: transparent;
	color: var(--text-color);
}
.enhanced-search button {
	background: var(--rich-orange);
	color: var(--white);
	border: none;
	padding: 14px 22px;
	cursor: pointer;
	font-size: 1.1rem;
	transition: background 0.3s ease;
}
.enhanced-search button:hover {
	background: var(--rich-orange-darker);
}
.shop-tools {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 15px 0 25px;
	flex-wrap: wrap;
	gap: 15px;
}
ul.products {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 25px;
	list-style: none;
	padding: 0;
	margin: 0;
}
ul.products li.product {
	background: var(--white);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-base);
	padding: 15px;
	text-align: center;
	transition: all 0.3s;
	overflow: hidden;
    margin: 0;
    width: 100%;
}
ul.products li.product:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow-lg);
}
ul.products li.product .woocommerce-loop-product__title {
	font-size: 1.1rem;
	font-weight: 600;
	margin-top: 12px;
	color: var(--deep-brown);
}
ul.products li.product .price {
	color: var(--fresh-green);
	font-size: 1.1rem;
	font-weight: 700;
	margin-top: 8px;
}
ul.products li.product .button {
	margin-top: 15px;
	padding: 12px 20px;
	border-radius: var(--radius-pill);
}
.no-products {
	text-align: center;
	padding: 40px;
	background: var(--white);
	border-radius: var(--radius-sm);
	border: 1px solid var(--border-color);
}


/* ==========================================================================
   6.0 - Single Product Page Styles
   ========================================================================== */
main.product {
	background-color: var(--white);
	border-radius: 16px;
	box-shadow: 0 8px 25px var(--shadow-color);
}
.product .summary p.price {
	font-size: 2.25rem;
	line-height: 1;
}
.product .summary .price,
.product .summary .woocommerce-Price-amount {
	color: var(--fresh-green) !important;
	font-family: var(--font-heading);
	font-weight: 700;
}
.woocommerce-product-gallery__trigger {
	display: none !important;
}
.woocommerce-product-gallery .flex-control-thumbs li img {
	border-radius: var(--radius-sm);
	border: 2px solid transparent;
	transition: border-color 0.3s;
}
.woocommerce-product-gallery .flex-control-thumbs li img.flex-active,
.woocommerce-product-gallery .flex-control-thumbs li img:hover {
	border-color: var(--rich-orange);
}


/* ==========================================================================
   7.0 - Related Components (Upsells, Reviews, FAQ)
   ========================================================================== */
.upsells > h2,
.related > h2 {
	text-align: center;
}
.woocommerce-tabs ul.tabs {
	border-bottom: 2px solid var(--border-color);
	padding-left: 0;
	margin-bottom: 2em;
}
.woocommerce-tabs ul.tabs li {
	background-color: transparent;
	border: none;
	border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    margin: 0;
}
.woocommerce-tabs ul.tabs li::before,
.woocommerce-tabs ul.tabs li::after {
	display: none;
}
.woocommerce-tabs ul.tabs li a {
	color: var(--text-color);
	padding: 12px 20px;
	font-family: var(--font-heading);
	font-weight: 600;
}
.woocommerce-tabs ul.tabs li.active {
	background-color: transparent;
	border-bottom: 3px solid var(--rich-orange);
}
.woocommerce-tabs ul.tabs li.active a {
	color: var(--rich-orange);
}
#reviews #comments ol.commentlist li .comment-text {
	border: 1px solid var(--border-color);
	border-radius: var(--radius-base);
	padding: 1.5em;
	background-color: var(--light-bg);
}
#review_form #respond .comment-form {
	display: flex;
	flex-direction: column;
}
#review_form #respond input[type="text"],
#review_form #respond input[type="email"],
#review_form #respond textarea {
	border: 1px solid var(--border-color);
	border-radius: var(--radius-sm);
	padding: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
#review_form #respond input[type="text"]:focus,
#review_form #respond input[type="email"]:focus,
#review_form #respond textarea:focus {
    border-color: var(--rich-orange);
    box-shadow: 0 0 0 2px rgba(245, 124, 0, 0.2);
    outline: none;
}
.faq-item summary {
	cursor: pointer;
	transition: color 0.2s;
	font-weight: 600;
	list-style: none;
}
.faq-item summary::-webkit-details-marker {
    display: none;
}
.faq-item summary:hover {
	color: var(--rich-orange);
}
.faq-item[open] > summary {
    color: var(--rich-orange);
}
.faq-item[open] .faq-question svg {
	transform: rotate(180deg);
}

