/*
Theme Name: Wisdoo Store
Theme URI: https://wisdoo.in
Author: Wisdoo
Author URI: https://wisdoo.in
Description: The default store theme from Wisdoo. A fast, mobile-first block theme for WooCommerce built entirely on WooCommerce's own blocks (no copied templates to fall out of date), with ready-made sections for Indian stores and three style variations. Edit everything in Appearance → Editor.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wisdoo-store
Tags: e-commerce, block-patterns, block-styles, full-site-editing, style-variations, wide-blocks, editor-style, one-column, custom-colors, custom-logo
*/

/* Most of the design is in theme.json. This file holds the few touches theme.json can't express. */

/* ---------- header ---------- */
.wisdoo-announcement p { margin: 0; letter-spacing: 0.01em; }
.wisdoo-announcement { padding-top: 0.55rem; padding-bottom: 0.55rem; }
.wisdoo-header { position: sticky; top: 0; z-index: 50; background: var(--wp--preset--color--base); border-bottom: 1px solid var(--wp--preset--color--border); }
.admin-bar .wisdoo-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .wisdoo-header { top: 0; } }
.wisdoo-header__inner { padding-top: 0.9rem; padding-bottom: 0.9rem; }
.wisdoo-header .wp-block-site-logo img { border-radius: 6px; }
.wisdoo-header .wc-block-mini-cart__button,
.wisdoo-header .wp-block-woocommerce-customer-account a { color: var(--wp--preset--color--contrast); }
.wisdoo-header .wc-block-mini-cart__badge { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--on-accent); }
.wisdoo-header .wp-block-search__button { background: transparent; color: var(--wp--preset--color--contrast); padding: 0.4rem; }
.wisdoo-header .wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem; }

/* ---------- sections ---------- */
.wisdoo-section { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--60); }
.wisdoo-section--tight { padding-top: var(--wp--preset--spacing--40); padding-bottom: var(--wp--preset--spacing--40); }
.wisdoo-eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; color: var(--wp--preset--color--accent); }
.wisdoo-muted { color: var(--wp--preset--color--contrast-2); }
.wisdoo-card { background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--border); border-radius: var(--wp--custom--radius--medium); padding: var(--wp--preset--spacing--40); height: 100%; }
.wisdoo-rounded img, img.wisdoo-rounded, .wisdoo-rounded { border-radius: var(--wp--custom--radius--large); }
.wisdoo-hero h1 { font-size: var(--wp--preset--font-size--huge); line-height: 1.04; }
.wisdoo-trust { border-top: 1px solid var(--wp--preset--color--border); border-bottom: 1px solid var(--wp--preset--color--border); }
.wisdoo-trust p { margin: 0; }
.wisdoo-trust strong { display: block; color: var(--wp--preset--color--contrast); }
.wisdoo-stars { color: var(--wp--preset--color--highlight); letter-spacing: 0.15em; }
.wisdoo-section-head { gap: 1rem; }
.wisdoo-section-head h2 { margin: 0; }
.wisdoo-link-arrow a { text-decoration: none; font-weight: 600; }
.wisdoo-link-arrow a::after { content: " →"; }

/* ---------- product cards ---------- */
.wc-block-product-template .wc-block-components-product-image,
.wc-block-product-template .wc-block-components-product-image img { border-radius: var(--wp--custom--radius--medium); overflow: hidden; }
.wc-block-product-template .wc-block-components-product-image img { transition: transform 0.4s ease; background: var(--wp--preset--color--base-2); }
.wc-block-product-template .wc-block-product:hover .wc-block-components-product-image img { transform: scale(1.035); }
.wc-block-product-template .wp-block-post-title { margin-top: 0.75rem; margin-bottom: 0.25rem; }
.wc-block-product-template .wp-block-post-title a { text-decoration: none; }
/* grid "Add to cart": outlined, full width. Selectors are doubled up because WooCommerce's block CSS loads after ours. */
.wc-block-product-template .wc-block-product .wc-block-components-product-button .wc-block-components-product-button__button,
.wc-block-product-template .wc-block-product .wp-block-button .wp-block-button__link {
	background: transparent; color: var(--wp--preset--color--contrast);
	border: 1px solid var(--wp--preset--color--contrast); border-radius: var(--wp--custom--radius--small);
	width: 100%; justify-content: center; padding: 0.7em 1em; min-height: 2.75rem; font-weight: 600;
}
.wc-block-product-template .wc-block-product .wc-block-components-product-button .wc-block-components-product-button__button:hover,
.wc-block-product-template .wc-block-product .wp-block-button .wp-block-button__link:hover {
	background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base);
}
.wc-block-product-template .wc-block-components-product-button { width: 100%; margin-top: 0.5rem; }
.wc-block-product-template .wc-block-components-product-button .added_to_cart { display: block; text-align: center; font-size: var(--wp--preset--font-size--x-small); margin-top: 0.4rem; }
.wc-block-components-product-sale-badge,
.woocommerce span.onsale, span.onsale {
	background: var(--wp--preset--color--highlight) !important; color: #fff !important; border: 0 !important;
	border-radius: 999px !important; font-size: var(--wp--preset--font-size--x-small) !important; font-weight: 600; padding: 0.25em 0.75em !important; text-transform: none !important;
}
.wc-block-components-product-price del { color: var(--wp--preset--color--contrast-2); font-weight: 400; }
.wc-block-components-product-price ins { text-decoration: none; }

