/*
Theme Name: Vastra
Theme URI: https://example.com/vastra
Author: Abhi
Description: Lightweight fashion WooCommerce theme – mega menu, hero slider, quick view, AJAX cart drawer, shop filters and an Enquiry mode that replaces Add to Cart with a lead form stored in WP Admin. Brand colours via Appearance > Customize > Vastra Theme.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
WC requires at least: 7.0
License: GPLv2 or later
Text Domain: vastra
*/

:root {
	--v-primary: #111;
	--v-accent: #b08d57;
	--v-bg: #fff;
	--v-text: #222;
	--v-topbar: #111;
	--v-topbar-text: #fff;
	--v-muted: #777;
	--v-border: #e6e6e6;
	--v-soft: #f6f5f3;
	--v-radius: 4px;
	--v-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--v-font-head: Georgia, "Times New Roman", serif;
	--v-container: 1320px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.6 var(--v-font); color: var(--v-text); background: var(--v-bg); }
body.v-lock { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--v-accent); }
h1, h2, h3, h4 { font-family: var(--v-font-head); font-weight: 500; line-height: 1.25; color: var(--v-primary); margin: 0 0 .6em; }
h2 { font-size: clamp(22px, 3vw, 30px); }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; width: 100%; padding: 10px 12px; border: 1px solid var(--v-border); border-radius: var(--v-radius); background: #fff; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--v-primary); }
.container { width: 100%; max-width: var(--v-container); margin: 0 auto; padding: 0 20px; }
.screen-reader-text { position: absolute; left: -9999px; }
.screen-reader-text:focus { left: 10px; top: 10px; z-index: 9999; background: #fff; padding: 8px 12px; }
.v-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.v-svg { display: block; }

/* ---------- Buttons ---------- */
.v-btn, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit, .woocommerce a.button.alt, .woocommerce button.button.alt {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 11px 22px; border: 1px solid var(--v-primary); border-radius: var(--v-radius);
	background: var(--v-primary); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
	transition: .2s; line-height: 1.2;
}
.v-btn:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover { background: var(--v-accent); border-color: var(--v-accent); color: #fff; }
.v-btn--outline { background: transparent; color: var(--v-primary); }
.v-btn--light { background: #fff; color: var(--v-primary); border-color: #fff; }
.v-btn--sm { padding: 8px 14px; }
.v-btn--block { width: 100%; }
.v-btn:disabled { opacity: .6; cursor: wait; }
.v-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; background: none; color: var(--v-primary); position: relative; padding: 0; }

/* ---------- Topbar & header ---------- */
.v-topbar { background: var(--v-topbar); color: var(--v-topbar-text); text-align: center; font-size: 13px; padding: 8px 12px; letter-spacing: .03em; }
.v-topbar a { color: inherit; }
.v-header { position: sticky; top: 0; z-index: 100; background: var(--v-bg); border-bottom: 1px solid var(--v-border); }
.admin-bar .v-header { top: 32px; }
/* Header is a stacking context: lift it above the overlay when the mobile menu is open */
.v-menu-open .v-header { z-index: 250; }
.v-header__inner { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.v-logo { flex-shrink: 0; }
.v-logo img { max-height: 48px; width: auto; }
.v-logo__text { font-family: var(--v-font-head); font-size: 26px; letter-spacing: .04em; color: var(--v-primary); }
.v-actions { display: flex; align-items: center; margin-left: auto; }
.v-cart-count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--v-accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; padding: 0 4px; }
.v-menu-toggle, .v-nav__close, .v-sub-toggle { display: none; }

/* Mega menu (desktop): level-2 items become columns, level-3 links */
.v-nav { flex: 1; }
.v-menu { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 4px; }
.v-menu > li > a { display: block; padding: 25px 14px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.v-menu .sub-menu { list-style: none; margin: 0; padding: 0; }
@media (min-width: 992px) {
	.v-menu > li { position: static; }
	.v-menu > li > .sub-menu {
		position: absolute; left: 0; right: 0; top: 100%;
		display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 220px)); justify-content: center; gap: 24px 40px;
		padding: 32px 40px; background: var(--v-bg); border-top: 1px solid var(--v-border); box-shadow: 0 12px 24px rgba(0,0,0,.06);
		opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
	}
	.v-menu > li:hover > .sub-menu, .v-menu > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
	.v-menu > li > .sub-menu > li > a { display: block; font-weight: 600; margin-bottom: 8px; color: var(--v-primary); }
	.v-menu .sub-menu .sub-menu a { display: block; padding: 3px 0; color: var(--v-muted); font-size: 14px; }
	.v-menu .sub-menu .sub-menu a:hover { color: var(--v-accent); }
}

/* Search bar */
.v-search { display: none; border-top: 1px solid var(--v-border); padding: 14px 0; background: var(--v-bg); }
.v-search-open .v-search { display: block; }
.v-search form { display: flex; gap: 8px; max-width: 640px; margin: 0 auto; }
.v-search button { white-space: nowrap; padding: 10px 20px; background: var(--v-primary); color: #fff; border: 0; border-radius: var(--v-radius); }

/* Overlay */
.v-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 190; opacity: 0; visibility: hidden; transition: .25s; }
.v-menu-open .v-overlay, .v-cart-open .v-overlay, .v-filters-open .v-overlay { opacity: 1; visibility: visible; }

/* ---------- Hero ---------- */
.v-hero { position: relative; height: clamp(360px, 60vw, 640px); overflow: hidden; background: var(--v-soft); }
.v-slide { position: absolute; inset: 0; background: var(--v-soft) center/cover no-repeat; opacity: 0; transition: opacity .8s; display: flex; align-items: center; }
.v-slide.is-active { opacity: 1; z-index: 1; }
.v-slide[style]::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(0,0,0,0) 65%); }
.v-slide__content { position: relative; max-width: var(--v-container); }
.v-slide h2 { font-size: clamp(30px, 5vw, 60px); margin-bottom: 12px; max-width: 640px; }
.v-slide p { font-size: clamp(15px, 1.6vw, 19px); margin: 0 0 24px; max-width: 520px; }
.v-slide[style] h2, .v-slide[style] p { color: #fff; }
.v-hero__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); display: flex; align-items: center; justify-content: center; }
.v-hero__prev { left: 16px; } .v-hero__next { right: 16px; }
.v-hero__dots { position: absolute; bottom: 18px; left: 0; right: 0; z-index: 3; display: flex; justify-content: center; gap: 8px; }
.v-hero__dots button { width: 10px; height: 10px; border-radius: 50%; border: 1px solid #fff; background: transparent; padding: 0; }
.v-hero__dots button.is-active { background: #fff; }

/* ---------- Sections ---------- */
.v-section { padding: 56px 20px; }
.v-section__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.v-section__head h2 { margin: 0; }
.v-section__head > a { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* Category carousel */
.v-carousel__arrows { display: flex; gap: 6px; }
.v-carousel__arrows .v-icon { border: 1px solid var(--v-border); border-radius: 50%; }
.v-carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 60px) / 5); gap: 15px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.v-carousel__track::-webkit-scrollbar { display: none; }
.v-cat { scroll-snap-align: start; position: relative; overflow: hidden; border-radius: var(--v-radius); }
.v-cat img { width: 100%; aspect-ratio: 3/4; object-fit: cover; transition: transform .5s; }
.v-cat:hover img { transform: scale(1.05); }
.v-cat span { position: absolute; left: 12px; right: 12px; bottom: 12px; background: #fff; color: var(--v-primary); text-align: center; padding: 10px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* Blog */
.v-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.v-post-card__img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--v-radius); background: var(--v-soft); }
.v-post-card__body { padding-top: 14px; }
.v-post-card time, .v-meta { font-size: 12px; color: var(--v-muted); text-transform: uppercase; letter-spacing: .06em; }
.v-post-card h3 { font-size: 20px; margin: 6px 0; }
.v-post-card p { margin: 0; color: var(--v-muted); }

