/* -------------------------------------------------------------------------
 * vatanconnect-theme-base.css — structural resets only, no visual styling.
 *
 * Absorbed from the former parent theme when this theme became standalone.
 * It is enqueued BEFORE style.css so the cascade order that the design was
 * built against is preserved exactly: resets first, then the design.
 * ------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------
 * VatanConnect — Bare minimum structural resets ONLY.
 *
 * This file intentionally contains NO visual/aesthetic styling.
 * Its sole purpose is to keep default WordPress markup and WooCommerce
 * forms structurally usable. All design belongs in child themes / Elementor.
 * ---------------------------------------------------------------------- */

/* Layout token only — no colors. Child themes add brand tokens on top. */
:root {
	--vtc-base-content-width: 1140px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	padding: 0;
}

/* -------------------------------------------------------------------------
 * Global horizontal-scroll failsafes. Guarantees a 100% responsive baseline
 * so no element (wide media, tables, embeds, long strings) can push the page
 * wider than the viewport.
 * ---------------------------------------------------------------------- */
html,
body {
	max-width: 100%;
	overflow-x: hidden;
}

.vtc-base-site {
	max-width: 100vw;
}

/* Never let a long unbroken string (URLs, tokens) blow out the layout. */
body,
p,
li,
dd,
dt,
h1, h2, h3, h4, h5, h6,
a,
span,
td,
th,
figcaption,
.vtc-base-entry__content {
	overflow-wrap: break-word;
	word-wrap: break-word;
}

/* Wide block-level content scrolls inside itself, not the page. */
pre,
table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

/* Media should never overflow its container. */
img,
svg,
video,
canvas,
iframe,
embed,
object {
	max-width: 100%;
	height: auto;
}

/* Structural page wrapper — no visual styling. */
.vtc-base-site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.vtc-base-site__main {
	flex: 1 0 auto;
}

/* Minimal default header/footer chrome so a fresh install isn't blank.
 * A built Elementor header/footer replaces these entirely. */
.vtc-base-site__header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	padding-top: 16px;
	padding-bottom: 16px;
}

/* Cap the custom logo so a large upload can't blow up the header. */
.vtc-base-branding img,
.vtc-base-branding .custom-logo {
	max-height: 56px;
	width: auto;
	height: auto;
}

.vtc-base-branding__title {
	font-size: 1.4rem;
	font-weight: 700;
	text-decoration: none;
}

.vtc-base-branding__desc {
	margin: 2px 0 0;
	font-size: 0.85rem;
	opacity: 0.7;
}

/* Horizontal, un-bulleted nav — covers both wp_nav_menu and the
 * wp_page_menu fallback (which wraps its list in a div). */
.vtc-base-nav ul,
.vtc-base-nav__menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vtc-base-nav li {
	list-style: none;
}

.vtc-base-nav a {
	text-decoration: none;
}

.vtc-base-site__footer {
	margin-top: 40px;
}

.vtc-base-site__footer-inner {
	padding-top: 24px;
	padding-bottom: 24px;
	text-align: center;
	font-size: 0.85rem;
	opacity: 0.8;
}

/* Content entries — spacing only, no decoration. */
.vtc-base-entry {
	margin-bottom: 40px;
}

.vtc-base-entry__thumbnail {
	margin-bottom: 16px;
}

.vtc-base-archive-header {
	margin-bottom: 30px;
}

/* Footer widget columns — responsive grid, layout only. */
.vtc-base-footer-widgets {
	display: grid;
	gap: 30px;
	margin-bottom: 24px;
	text-align: start;
}

.vtc-base-footer-widgets--cols-2 {
	grid-template-columns: repeat(2, 1fr);
}

.vtc-base-footer-widgets--cols-3 {
	grid-template-columns: repeat(3, 1fr);
}

.vtc-base-footer-widgets--cols-4 {
	grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 782px) {
	.vtc-base-footer-widgets {
		grid-template-columns: 1fr;
	}
}

/* Sidebar + widgets — spacing only. */
.vtc-base-sidebar {
	margin-top: 40px;
}

.widget {
	margin-bottom: 30px;
}

.widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Structural content container — boxes non-Elementor content so it isn't
 * edge-to-edge. Elementor stretched sections override this via their own JS,
 * and the Canvas / Full Width page templates opt out entirely. */