/* ---------- single product ---------- */
.wisdoo-product .woocommerce-product-gallery, .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery { width: 100% !important; float: none !important; margin: 0 !important; }
span.onsale { position: absolute; top: 1rem !important; left: 1rem !important; right: auto !important; min-height: 0 !important; min-width: 0 !important; line-height: 1.6 !important; margin: 0 !important; z-index: 2; }
.wisdoo-product .wp-block-woocommerce-product-image-gallery { position: relative; max-width: none; width: 100%; }
.wisdoo-product { gap: var(--wp--preset--spacing--50); }
.wisdoo-product .woocommerce-product-gallery img { border-radius: var(--wp--custom--radius--medium); }
.wisdoo-product .wp-block-add-to-cart-form .quantity .qty { border: 1px solid var(--wp--preset--color--border); border-radius: var(--wp--custom--radius--small); padding: 0.7em; min-height: 3rem; }
.wisdoo-product .wp-block-add-to-cart-form .single_add_to_cart_button { min-height: 3rem; padding-left: 2rem; padding-right: 2rem; }
.wisdoo-product-promise { background: var(--wp--preset--color--base-2); border-radius: var(--wp--custom--radius--medium); padding: 1rem 1.25rem; }
.wisdoo-product-promise p { margin: 0.2rem 0; }

/* ---------- categories ---------- */
.wisdoo-categories .wc-block-product-categories-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.wisdoo-categories .wc-block-product-categories-list-item {
	margin: 0; position: relative; display: flex; flex-direction: column; gap: 0.15rem;
	background: var(--wp--preset--color--base-2); border-radius: var(--wp--custom--radius--medium); padding: 0.85rem 0.85rem 1rem;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.wisdoo-categories .wc-block-product-categories-list-item:hover { transform: translateY(-2px); box-shadow: var(--wp--preset--shadow--soft); }
.wisdoo-categories .wc-block-product-categories-list-item > a { display: flex; flex-direction: column; gap: 0.75rem; text-decoration: none; color: var(--wp--preset--color--contrast); font-weight: 600; }
/* the whole tile is clickable */
.wisdoo-categories .wc-block-product-categories-list-item > a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.wisdoo-categories .wc-block-product-categories-list-item__image { width: 100%; max-width: none; margin: 0; border: 0; }
.wisdoo-categories .wc-block-product-categories-list-item__image img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--wp--custom--radius--small); }
.wisdoo-categories .wc-block-product-categories-list-item-count { color: var(--wp--preset--color--contrast-2); font-size: var(--wp--preset--font-size--x-small); }
.wisdoo-categories .wc-block-product-categories-list-item-count::before { content: none; }
.wisdoo-categories .wc-block-product-categories-list-item-count::after { content: none; }
/* show WooCommerce's own translated "3 products" label instead of a bare number */
.wisdoo-categories .wc-block-product-categories-list-item-count span[aria-hidden] { display: none; }
.wisdoo-categories .wc-block-product-categories-list-item-count .screen-reader-text { position: static; width: auto; height: auto; clip: auto; clip-path: none; overflow: visible; margin: 0; white-space: normal; word-wrap: normal; }
@media (max-width: 600px) { .wisdoo-categories .wc-block-product-categories-list { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; } }
.wisdoo-categories > .wc-block-product-categories-list { background: none; }

/* ---------- forms, cart and checkout ---------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="password"], input[type="number"], select, textarea {
	border: 1px solid var(--wp--preset--color--border); border-radius: var(--wp--custom--radius--small); font: inherit;
}
.wc-block-components-button:not(.is-link) { border-radius: var(--wp--custom--radius--small); font-weight: 600; }
.wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button { min-height: 3.25rem; }
.wisdoo-checkout-header { border-bottom: 1px solid var(--wp--preset--color--border); }

/* ---------- footer ---------- */
.wisdoo-footer { border-top: 1px solid var(--wp--preset--color--border); }
.wisdoo-footer h2 { font-family: var(--wp--preset--font-family--body); font-size: var(--wp--preset--font-size--small); font-weight: 650; letter-spacing: 0.02em; margin-bottom: 0.75rem; }
.wisdoo-footer .wp-block-navigation { font-size: var(--wp--preset--font-size--small); }
.wisdoo-footer .wp-block-navigation a { color: var(--wp--preset--color--contrast-2); }
.wisdoo-footer-bottom { border-top: 1px solid var(--wp--preset--color--border); padding-top: 1.25rem; }
.wisdoo-footer-bottom p { margin: 0; }

/* ---------- accessibility ---------- */
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* WooCommerce caps the cart page title at 1000px while the cart itself is full wide; line them up. */
main > .wp-block-post-title.alignwide { max-width: var(--wp--style--global--wide-size) !important; }