/* About */
.v-about { background: var(--v-soft); text-align: center; }
.v-about__inner { max-width: 760px; }

/* Newsletter */
.v-newsletter { background: var(--v-primary); color: #fff; padding: 44px 0; }
.v-newsletter h3 { color: #fff; margin-bottom: 4px; }
.v-newsletter p { margin: 0; opacity: .8; }
.v-newsletter__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.v-news-form { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 1 460px; }
.v-news-form input[type=email] { flex: 1; border: 0; }
.v-news-form .v-btn { background: var(--v-accent); border-color: var(--v-accent); }
.v-news-form .v-form-msg { flex-basis: 100%; }

/* Footer */
.v-footer { background: var(--v-soft); padding: 56px 0 0; font-size: 14px; }
.v-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.v-footer__brand { font-family: var(--v-font-head); font-size: 22px; color: var(--v-primary); margin-bottom: 8px; }
.v-footer h4 { font-family: var(--v-font); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.v-footer ul { list-style: none; margin: 0; padding: 0; }
.v-footer li { margin-bottom: 8px; }
.v-social { display: flex; gap: 14px; font-weight: 600; }
.v-footer__bottom { border-top: 1px solid var(--v-border); margin-top: 40px; padding-top: 18px; padding-bottom: 18px; color: var(--v-muted); font-size: 13px; }

/* ---------- WooCommerce product grid ---------- */
.woocommerce ul.products, .woocommerce-page ul.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 20px; margin: 0 0 32px; padding: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; position: relative; text-align: left; }
.v-thumb { position: relative; overflow: hidden; border-radius: var(--v-radius); background: var(--v-soft); margin-bottom: 12px; }
.woocommerce ul.products li.product .v-thumb img { margin: 0; aspect-ratio: 3/4; object-fit: cover; width: 100%; transition: transform .5s; }
.woocommerce ul.products li.product:hover .v-thumb img { transform: scale(1.04); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--v-font); font-size: 14px; font-weight: 500; padding: 0; margin-bottom: 4px; color: var(--v-text); }
.woocommerce ul.products li.product .price { color: var(--v-primary); font-weight: 600; font-size: 14px; }
.woocommerce ul.products li.product .price del { color: var(--v-muted); font-weight: 400; }
.woocommerce ul.products li.product .price ins { text-decoration: none; }
.woocommerce ul.products li.product .button, .woocommerce ul.products li.product .v-enquire { width: 100%; margin-top: 10px; padding: 10px; }
.woocommerce span.onsale { background: var(--v-accent); border-radius: 2px; min-height: 0; min-width: 0; line-height: 1; padding: 6px 10px; top: 10px; left: 10px; right: auto; font-size: 11px; text-transform: uppercase; }
.v-qv { position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; transform: translateY(-4px); transition: .2s; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
li.product:hover .v-qv, .v-qv:focus { opacity: 1; transform: none; }
@media (hover: none) { .v-qv { opacity: 1; transform: none; } }

/* Single product */
.woocommerce div.product .product_title { font-size: clamp(24px, 3vw, 34px); }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--v-primary); font-size: 22px; }
.woocommerce div.product form.cart { display: flex; gap: 10px; flex-wrap: wrap; }
.woocommerce .quantity .qty { width: 70px; }
.woocommerce div.product .summary .v-enquire { margin: 10px 0 24px; min-width: 240px; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { background: none; border-radius: 0; }

/* Shop layout + filters */
.v-shop { padding-top: 24px; padding-bottom: 56px; }
.v-shop__wrap { display: block; }
.has-sidebar .v-shop__wrap { display: grid; grid-template-columns: 250px 1fr; gap: 40px; align-items: start; }
.has-sidebar .v-shop__main ul.products { grid-template-columns: repeat(3, 1fr); }
.v-filter-toggle, .v-filters-close { display: none; }
.v-filter { border-bottom: 1px solid var(--v-border); padding: 0 0 18px; margin-bottom: 18px; }
.v-filter h4 { font-family: var(--v-font); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.v-filter__cats, .v-filter__cats ul { list-style: none; margin: 0; padding: 0; }
.v-filter__cats ul { padding-left: 14px; }
.v-filter__cats li { padding: 3px 0; color: var(--v-muted); font-size: 14px; }
.v-filter__cats a { color: var(--v-text); }
.v-filter__cats .current-cat > a { color: var(--v-accent); font-weight: 600; }
.v-filter__price { display: flex; align-items: center; gap: 6px; }
.v-filter__price input { padding: 8px; }
.v-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.v-chip { border: 1px solid var(--v-border); padding: 5px 12px; border-radius: 20px; font-size: 13px; }
.v-chip.is-on { background: var(--v-primary); border-color: var(--v-primary); color: #fff; }
.v-filter__clear { font-size: 13px; text-decoration: underline; }
.woocommerce .woocommerce-breadcrumb { font-size: 13px; color: var(--v-muted); margin-bottom: 18px; }
.woocommerce .woocommerce-ordering select { width: auto; }
.woocommerce nav.woocommerce-pagination ul { border: 0; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; margin: 0 3px; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span { padding: 8px 13px; border: 1px solid var(--v-border); border-radius: var(--v-radius); }
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--v-primary); color: #fff; }

/* ---------- Modals ---------- */
.v-modal { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; visibility: hidden; transition: .25s; }
.v-modal.is-open { opacity: 1; visibility: visible; }
.v-modal__box { position: relative; background: var(--v-bg); width: 100%; max-width: 920px; max-height: 92vh; overflow: auto; border-radius: 6px; padding: 32px; transform: translateY(12px); transition: .25s; }
.v-modal.is-open .v-modal__box { transform: none; }
.v-modal__box--sm { max-width: 480px; }
.v-modal__close { position: absolute; top: 10px; right: 10px; border: 0; background: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--v-primary); }
.v-enq-product { color: var(--v-muted); margin: -6px 0 16px; font-size: 14px; }
.v-enq-form label { display: block; margin-bottom: 12px; }
.v-enq-form label span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.v-form-msg { margin: 10px 0 0; font-size: 14px; min-height: 1em; }
.v-form-msg.is-ok { color: #1a7f37; }
.v-form-msg.is-err { color: #c62828; }
.v-newsletter .v-form-msg.is-ok, .v-newsletter .v-form-msg.is-err { color: #fff; }
.v-qv-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; }
.v-qv-media { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.v-qv-media img:first-child { grid-column: 1 / -1; }
.v-qv-media img { width: 100%; object-fit: cover; border-radius: var(--v-radius); }
.v-qv-info .price { font-size: 20px; font-weight: 600; color: var(--v-primary); margin-bottom: 14px; }
.v-qv-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.v-qv-cta .added_to_cart { align-self: center; font-size: 13px; text-decoration: underline; }
.v-loader { width: 36px; height: 36px; margin: 60px auto; border: 3px solid var(--v-border); border-top-color: var(--v-primary); border-radius: 50%; animation: vspin .8s linear infinite; }
@keyframes vspin { to { transform: rotate(360deg); } }

/* Cart drawer */
.v-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 92vw); z-index: 200; background: var(--v-bg); transform: translateX(100%); transition: transform .3s; display: flex; flex-direction: column; }
.v-cart-open .v-drawer { transform: none; }
.v-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--v-border); }
.v-drawer__head h3 { margin: 0; }
.v-drawer .widget_shopping_cart_content { padding: 20px; overflow: auto; flex: 1; }
.v-drawer .woocommerce-mini-cart { list-style: none; margin: 0; padding: 0; }
.v-drawer .woocommerce-mini-cart-item { position: relative; padding: 0 24px 14px 0; margin-bottom: 14px; border-bottom: 1px solid var(--v-border); font-size: 14px; }
.v-drawer .woocommerce-mini-cart-item img { width: 64px; float: left; margin-right: 12px; }
.v-drawer .woocommerce-mini-cart-item::after { content: ""; display: block; clear: both; }
.v-drawer .remove { position: absolute; right: 0; top: 0; font-size: 18px; }
.v-drawer .woocommerce-mini-cart__total { display: flex; justify-content: space-between; font-weight: 600; }
.v-drawer .woocommerce-mini-cart__buttons { display: grid; gap: 8px; }
.v-drawer .woocommerce-mini-cart__buttons a { width: 100%; }

/* Content */
.v-page-title { font-size: clamp(26px, 4vw, 40px); }
.v-single { max-width: 820px; margin: 0 auto; }
.v-single__img { margin: 16px 0 24px; border-radius: var(--v-radius); }
.entry-content { font-size: 16px; }
.nav-links { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.nav-links .page-numbers { padding: 8px 13px; border: 1px solid var(--v-border); border-radius: var(--v-radius); }
.nav-links .current { background: var(--v-primary); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.woocommerce ul.products, .woocommerce-page ul.products { grid-template-columns: repeat(3, 1fr); }
	.has-sidebar .v-shop__main ul.products { grid-template-columns: repeat(2, 1fr); }
	.v-carousel__track { grid-auto-columns: calc((100% - 45px) / 4); }
}
@media (max-width: 991px) {
	.v-menu-toggle { display: inline-flex; }
	.v-header__inner { min-height: 60px; gap: 8px; }
	.v-logo { flex: 1; text-align: center; } .v-logo a { display: inline-block; }
	.v-actions { margin-left: 0; }
	.v-nav { position: fixed; top: 0; left: 0; bottom: 0; width: min(340px, 86vw); background: var(--v-bg); z-index: 200; transform: translateX(-100%); transition: transform .3s; overflow-y: auto; padding: 56px 0 24px; }
	.v-menu-open .v-nav { transform: none; }
	.v-nav__close { display: inline-flex; position: absolute; top: 8px; right: 8px; }
	.v-menu { display: block; }
	.v-menu li { position: relative; border-bottom: 1px solid var(--v-border); }
	.v-menu > li > a, .v-menu .sub-menu a { padding: 14px 52px 14px 20px; display: block; }
	.v-menu .sub-menu { display: none; background: var(--v-soft); }
	.v-menu .sub-menu a { padding-left: 32px; text-transform: none; letter-spacing: 0; font-size: 14px; }
	.v-menu .sub-menu .sub-menu a { padding-left: 44px; }
	.v-menu li.is-open > .sub-menu { display: block; }
	.v-sub-toggle { display: block; position: absolute; right: 0; top: 0; width: 52px; height: 48px; border: 0; background: none; font-size: 20px; }
	.v-menu li.is-open > .v-sub-toggle { transform: rotate(45deg); }

	.has-sidebar .v-shop__wrap { display: block; }
	.v-filter-toggle { display: inline-flex; margin-bottom: 16px; }
	.v-shop__sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); background: var(--v-bg); z-index: 200; padding: 56px 20px 24px; overflow-y: auto; transform: translateX(-100%); transition: transform .3s; }
	.v-filters-open .v-shop__sidebar { transform: none; }
	.v-filters-close { display: inline-flex; position: absolute; top: 8px; right: 8px; }
	.v-posts { grid-template-columns: repeat(2, 1fr); }
	.v-qv-grid { grid-template-columns: 1fr; }
	.v-footer__grid { grid-template-columns: 1fr 1fr; }
	.v-footer__grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
	.woocommerce ul.products, .woocommerce-page ul.products, .has-sidebar .v-shop__main ul.products { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
	.v-carousel__track { grid-auto-columns: 42%; }
	.v-posts { grid-template-columns: 1fr; }
	.v-section { padding: 40px 16px; }
	.v-modal__box { padding: 24px 18px; }
	.v-hero__nav { display: none; }
	.admin-bar .v-header { top: 0; }
}