.vtc-base-container {
	width: 100%;
	max-width: var(--vtc-base-content-width, 1140px);
	margin-inline: auto;
	padding-inline: 20px;
}

/* WordPress core accessibility helper (required for valid markup). */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: #fff;
	clip: auto !important;
	clip-path: none;
	display: block;
	height: auto;
	/* Logical, not `left`: this is the skip target a keyboard user lands on, and
	   on an RTL page a physical left puts it across the page from where their
	   eye already is. */
	inset-inline-start: 5px;
	padding: 15px 23px 14px;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* Skip link (accessibility requirement).
 * Clipped in place, never parked at a negative offset: on an RTL document the
 * physical-left direction IS scrollable, so left:-9999px adds ~10,000px of empty
 * page width and the whole page can be dragged sideways. Self-contained on purpose
 * (does not lean on .screen-reader-text) so a child theme may use it alone. */
.skip-link {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	left: auto;
	overflow: hidden;
	position: absolute;
	right: auto;
	inset-inline-start: 0;
	top: auto;
	white-space: nowrap;
	width: 1px;
	z-index: 999999;
}

.skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	left: auto;
	right: auto;
	inset-inline-start: 6px;
	top: 6px;
	white-space: normal;
	width: auto;
}

/* Alignment classes required by the WP block/media editor.
 *
 * ⚠ THESE MUST STAY PHYSICAL. Every other directional property in this theme is
 * logical, so a later sweep will find these and want to convert them — do not.
 * Their names ARE their contract: an author who picked «align left» in the
 * editor asked for the physical left, on an RTL page as much as an LTR one, and
 * a logical rewrite would silently flip every image an author has ever placed.
 * The rule is about properties whose side should follow the reading direction;
 * these three are the case where it must not. */
.alignleft {
	float: left;
	margin-right: 1.5em;
}

.alignright {
	float: right;
	margin-left: 1.5em;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

/* -------------------------------------------------------------------------
 * Minimal WooCommerce structural safeguards.
 * Prevents forms / notices / galleries from collapsing when no CSS is loaded.
 * ---------------------------------------------------------------------- */
.woocommerce form .form-row {
	display: block;
	margin: 0 0 6px;
}

.woocommerce form .form-row label {
	display: block;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	width: 100%;
}

.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-error {
	display: block;
	list-style: none;
	margin: 0 0 1em;
	padding: 0;
}

.woocommerce .screen-reader-text {
	position: absolute;
}

/* Bare structural product grid so the shop loop isn't one giant column.
 * Fixed 3-up on desktop (matches common shop layouts), 2-up tablet, 1-up mobile.
 * Purely layout: zero color, border, or shadow. */
.vtc-base-woocommerce-content ul.products,
.woocommerce ul.products,
.woocommerce-page ul.products {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* WooCommerce adds clearfix pseudo-elements that become empty grid cells. */
.vtc-base-woocommerce-content ul.products::before,
.vtc-base-woocommerce-content ul.products::after,
.woocommerce ul.products::before,
.woocommerce ul.products::after {
	content: none;
	display: none;
}

@media (max-width: 900px) {
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		grid-template-columns: 1fr;
	}
}

/* Each card fills its grid cell (100%). The extra always-present .type-product
 * class lifts specificity above WooCommerce's own .columns-N width:30.75%
 * float rule — so it wins everywhere (shop, Elementor widget, [products]),
 * with or without our container wrapper, and without !important. */
.woocommerce ul.products li.product.type-product,
.woocommerce-page ul.products li.product.type-product,
.vtc-base-woocommerce-content ul.products li.product.type-product {
	width: 100%;
	max-width: 100%;
	margin: 0;
	float: none;
	clear: none;
	text-align: center;
}

/* Scoped under our container so specificity beats WooCommerce's own
 * stylesheet (which loads later) and the product image fills the cell. */
.vtc-base-woocommerce-content ul.products li.product a img,
.vtc-base-woocommerce-content ul.products li.product img,
.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 0 14px;
}

/* Keep the single-product gallery from overflowing the container. */
.woocommerce div.product .woocommerce-product-gallery {
	max-width: 100%;
}

/* No brand/color layer here by design — the parent theme ships ZERO visual
 * styling. Colors, buttons, and typography live in child themes / Elementor,
 * so third-party plugin and builder designs are never overridden. */
