/* AVESTA Shop
 * ขนาดจอ (ตามแบบ): Desktop ≥1440 · Laptop 1366–1439 · Tablet L 1024–1365 · Tablet P 768–1023 · Mobile L 425–767 · Mobile S ≤424
 * ไอคอนอยู่ใน icons.css (สร้างจาก tools/build-icons.py)
 */

:root {
	--av-radius: 14px;
	--av-gap: 16px;
	--av-shadow: var(--wp--preset--shadow--card);
	--av-deep: var(--wp--preset--color--deep);
	--av-navy: var(--wp--preset--color--navy);
	--av-blue: var(--wp--preset--color--blue);
	--av-gold: var(--wp--preset--color--gold);
	--av-line: var(--wp--preset--color--line);
	--av-section: clamp(2.5rem, 5vw, 4.5rem);
}
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { overflow-x: clip; }
img { max-width: 100%; height: auto; }
.wp-site-blocks > * + * { margin-block-start: 0; }
main > .alignfull + .alignfull { margin-block-start: 0; }

/* ---------- icons (mask) ---------- */
.avesta-ico::before, .avesta-mark::before, .avesta-btn-cart .wp-block-button__link::before, .avesta-more a::after {
	content: ""; display: inline-block; flex: none; background: currentColor;
	-webkit-mask: var(--avesta-i) center / contain no-repeat; mask: var(--avesta-i) center / contain no-repeat;
}

/* ---------- top bar ---------- */
.avesta-topbar { padding-block: .45rem; }
.avesta-topbar p { margin: 0; }
.avesta-topbar a { color: inherit; text-decoration: none; }
.avesta-topbar a:hover { color: var(--av-gold); }
.avesta-topbar__tagline { opacity: .9; }
.avesta-topbar__contact { gap: 1.5rem !important; }
.avesta-topbar .avesta-i { display: inline-flex; align-items: center; gap: .45rem; }
.avesta-topbar .avesta-i::before { content: ""; width: 15px; height: 15px; background: var(--av-gold); -webkit-mask: var(--avesta-i) center/contain no-repeat; mask: var(--avesta-i) center/contain no-repeat; }
.avesta-i--phone { --avesta-i: var(--avesta-i-phone); }
.avesta-i--mail { --avesta-i: var(--avesta-i-mail); }
.avesta-i--line { --avesta-i: var(--avesta-i-chat); }
.avesta-topbar .avesta-i--line::before { background: var(--wp--preset--color--line-bright); }

/* ---------- header ---------- */
.avesta-header { position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 var(--av-line), 0 6px 18px rgba(16, 40, 94, .05); padding-block: .7rem; }
.admin-bar .avesta-header { top: 32px; }
.avesta-header__row { gap: 1.5rem !important; min-height: 52px; }
.avesta-brand { flex: none; }
.avesta-brand .wp-block-site-logo img { width: 46px; height: auto; }
.avesta-wordmark { margin: 0; font-weight: 800; font-size: 1.5rem; letter-spacing: .01em; line-height: 1; }
.avesta-wordmark a { color: var(--av-navy); text-decoration: none; }
.avesta-header__nav { flex: 1 1 auto; justify-content: center; }
.avesta-header__nav .wp-block-navigation-item__content { color: var(--wp--preset--color--ink); text-decoration: none; font-weight: 500; padding-block: .5rem; }
.avesta-header__nav .wp-block-navigation-item__content:hover,
.avesta-header__nav .current-menu-item > .wp-block-navigation-item__content { color: var(--av-blue); }
.avesta-header__nav .wp-block-navigation__submenu-container { border: 1px solid var(--av-line) !important; border-radius: 10px; box-shadow: var(--av-shadow); padding: .5rem !important; min-width: 270px !important; }
.avesta-header__nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .5rem .75rem; border-radius: 10px; }
.avesta-header__nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--blue-soft); }

/* เมนูแบบ overlay "always": จอใหญ่แสดงเป็นแถว จอเล็กกว่า 1024 เป็นปุ่มเมนู */
@media (min-width: 1024px) {
	.avesta-header__nav .wp-block-navigation__responsive-container-open { display: none !important; }
	.avesta-header__nav .wp-block-navigation__responsive-container.hidden-by-default:not(.is-menu-open) { display: block; position: relative; width: 100%; z-index: auto; background-color: inherit; }
	.avesta-header__nav .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-container-close { display: none; }
}
.avesta-header__nav .wp-block-navigation__responsive-container.is-menu-open { padding: 1.25rem 1.25rem 2rem; }
.avesta-header__nav .is-menu-open .wp-block-navigation-item__content { font-size: 1.125rem; padding: .55rem 0; }
.avesta-header__nav .is-menu-open .wp-block-navigation__submenu-container { border: 0 !important; box-shadow: none; padding: 0 0 0 1rem !important; }
.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--av-navy); }

.avesta-actions { flex: none; align-items: center; }
.avesta-actions .wp-block-search__button, .avesta-actions .wc-block-mini-cart__button, .avesta-actions .wc-block-customer-account a {
	min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
	background: transparent; color: var(--av-navy); border: 0; border-radius: 10px; padding: 0;
}
.avesta-actions .wp-block-search__button:hover, .avesta-actions .wc-block-mini-cart__button:hover, .avesta-actions .wc-block-customer-account a:hover { background: var(--wp--preset--color--blue-soft); }
.avesta-actions .wp-block-search__button svg { width: 24px; height: 24px; fill: currentColor; }
.avesta-search .wp-block-search__inside-wrapper { border: 1px solid transparent; border-radius: 10px; }
.avesta-search:not(.wp-block-search__searchfield-hidden) .wp-block-search__inside-wrapper { border-color: var(--av-line); background: var(--wp--preset--color--base); }
.avesta-search .wp-block-search__input { border: 0; font: inherit; min-height: 42px; padding-inline: .75rem; }
.wc-block-mini-cart__badge { background: var(--wp--preset--color--danger) !important; color: var(--wp--preset--color--base) !important; font-weight: 700; }
.avesta-cta { margin-left: .5rem; }
.avesta-cta .wp-block-button__link { padding: .7rem 1.4rem; white-space: nowrap; }

/* ---------- buttons ---------- */
.wp-block-button__link { transition: background-color .15s, box-shadow .15s, transform .15s; }
.wp-block-button__link:hover { transform: translateY(-1px); }
.avesta-btn-cart .wp-block-button__link { display: inline-flex; align-items: center; gap: .5rem; }
.avesta-btn-cart .wp-block-button__link::before { --avesta-i: var(--avesta-i-cart); width: 18px; height: 18px; }
.avesta-btn-on-dark .wp-block-button__link { color: var(--wp--preset--color--base) !important; border: 1.5px solid rgba(255, 255, 255, .85) !important; background: transparent !important; }
.avesta-btn-on-dark .wp-block-button__link:hover { background: rgba(255, 255, 255, .1) !important; }
.wp-block-button.is-style-outline > .wp-block-button__link { border: 1.5px solid currentColor; background: transparent; color: var(--av-navy); padding: calc(.75rem - 1.5px) calc(1.25rem - 1.5px); }

/* ---------- hero ---------- */
.avesta-hero {
	position: relative; overflow: hidden; isolation: isolate;
	padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 3vw, 2.5rem);
	background:
		radial-gradient(55% 75% at 78% 42%, rgba(46, 108, 255, .55), transparent 62%),
		radial-gradient(35% 50% at 8% 95%, rgba(255, 194, 14, .14), transparent 70%),
		linear-gradient(130deg, var(--wp--preset--color--night) 0%, var(--wp--preset--color--night-mid) 52%, var(--wp--preset--color--deep) 100%) !important;
}
.avesta-hero::after {
	content: ""; position: absolute; inset: auto -10% -14% -10%; height: 42%; z-index: -1; pointer-events: none; opacity: .85;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 300' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23ffc20e' stop-opacity='0'/%3E%3Cstop offset='.45' stop-color='%23ffc20e'/%3E%3Cstop offset='1' stop-color='%23ffc20e' stop-opacity='0'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%234d8bff' stop-opacity='0'/%3E%3Cstop offset='.6' stop-color='%234d8bff'/%3E%3Cstop offset='1' stop-color='%234d8bff' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 230 C 360 120, 760 300, 1440 150' fill='none' stroke='url(%23g)' stroke-width='3'/%3E%3Cpath d='M0 260 C 420 170, 820 290, 1440 190' fill='none' stroke='url(%23b)' stroke-width='2' opacity='.8'/%3E%3Cpath d='M0 285 C 480 210, 900 300, 1440 230' fill='none' stroke='url(%23b)' stroke-width='1.5' opacity='.5'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}
.avesta-hero__cols { gap: clamp(1.5rem, 4vw, 3rem) !important; margin-bottom: 0; }
.avesta-hero__title { color: var(--wp--preset--color--base); font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem) !important; line-height: 1.22; margin: 0 0 1rem; font-weight: 800; }
.avesta-hero__title .avesta-gold { display: block; color: var(--av-gold); }
.avesta-gold { color: var(--av-gold); }
.avesta-hero__lead { color: var(--wp--preset--color--on-dark); font-size: clamp(1rem, .95rem + .3vw, 1.2rem); margin: 0 0 1.75rem; }
.avesta-hero__buttons { gap: .75rem; }
.avesta-hero__buttons .wp-block-button__link { padding: .85rem 1.6rem; font-size: 1.0625rem; }

/* ความสูงตามสัดส่วนความกว้าง กล่องสูงสุด (box--2) สูง 0.53 เท่าของความกว้าง จึงไม่ล้นขึ้นไปทับข้อความและปุ่ม */
.avesta-hero__visual { position: relative; aspect-ratio: 20 / 13; min-height: 0; }
.avesta-hero__visual::before { /* แสงใต้กล่อง */
	content: ""; position: absolute; left: 6%; right: 2%; bottom: 4%; height: 22%;
	background: radial-gradient(50% 50% at 50% 50%, rgba(80, 140, 255, .65), transparent 70%); filter: blur(6px);
}
.avesta-hero__visual::after { /* วงแหวนฐาน */
	content: ""; position: absolute; left: 12%; right: 6%; bottom: 7%; height: 16%; border-radius: 50%;
	border: 2px solid rgba(120, 170, 255, .55); box-shadow: 0 0 24px rgba(77, 139, 255, .6), inset 0 0 24px rgba(77, 139, 255, .35);
}
.avesta-box { position: absolute; margin: 0 !important; z-index: 1; }
.avesta-box img { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .45)); }
.avesta-box--1 { width: 31%; left: 6%; bottom: 13%; z-index: 1; }
.avesta-box--2 { width: 32%; left: 33%; bottom: 10%; z-index: 3; }
.avesta-box--3 { width: 30%; left: 62%; bottom: 13%; z-index: 2; }

.avesta-hero__features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--av-gap); margin-top: clamp(1.5rem, 3vw, 2.25rem); max-width: 760px; }
.avesta-feature { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; font-weight: 600; font-size: .9375rem; color: var(--wp--preset--color--on-dark); }
.avesta-feature::before { width: 34px; height: 34px; background: var(--av-gold) !important; }

/* ---------- section heads ---------- */
.avesta-section-head { margin-bottom: 1.5rem; gap: 1rem !important; }
.avesta-underline { position: relative; margin: 0; padding-bottom: .6rem; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem) !important; }
.avesta-underline::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 999px; background: var(--av-blue); }
:is(.avesta-why-band, .has-deep-background-color, .has-ink-background-color, .has-navy-background-color) .avesta-underline::after { background: var(--av-gold); }
.avesta-more { margin: 0; }
.avesta-more a { display: inline-flex; align-items: center; gap: .4rem; color: var(--av-blue); font-weight: 600; text-decoration: none; }
.avesta-more a::after { --avesta-i: var(--avesta-i-arrow-right); width: 16px; height: 16px; }
.avesta-more a:hover { text-decoration: underline; }

/* ---------- intro + solution cards ---------- */
.avesta-intro { padding-block: var(--av-section) calc(var(--av-section) * .6); }
.avesta-intro__title { font-size: clamp(1.35rem, 1.05rem + 1vw, 1.85rem) !important; margin-top: 0; }
.avesta-solutions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--av-gap); }
.avesta-solution { margin: 0; }
.avesta-solution a {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; text-align: center;
	min-height: 132px; padding: 1.1rem .75rem; border: 1px solid var(--av-line); border-radius: var(--av-radius); background: var(--wp--preset--color--base);
	box-shadow: var(--av-shadow); color: var(--wp--preset--color--ink); text-decoration: none; font-weight: 600; font-size: .9375rem; line-height: 1.35;
	transition: transform .15s, border-color .15s;
}
.avesta-solution a:hover { transform: translateY(-3px); border-color: var(--av-blue); }
.avesta-solution::before { display: none; }
.avesta-solution a::before { content: ""; width: 40px; height: 40px; background: var(--av-blue); -webkit-mask: var(--avesta-i) center/contain no-repeat; mask: var(--avesta-i) center/contain no-repeat; }

/* ---------- featured carousel + product cards ---------- */
.avesta-featured { padding-block: calc(var(--av-section) * .6) var(--av-section); }
.avesta-carousel { position: relative; }
.avesta-carousel .wc-block-product-template {
	display: grid !important; grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * var(--av-gap)) / 4);
	gap: var(--av-gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 2px;
	padding: 4px 2px 14px !important; margin: 0 !important; scrollbar-width: none;
}
.avesta-carousel .wc-block-product-template::-webkit-scrollbar { display: none; }
.avesta-carousel .wc-block-product-template > li { width: auto !important; margin: 0 !important; scroll-snap-align: start; }
.avesta-carousel__nav {
	position: absolute; top: 38%; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--av-line);
	background: var(--wp--preset--color--base); color: var(--av-navy); box-shadow: var(--av-shadow); cursor: pointer; display: none; align-items: center; justify-content: center;
}
.avesta-carousel.is-scrollable .avesta-carousel__nav { display: inline-flex; }
.avesta-carousel__nav::before { content: ""; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--avesta-i) center/contain no-repeat; mask: var(--avesta-i) center/contain no-repeat; }
.avesta-carousel__nav--prev { left: -22px; --avesta-i: var(--avesta-i-chevron-left); }
.avesta-carousel__nav--next { right: -22px; --avesta-i: var(--avesta-i-chevron-right); }
.avesta-carousel__nav:disabled { opacity: .35; cursor: default; }
.avesta-carousel__nav:not(:disabled):hover { color: var(--av-blue); border-color: var(--av-blue); }

.wc-block-product-template .wc-block-product, .avesta-products .wc-block-product {
	background: var(--wp--preset--color--base); border: 1px solid var(--av-line); border-radius: var(--av-radius); padding: 14px; display: flex; flex-direction: column;
	transition: box-shadow .2s, transform .2s;
}
.wc-block-product:hover { box-shadow: var(--av-shadow); transform: translateY(-2px); }
.wc-block-product .wc-block-components-product-image { margin-bottom: .5rem !important; }
.wc-block-product .wc-block-components-product-image img { border-radius: 10px; background: var(--wp--preset--color--surface); aspect-ratio: 1 / 1; object-fit: contain; }
.wc-block-product .wp-block-post-title { font-size: 1rem !important; line-height: 1.45; margin: .35rem 0 .25rem; font-weight: 600; text-align: left !important;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.wc-block-product .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.wc-block-product .wp-block-post-title a:hover { color: var(--av-blue); }
.wc-block-product .wc-block-components-product-price { color: var(--av-navy); font-weight: 800; font-size: 1.125rem; text-align: left !important; margin-bottom: .75rem; }
.avesta-card-actions { margin-top: auto; gap: .5rem !important; align-items: stretch; flex-wrap: wrap !important; }
.avesta-card-actions > * { margin: 0 !important; }
.avesta-card-actions .wp-block-woocommerce-product-button { flex: 1 1 auto; }
.avesta-card-actions .wp-block-button__link, .avesta-card-actions .wc-block-components-product-button__button {
	width: 100%; display: inline-flex !important; align-items: center; justify-content: center; gap: .4rem; white-space: nowrap;
	font-size: .875rem !important; padding: .6rem .7rem !important; min-height: 42px; border-radius: 10px !important;
}
.avesta-card-actions .wc-block-components-product-button { flex: 1 1 128px; display: flex !important; flex-direction: column; align-items: stretch !important; margin: 0 !important; padding: 0 !important; }
.avesta-card-actions .wc-block-components-product-button .wp-block-button__link::before { width: 16px; height: 16px; }
.avesta-view { flex: 1 1 84px; display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: .55rem .8rem; border: 1.5px solid var(--av-navy);
	border-radius: 10px; color: var(--av-navy); text-decoration: none; font-weight: 600; font-size: .875rem; white-space: nowrap; }
.avesta-view:hover { background: var(--wp--preset--color--blue-soft); }

/* ---------- brands grid ---------- */
.avesta-brands { padding-block: var(--av-section); }
.avesta-brand-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--av-gap); }
.avesta-brand-card { background: var(--wp--preset--color--base); border: 1px solid var(--av-line); border-radius: var(--av-radius); padding: 1.1rem 1.2rem; margin: 0 !important; }
.avesta-brand-card__name { display: flex; align-items: center; gap: .7rem; margin: 0 0 .6rem; font-size: 1.125rem !important; }
.avesta-brand-card__name a { color: var(--av-navy); text-decoration: none; }
.avesta-brand-card__name a:hover { color: var(--av-blue); }
.avesta-mark::before { width: 40px; height: 40px; border-radius: 10px; }
/* ไอคอนเส้นบนกรอบสีฟ้าอ่อน: ใช้ไอคอนสีน้ำเงินเป็นพื้นหลัง ไม่ใช้ mask เพราะ mask จะตัดกรอบทิ้ง */
.avesta-tile::before, .avesta-brand-card__name.avesta-mark--database::before, .avesta-brand-card__name.avesta-mark--cube::before, .avesta-brand-card__name.avesta-mark--server::before, .avesta-service::before {
	-webkit-mask: none; mask: none; background: var(--wp--preset--color--blue-soft) var(--avesta-ib) center / 24px no-repeat;
}
/* ตราตัวอักษรของแต่ละยี่ห้อ */
.avesta-mark--proxmox::before, .avesta-mark--nakivo::before, .avesta-mark--realvnc::before, .avesta-mark--anyviewer::before, .avesta-mark--devart::before {
	-webkit-mask: none; mask: none; display: inline-flex; align-items: center; justify-content: center; color: var(--wp--preset--color--base); font-weight: 800; font-size: 1rem;
}
.avesta-mark--proxmox::before { content: "✕"; background: #e57000; font-size: 1.25rem; }
.avesta-mark--nakivo::before { content: "N"; background: #1e40af; }
.avesta-mark--realvnc::before { content: "R"; background: #2563eb; }
.avesta-mark--anyviewer::before { content: "Av"; background: #0284c7; font-size: .9rem; }
.avesta-mark--devart::before { content: "D"; background: #7c3aed; }
.avesta-product-list { list-style: none; padding: 0; margin: 0; font-size: .9375rem; }
.avesta-product-list li { padding: .32rem 0; border-top: 1px dashed var(--av-line); }
.avesta-product-list li:first-child { border-top: 0; }
.avesta-product-list a { color: var(--wp--preset--color--muted); text-decoration: none; display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.avesta-product-list a:hover { color: var(--av-blue); }
.avesta-badge { flex: none; font-size: .75rem; font-weight: 700; background: var(--wp--preset--color--gold-soft); color: var(--wp--preset--color--gold-ink); border-radius: 999px; padding: .05rem .55rem; }

/* ---------- services ---------- */
.avesta-services { padding-block: var(--av-section); scroll-margin-top: 90px; }
.avesta-service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--av-gap); }
.avesta-service { margin: 0 !important; background: var(--wp--preset--color--base); border: 1px solid var(--av-line); border-radius: var(--av-radius); padding: 1.3rem; }
.avesta-service::before { display: block; width: 48px; height: 48px; margin-bottom: .9rem; border-radius: 10px; background-size: 26px !important; }
.avesta-service h3 { font-size: 1.0625rem !important; margin: 0 0 .4rem; }
.avesta-service p { margin: 0; color: var(--wp--preset--color--muted); font-size: .9375rem; }

/* ---------- why band ---------- */
.avesta-why-band { padding-block: var(--av-section); background: linear-gradient(130deg, var(--wp--preset--color--night) 0%, var(--wp--preset--color--night-mid) 60%, var(--wp--preset--color--deep) 100%) !important; }
.avesta-why-band .avesta-underline { margin-bottom: 1.75rem; }
.avesta-why-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--av-gap); }
.avesta-why { margin: 0 !important; padding: 1.2rem 1.25rem; border-radius: var(--av-radius); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.avesta-why h3 { font-size: 1.0625rem !important; margin: 0 0 .4rem; }
.avesta-why p { margin: 0; color: var(--wp--preset--color--on-dark); font-size: .9375rem; }

/* ---------- reviews + cards ---------- */
.avesta-card { height: 100%; border: 1px solid var(--av-line); }
.avesta-card .wp-block-heading { margin-top: 0; }
.avesta-quote { font-size: 1rem; }
.avesta-quote::before { content: "\201C"; display: block; font-size: 3rem; line-height: .6; color: var(--av-blue); margin-bottom: .5rem; }
.avesta-about-quote { margin: 2rem 0; padding: 1.25rem 1.5rem; border: 0; border-radius: var(--av-radius); background: var(--wp--preset--color--surface); }
.avesta-about-quote::before { content: "\201C"; display: block; font-size: 3rem; line-height: .6; color: var(--av-blue); margin-bottom: .5rem; }
.avesta-about-quote p { margin: 0; color: var(--av-navy); font-size: 1.25rem !important; font-weight: 600; line-height: 1.6; }

/* ---------- footer ---------- */
.avesta-footer { background: linear-gradient(180deg, var(--wp--preset--color--deep), var(--wp--preset--color--night)) !important; }
.avesta-footer__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); gap: 2rem; }
.avesta-footer__grid > * { margin: 0 !important; }
.avesta-brand--footer { margin-bottom: .35rem; justify-content: flex-start !important; justify-self: start !important; margin-inline: 0 !important; }
.avesta-brand--footer .avesta-wordmark a { color: var(--wp--preset--color--base); }
.avesta-footer__shopname { color: var(--av-gold) !important; font-weight: 800; font-size: 1.0625rem; margin: 0 0 .6rem; letter-spacing: .02em; }
.avesta-footer__about p { margin: 0 0 .6rem; }
.avesta-footer__heading { font-size: 1.0625rem !important; margin: 0 0 .8rem !important; }
.avesta-footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.avesta-footer__links a { text-decoration: none; color: var(--wp--preset--color--on-dark) !important; }
.avesta-footer__links a:hover { color: var(--av-gold) !important; text-decoration: underline; }
.avesta-footer p { color: var(--wp--preset--color--on-dark-muted); }
.avesta-footer__contact a, .avesta-footer__contact span { display: inline-flex; align-items: center; gap: .55rem; color: var(--wp--preset--color--on-dark); }
.avesta-footer__contact .avesta-ico::before { width: 17px; height: 17px; background: var(--av-gold); }
.avesta-footer__contact .avesta-line-link::before { background: var(--wp--preset--color--line-bright); }
.avesta-footer__copy { margin-top: 2rem !important; margin-bottom: 0 !important; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .14); color: var(--wp--preset--color--on-dark-muted) !important; }
.avesta-ico--chat { --avesta-i: var(--avesta-i-chat); }
@media (max-width: 1365px) { .avesta-footer__grid { grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 1.5rem; } }
@media (max-width: 1023px) {
	.avesta-footer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.avesta-footer__about { grid-column: 1 / -1; max-width: 640px; }
}
@media (max-width: 767px) { .avesta-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; } }
.avesta-line-fab { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: inline-flex; align-items: center; gap: .4rem; background: var(--wp--preset--color--line-green); color: var(--wp--preset--color--base); text-decoration: none; font-weight: 700; padding: .6rem 1rem .6rem .8rem; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.18); min-height: 48px; }
.avesta-line-fab:hover { background: var(--wp--preset--color--line-green-deep); color: var(--wp--preset--color--base); }

/* ---------- WooCommerce: archive / single / cart / checkout / account ---------- */
.wc-block-product-template:not(.avesta-carousel .wc-block-product-template) { gap: var(--av-gap); }
/* ตารางในรายละเอียดสินค้า (เทียบรุ่น สเปก Appliance) อ่านง่ายแบบเอกสารเสนอราคา มือถือเลื่อนเฉพาะในตาราง */
.single-product :is(.wp-block-post-content, .wp-block-woocommerce-product-details, .woocommerce-Tabs-panel) :is(figure.wp-block-table, .wp-block-table) { margin: 1rem 0 1.5rem; overflow-x: auto; border: 1px solid var(--av-line); border-radius: 10px; }
.single-product :is(.wp-block-post-content, .wp-block-woocommerce-product-details, .woocommerce-Tabs-panel) table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .9375rem; line-height: 1.6; font-variant-numeric: tabular-nums; }
.single-product :is(.wp-block-post-content, .wp-block-woocommerce-product-details, .woocommerce-Tabs-panel) :is(th, td) { padding: .65rem .85rem; border: 0; border-bottom: 1px solid var(--av-line); text-align: center; vertical-align: middle; }
.single-product :is(.wp-block-post-content, .wp-block-woocommerce-product-details, .woocommerce-Tabs-panel) :is(th, td):first-child { text-align: left; width: 46%; }
.single-product :is(.wp-block-post-content, .wp-block-woocommerce-product-details, .woocommerce-Tabs-panel) thead th { background: var(--wp--preset--color--blue-soft); color: var(--av-navy); font-weight: 700; white-space: nowrap; }
.single-product :is(.wp-block-post-content, .wp-block-woocommerce-product-details, .woocommerce-Tabs-panel) tbody tr:last-child :is(th, td) { border-bottom: 0; }
.single-product :is(.wp-block-post-content, .wp-block-woocommerce-product-details, .woocommerce-Tabs-panel) tbody tr:nth-child(even) { background: var(--wp--preset--color--surface); }
/* มือถือ: ตรึงคอลัมน์ชื่อความสามารถไว้ เลื่อนดูรุ่นอื่นแล้วยังรู้ว่าแถวไหนคืออะไร */
@media (max-width: 767px) {
	.single-product :is(.wp-block-post-content, .wp-block-woocommerce-product-details, .woocommerce-Tabs-panel) :is(th, td):first-child { position: sticky; left: 0; z-index: 1; width: 42vw; min-width: 150px; background: var(--wp--preset--color--base); box-shadow: 1px 0 0 var(--av-line); }
	.single-product :is(.wp-block-post-content, .wp-block-woocommerce-product-details, .woocommerce-Tabs-panel) tbody tr:nth-child(even) :is(th, td):first-child { background: var(--wp--preset--color--surface); }
	.single-product :is(.wp-block-post-content, .wp-block-woocommerce-product-details, .woocommerce-Tabs-panel) thead th:first-child { background: var(--wp--preset--color--blue-soft); }
	.single-product :is(.wp-block-post-content, .wp-block-woocommerce-product-details, .woocommerce-Tabs-panel) table { min-width: 460px; font-size: .875rem; }
}
.wc-block-components-product-price, .wp-block-woocommerce-product-price { font-weight: 800; color: var(--av-navy); }
.variations_form select { min-height: 44px; padding: 0 .75rem; border: 1px solid var(--av-line); border-radius: 10px; font: inherit; max-width: 100%; }
.variations_form .variations td, .variations_form .variations th { display: block; text-align: left; padding: .25rem 0; }
.single_add_to_cart_button, .woocommerce .button.alt, .wc-block-components-button:not(.is-link) { background: var(--av-gold) !important; color: var(--wp--preset--color--ink) !important; border-radius: 10px !important; font-weight: 700 !important; min-height: 46px; border: 0 !important; }
.single_add_to_cart_button:hover, .woocommerce .button.alt:hover { background: var(--wp--preset--color--gold-hover) !important; }
.quantity .qty { min-height: 46px; border: 1px solid var(--av-line); border-radius: 10px; }
.woocommerce-breadcrumb, .wc-block-breadcrumbs { font-size: .875rem; color: var(--wp--preset--color--muted); }
.woocommerce-breadcrumb a, .wc-block-breadcrumbs a { color: var(--av-blue); }
.avesta-quote-link { margin-top: .75rem; font-size: .9375rem; color: var(--wp--preset--color--muted); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select { min-height: 44px; border: 1px solid var(--av-line); border-radius: 10px; padding: .5rem .75rem; font: inherit; }
.woocommerce table.shop_table { border-radius: 10px; border-color: var(--av-line); }
.avesta-pay-message { border-radius: 10px; }
.avesta-pay-buttons .avesta-pay-button { font-size: 1.0625rem; padding: .85rem 2rem; }

/* =================== Laptop 1366–1439 =================== */
@media (max-width: 1439px) {
	.avesta-header__nav { --wp--style--block-gap: 1.4rem; }
}

/* =================== Tablet L 1024–1365 =================== */
@media (max-width: 1365px) {
	.avesta-header__row { gap: 1rem !important; }
	.avesta-header__nav .wp-block-navigation__container { gap: 1.1rem !important; }
	.avesta-topbar__tagline { font-size: .8125rem; }
	.avesta-carousel .wc-block-product-template { grid-auto-columns: calc((100% - 2 * var(--av-gap)) / 3); }
	.avesta-carousel__nav--prev { left: -10px; } .avesta-carousel__nav--next { right: -10px; }
	
}

/* =================== Tablet P 768–1023 =================== */
@media (max-width: 1023px) {
	.admin-bar .avesta-header { top: 46px; }
	.avesta-topbar { display: none; }
	.avesta-header__row { display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: center; }
	.avesta-header__nav { grid-column: 1; grid-row: 1; justify-self: start; flex: none; }
	.avesta-brand { grid-column: 2; grid-row: 1; justify-self: center; }
	.avesta-actions { grid-column: 3; grid-row: 1; justify-self: end; }
	.avesta-account, .avesta-cta { display: none !important; }
	.avesta-wordmark { font-size: 1.375rem; }
	.avesta-brand .wp-block-site-logo img { width: 40px; }

	.avesta-hero__cols { flex-wrap: wrap !important; }
	.avesta-hero__cols > .wp-block-column { flex-basis: 100% !important; }
	.avesta-hero__copy { max-width: 640px; }
	.avesta-hero__visual { max-width: 560px; margin-inline: auto; width: 100%; }
	.avesta-hero__features { max-width: none; }

	.avesta-intro__cols { flex-wrap: wrap !important; }
	.avesta-intro__cols > .wp-block-column { flex-basis: 100% !important; }

	.avesta-carousel .wc-block-product-template { grid-auto-columns: calc((100% - var(--av-gap)) / 2); }
	.avesta-brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.avesta-service-grid, .avesta-why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =================== Mobile L 425–767 =================== */
@media (max-width: 767px) {
	:root { --av-gap: 12px; }
	.avesta-header { padding-block: .45rem; }
	.avesta-hero { padding-block: 2rem 1.5rem; }
	.avesta-hero__title { font-size: clamp(1.7rem, 1.1rem + 3vw, 2.2rem) !important; }
	.avesta-hero__buttons .wp-block-button__link { padding: .7rem 1.1rem; font-size: .9375rem; }
	
	.avesta-hero__features { display: none; }
	.avesta-solutions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.avesta-solution a { min-height: 112px; font-size: .9375rem; }
	.avesta-carousel .wc-block-product-template { grid-auto-columns: 62%; }
	.avesta-carousel__nav { display: none !important; }
	.avesta-card-actions { flex-wrap: wrap !important; }
	.avesta-view { flex: 1 1 100%; }
	.avesta-brand-grid, .avesta-service-grid, .avesta-why-grid { grid-template-columns: 1fr; }
	.avesta-line-fab span { display: none; }
	.avesta-line-fab { width: 56px; height: 56px; min-height: 0; padding: 0; justify-content: center; gap: 0; border-radius: 50%; }
	.woocommerce .col2-set .col-1, .woocommerce .col2-set .col-2 { float: none; width: 100%; }
	.woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content { float: none !important; width: 100% !important; }
	.woocommerce-MyAccount-navigation ul { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; }
	.woocommerce-MyAccount-navigation li a { display: inline-block; padding: .45rem .8rem; border: 1px solid var(--av-line); border-radius: 999px; text-decoration: none; }
	.wc-block-product-template.is-flex-container.columns-4 > li, .wc-block-product-template.is-flex-container.columns-3 > li { width: calc(50% - .4rem) !important; }
}

/* =================== Mobile S ≤424 =================== */
@media (max-width: 424px) {
	.avesta-wordmark { font-size: 1.125rem; }
	.avesta-brand .wp-block-site-logo img { width: 34px; }
	.avesta-actions .wp-block-search__button, .avesta-actions .wc-block-mini-cart__button { min-width: 40px; }
	.avesta-hero__buttons .wp-block-button__link { padding: .65rem .9rem; font-size: .9375rem; }
	
	.avesta-carousel .wc-block-product-template { grid-auto-columns: 78%; }
	.wc-block-product .wp-block-post-title { font-size: .9375rem !important; }
}

@media (max-width: 359px) {
	.avesta-hero__buttons { flex-direction: column; align-items: stretch; }
	.avesta-hero__buttons .wp-block-button, .avesta-hero__buttons .wp-block-button__link { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* การ์ดยี่ห้อ: แสดง 5 รายการแรก ที่เหลือดูในหน้าหมวด */
.avesta-product-list li:nth-child(n+6):not(.avesta-quote-item):not(.avesta-all-item) { display: none; }
.avesta-all-item a { color: var(--av-blue) !important; font-weight: 600; }
.avesta-brand-grid { align-items: start; }
.avesta-review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--av-gap); margin-top: 1.5rem; }
.avesta-review-grid > * { margin: 0 !important; }
@media (max-width: 1023px) { .avesta-review-grid { grid-template-columns: 1fr; } }

/* ตัวเลือกสินค้าจากปลั๊กอิน Variation Swatches: ซ่อนในการ์ดสินค้า ให้เลือกในหน้าสินค้า (ชื่อตัวเลือกยาวเกินการ์ด) */
.wc-block-product .cfvsw_variations_form, .wc-block-product .cfvsw-swatches-container { display: none !important; }

/* ---------- ปุ่ม: สถานะโฟกัส ลิ้นชักตะกร้า (ผลตรวจ impeccable 11 พ.ย. 2026) ---------- */
/* กรอบโฟกัสขึ้นเฉพาะตอนใช้คีย์บอร์ด: น้ำเงินบนพื้นสว่าง (6:1) ทองบนพื้นเข้ม (9:1) */
:where(a, button, input, select, textarea, summary, [tabindex]):focus { outline: none; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--av-blue) !important; outline-offset: 3px !important; box-shadow: none; }
:where(.avesta-topbar, .avesta-hero, .avesta-archive-hero, .avesta-why-band, .avesta-why-strip, .avesta-footer, .has-deep-background-color, .has-ink-background-color, .has-navy-background-color) :where(a, button, input, select, summary):focus-visible { outline-color: var(--av-gold) !important; }
.avesta-line-fab:focus-visible { outline-color: var(--av-navy) !important; }

/* ลิ้นชักตะกร้า: "ชำระเงิน" เป็นปุ่มหลักสีทอง "ดูตะกร้า" เป็นปุ่มรอง */
.wc-block-mini-cart__footer-cart.wc-block-components-button:not(.is-link) { background: var(--wp--preset--color--base) !important; color: var(--av-navy) !important; border: 1.5px solid var(--av-navy) !important; }
.wc-block-mini-cart__footer-cart.wc-block-components-button:not(.is-link):hover { background: var(--wp--preset--color--blue-soft) !important; }

/* การ์ดสินค้าที่เหลือปุ่มเดียว (สินค้าหลายรุ่น) ให้ปุ่มเต็มความกว้าง */
.avesta-card-actions:has(> :only-child) { display: flex !important; }
.avesta-card-actions:has(> :only-child) > * { flex: 1 1 100% !important; }

/* ราคาไม่รวม VAT (inc/product.php) */
.avesta-vat-note { font-size: .72em; font-weight: 500; color: var(--wp--preset--color--muted); white-space: nowrap; }

/* ---------- หน้าชำระเงิน (parts/checkout-header.html, inc/checkout.php) ---------- */
.avesta-checkout-header__help { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; color: var(--wp--preset--color--muted); }
.avesta-checkout-header__help a { color: var(--av-navy); text-decoration: none; font-weight: 600; }
.avesta-checkout-header__help a:hover { color: var(--av-blue); }
.avesta-checkout-header .avesta-i { display: inline-flex; align-items: center; gap: .4rem; }
.avesta-checkout-header .avesta-i::before { content: ""; width: 16px; height: 16px; background: var(--av-blue); -webkit-mask: var(--avesta-i) center/contain no-repeat; mask: var(--avesta-i) center/contain no-repeat; }
.avesta-checkout-header .avesta-i--line::before { background: var(--wp--preset--color--line-green); }
.avesta-checkout-assurance { list-style: none; margin: 1rem 0 0; padding: 0; border: 1px solid var(--av-line); border-radius: 10px; background: var(--wp--preset--color--surface); }
.avesta-checkout-assurance li { display: grid; grid-template-columns: auto 1fr; column-gap: .7rem; padding: .75rem .9rem; border-top: 1px solid var(--av-line); }
.avesta-checkout-assurance li:first-child { border-top: 0; }
.avesta-checkout-assurance li::before { grid-row: span 2; width: 22px; height: 22px; margin-top: .15rem; background: var(--av-blue); }
.avesta-checkout-assurance strong { color: var(--av-navy); font-size: .9375rem; }
.avesta-checkout-assurance span { color: var(--wp--preset--color--muted); font-size: .8125rem; line-height: 1.6; }
.avesta-checkout-assurance a { color: var(--av-blue); }
/* สรุปคำสั่งซื้อ: ซ่อนคำอธิบายสั้นที่ WooCommerce ตัดเหลือไม่กี่คำ (เช่น "NAKIVO Backup &am…") ชื่อสินค้าบอกครบแล้ว */
.wc-block-components-order-summary-item .wc-block-components-product-metadata__description { display: none; }

/* การ์ดยี่ห้อ: โลโก้จริง (patterns/home-products.php) สูงต่างกันตามรูปทรงโลโก้ แต่หัวการ์ดสูงเท่ากัน */
.avesta-brand-card__name { min-height: 56px; margin-bottom: .75rem !important; }
.avesta-brand-card__name a { display: inline-flex; align-items: center; gap: .6rem; min-height: 56px; }
.avesta-brand-card__name > .avesta-brand-logo, .avesta-brand-card__name > span { vertical-align: middle; }
.avesta-brand-logo { display: block; width: auto; max-width: 100%; flex: none; }
.avesta-brand-card__name span { font-size: 1.125rem; font-weight: 800; color: var(--av-navy); }
.avesta-brand-card__name:not(:has(a)) { display: flex; align-items: center; gap: .6rem; }

/* ---------- โลโก้ร้าน (patterns/brand.php): สัญลักษณ์ + AVESTA / ONLINE SHOP ตามแบบโลโก้บริษัท ----------
 * ใช้ .avesta-logo img.avesta-logo__mark เพราะ CSS ของ WooCommerce (.woocommerce img { height: auto }) แรงกว่าคลาสเดียว */
.avesta-logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; line-height: 1; }
.avesta-logo img.avesta-logo__mark { display: block; width: auto; height: 42px; flex: none; }
.avesta-logo__text { display: flex; flex-direction: column; gap: .3rem; }
.avesta-logo__name { font-weight: 700; font-size: 1.5rem; letter-spacing: .16em; color: var(--wp--preset--color--avesta-blue); margin-right: -.16em; }
.avesta-logo__sub { font-weight: 500; font-size: .66rem; letter-spacing: .3em; color: var(--wp--preset--color--muted); white-space: nowrap; }
.avesta-logo:hover .avesta-logo__name { color: var(--av-blue); }
.avesta-brand--footer .avesta-logo__name { color: var(--wp--preset--color--base); }
.avesta-brand--footer .avesta-logo__sub { color: var(--wp--preset--color--on-dark-muted); }
.avesta-brand--footer { margin-bottom: .9rem !important; }
.avesta-checkout-header .avesta-logo img.avesta-logo__mark { height: 36px; }
.avesta-checkout-header .avesta-logo__name { font-size: 1.375rem; }
@media (max-width: 1023px) { .avesta-logo img.avesta-logo__mark { height: 36px; } .avesta-logo__name { font-size: 1.375rem; } .avesta-logo__sub { font-size: .58rem; } }
@media (max-width: 424px) { .avesta-logo { gap: .45rem; } .avesta-logo img.avesta-logo__mark { height: 30px; } .avesta-logo__name { font-size: 1.125rem; letter-spacing: .12em; } .avesta-logo__sub { font-size: .5rem; letter-spacing: .22em; } }

/* การ์ดสินค้า: หลังหยิบใส่ตะกร้า WooCommerce ใส่ลิงก์ "ดูตะกร้าสินค้า" ไว้ในกล่องเดียวกับปุ่ม ทำให้ปุ่มข้าง ๆ ยืดสูง
 * ให้กล่องของปุ่มหายไปจากเลย์เอาต์ (display: contents) ปุ่มสองปุ่มอยู่แถวเดียวกัน ลิงก์ดูตะกร้าลงไปเต็มแถวด้านล่าง */
.avesta-card-actions .wc-block-components-product-button { display: contents !important; }
.avesta-card-actions .wc-block-components-product-button__button { flex: 1 1 128px; white-space: nowrap !important; }
.avesta-card-actions .wc-block-components-product-button > span:not([hidden]) { order: 3; flex: 1 1 100%; grid-column: 1 / -1; text-align: center; }
.avesta-card-actions .added_to_cart { display: inline-block; font-size: .875rem; font-weight: 600; color: var(--av-blue); text-decoration: underline; text-underline-offset: 3px; padding: .2rem 0; }
.avesta-card-actions .avesta-view { align-self: stretch; }

/* ---------- ลิ้นชักตะกร้า (mini-cart) ---------- */
.wc-block-mini-cart__drawer .wc-block-mini-cart__title { font-size: 1.25rem !important; font-weight: 800; color: var(--av-navy); margin: 0 !important; padding: 1.1rem 4rem 1rem 1.25rem !important; border-bottom: 1px solid var(--av-line); display: flex; align-items: baseline; gap: .5rem; }
.wc-block-mini-cart__drawer .wc-block-mini-cart__title .wc-block-mini-cart__title-items-counter-block,
.wc-block-mini-cart__drawer .wc-block-mini-cart__title > :last-child:not(:first-child) { font-size: .9375rem; font-weight: 500; color: var(--wp--preset--color--muted); }
.wc-block-mini-cart__drawer .wc-block-mini-cart__items { padding: 0 1.25rem !important; }
.wc-block-mini-cart__drawer .wc-block-cart-items__row { display: grid !important; grid-template-columns: 64px minmax(0, 1fr) auto; column-gap: .9rem; padding: 1rem 0 !important; border-bottom: 1px solid var(--av-line); }
.wc-block-mini-cart__drawer .wc-block-cart-items__row > td { padding: 0 !important; border: 0 !important; }
.wc-block-mini-cart__drawer .wc-block-cart-item__image img { width: 64px !important; height: 64px; object-fit: contain; border-radius: 10px; background: var(--wp--preset--color--surface); }
.wc-block-mini-cart__drawer .wc-block-components-product-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--wp--preset--color--ink) !important; text-decoration: none !important; font-weight: 600; font-size: .9375rem; line-height: 1.45; margin-bottom: .2rem; }
.wc-block-mini-cart__drawer .wc-block-components-product-name:hover { color: var(--av-blue) !important; }
.wc-block-mini-cart__drawer .wc-block-components-product-metadata { display: none; }
.wc-block-mini-cart__drawer .wc-block-cart-item__prices { font-size: .8125rem; color: var(--wp--preset--color--muted); font-weight: 500; margin-bottom: .5rem; }
.wc-block-mini-cart__drawer .wc-block-cart-item__prices .wc-block-components-product-price { font-weight: 500 !important; color: inherit !important; }
.wc-block-mini-cart__drawer .wc-block-cart-item__quantity { display: flex; align-items: center; gap: .5rem; }
.wc-block-mini-cart__drawer .wc-block-components-quantity-selector { border-radius: 10px; border-color: var(--av-line); margin: 0 !important; }
.wc-block-mini-cart__drawer .wc-block-cart-item__total { text-align: right; font-weight: 800; color: var(--av-navy); font-size: .9375rem; white-space: nowrap; }
.wc-block-mini-cart__drawer .wc-block-cart-item__total .wc-block-components-product-price { color: var(--av-navy) !important; }
.wc-block-mini-cart__drawer .wc-block-mini-cart__footer { padding: 1rem 1.25rem 1.25rem !important; border-top: 1px solid var(--av-line); box-shadow: 0 -8px 20px rgba(16, 40, 94, .06); }
.wc-block-mini-cart__drawer .wc-block-mini-cart__footer-subtotal { font-weight: 800; color: var(--av-navy); }
.wc-block-mini-cart__drawer .wc-block-mini-cart__footer-actions { gap: .6rem; }
.wc-block-mini-cart__drawer .wc-block-mini-cart__footer-actions .wc-block-components-button { min-height: 48px; }

/* ปุ่มในการ์ดทุกที่ (หน้าแรก หน้าหมวด สินค้าที่เกี่ยวข้อง) ใช้กริดเดียวกัน: ปุ่มสองปุ่มแถวบน ลิงก์ดูตะกร้าแถวล่าง ไม่ยืดสูง */
.avesta-card-actions { display: grid !important; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: .4rem !important; align-content: start; align-items: stretch; flex-wrap: nowrap !important; }
.avesta-card-actions:has(> :only-child) { grid-template-columns: 1fr; }
.avesta-card-actions .wc-block-components-product-button__button, .avesta-card-actions .avesta-view { min-height: 42px; height: auto; }
.avesta-card-actions .avesta-view { align-self: stretch; flex: none; }
@media (max-width: 767px) { .avesta-card-actions .avesta-view { flex-basis: auto; } }
.avesta-card-actions { align-content: start !important; flex: 0 0 auto !important; height: auto !important; }
.avesta-card-actions .avesta-view { width: 100% !important; box-sizing: border-box; justify-self: stretch; }

/* ---------- หน้าตะกร้า (shortcode) ---------- */
/* จำนวนเปลี่ยนแล้วอัปเดตเอง (assets/js/cart.js) จึงไม่ต้องโชว์ปุ่มปรับปรุงตะกร้า */
.avesta-cart-auto .woocommerce-cart-form [name="update_cart"] { display: none !important; }
.woocommerce-cart-form.processing, .cart_totals.processing { opacity: .6; }
/* ปุ่มดำเนินการสั่งซื้อ: ค่าเดิมของ WooCommerce สูง 86px ตัวอักษร 1.25em ใหญ่เกินกล่องยอดรวม */
.woocommerce .wc-proceed-to-checkout { padding-block: 1rem 0 !important; }
.woocommerce .wc-proceed-to-checkout a.checkout-button { box-sizing: border-box; display: flex; align-items: center; justify-content: center; min-height: 50px; padding: .7rem 1.25rem !important; margin-bottom: 0 !important; font-size: 1rem !important; font-weight: 700; border-radius: 10px; }

/* ---------- ค้นหาสินค้าแบบหน้าต่าง (inc/search.php, assets/js/search.js) ---------- */
.avesta-search-open { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--av-navy); border-radius: 10px; text-decoration: none; }
.avesta-search-open::before { --avesta-i: var(--avesta-i-search); width: 22px; height: 22px; }
.avesta-search-open:hover { background: var(--wp--preset--color--blue-soft); }
.avesta-search-modal { width: min(640px, calc(100vw - 32px)); margin: 12vh auto auto; padding: 1.25rem 1.25rem 1.4rem; border: 0; border-radius: var(--av-radius); background: var(--wp--preset--color--base); color: var(--wp--preset--color--ink); box-shadow: 0 24px 60px rgba(9, 22, 56, .28); box-sizing: border-box; }
.avesta-search-modal::backdrop { background: rgba(9, 22, 56, .55); }
.avesta-search-modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.avesta-search-modal__head h2 { margin: 0; font-size: 1.125rem; color: var(--av-navy); }
.avesta-search-close, .avesta-search-clear { display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0; border: 0; background: transparent; color: var(--av-navy); border-radius: 10px; cursor: pointer; }
.avesta-search-close { width: 40px; height: 40px; }
.avesta-search-close::before { --avesta-i: var(--avesta-i-x); width: 20px; height: 20px; }
.avesta-search-close:hover, .avesta-search-clear:hover { background: var(--wp--preset--color--blue-soft); }
.avesta-search-modal__form { display: flex; gap: .6rem; }
.avesta-search-modal__field { flex: 1; min-width: 0; display: flex; align-items: center; gap: .5rem; min-height: 50px; padding: 0 .4rem 0 .9rem; border: 1.5px solid var(--av-line); border-radius: 10px; background: var(--wp--preset--color--base); }
.avesta-search-modal__field:focus-within { border-color: var(--av-blue); box-shadow: 0 0 0 3px rgba(31, 92, 230, .18); }
.avesta-search-modal__field > .avesta-ico--search::before { --avesta-i: var(--avesta-i-search); width: 18px; height: 18px; color: var(--wp--preset--color--muted); }
.avesta-search-modal__field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; padding: .6rem 0; color: inherit; }
.avesta-search-modal__field input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.avesta-search-clear { width: 36px; height: 36px; }
.avesta-search-clear[hidden] { display: none; }
.avesta-search-clear::before { --avesta-i: var(--avesta-i-x); width: 16px; height: 16px; }
.avesta-search-modal__form button[type="submit"] { flex: none; min-height: 50px; padding: 0 1.4rem; border: 0; border-radius: 10px; background: var(--av-blue); color: var(--wp--preset--color--base); font: inherit; font-weight: 700; cursor: pointer; }
.avesta-search-modal__form button[type="submit"]:hover { background: var(--wp--preset--color--blue-deep); }
.avesta-search-modal__label { margin: 1.2rem 0 .5rem; font-size: .875rem; font-weight: 700; color: var(--wp--preset--color--muted); }
.avesta-search-modal__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.avesta-search-modal__links a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 .85rem; border: 1px solid var(--av-line); border-radius: 999px; color: var(--av-navy); font-size: .9375rem; font-weight: 600; text-decoration: none; }
.avesta-search-modal__links a:hover { border-color: var(--av-blue); color: var(--av-blue); background: var(--wp--preset--color--blue-soft); }
@media (max-width: 424px) {
	.avesta-search-modal { margin-top: 1rem; }
	.avesta-search-modal__form { flex-direction: column; }
}
/* กรอบโฟกัสอยู่ที่กล่องทั้งใบ (:focus-within) ไม่ใช่ที่ช่องพิมพ์ แว่นขยายจะได้อยู่ในกรอบเดียวกัน */
.avesta-search-modal__field input:focus, .avesta-search-modal__field input:focus-visible { outline: none !important; box-shadow: none !important; }
.avesta-search-modal__field > .avesta-ico--search { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; }
.avesta-search-modal__field > .avesta-ico--search::before { display: block; }

/* ---------- กล่องสถานะคำสั่งซื้อ (ปลั๊กอิน avesta-qr-payment includes/order-status.php) ---------- */
.avesta-order-status { --st: var(--av-navy); --st-bg: var(--wp--preset--color--surface); --st-line: var(--av-line); margin: 0 0 2rem; padding: 1.5rem 1.6rem; border: 1.5px solid var(--st-line); border-radius: var(--av-radius); background: var(--st-bg); }
.avesta-order-status.is-awaiting { --st: var(--wp--preset--color--warning); --st-bg: var(--wp--preset--color--warning-soft); --st-line: var(--wp--preset--color--warning-line); }
.avesta-order-status.is-paid, .avesta-order-status.is-done { --st: var(--wp--preset--color--success); --st-bg: var(--wp--preset--color--success-soft); --st-line: var(--wp--preset--color--success-line); }
.avesta-order-status.is-cancelled { --st: var(--wp--preset--color--muted); --st-bg: var(--wp--preset--color--surface); --st-line: var(--av-line); }
.avesta-order-status > * { margin-block: 0; }
.avesta-order-status > * + * { margin-top: .9rem; }
.avesta-order-status__badge { font-size: .875rem; font-weight: 700; color: var(--st); }
.avesta-order-status__title { margin-top: .2rem !important; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); line-height: 1.25; color: var(--st); display: flex; align-items: center; gap: .6rem; }
.avesta-order-status__title::before { content: ""; flex: none; width: 1.1em; height: 1.1em; background: currentColor; -webkit-mask: var(--avesta-i-clock) center/contain no-repeat; mask: var(--avesta-i-clock) center/contain no-repeat; }
.avesta-order-status.is-paid .avesta-order-status__title::before, .avesta-order-status.is-done .avesta-order-status__title::before { -webkit-mask-image: var(--avesta-i-check); mask-image: var(--avesta-i-check); }
.avesta-order-status.is-cancelled .avesta-order-status__title::before { -webkit-mask-image: var(--avesta-i-x); mask-image: var(--avesta-i-x); }
.avesta-order-status__lead { font-size: 1.0625rem; color: var(--wp--preset--color--ink); }
.avesta-order-status__lead strong { color: var(--av-navy); font-size: 1.15em; }
.avesta-order-status__muted { font-size: .9375rem; color: var(--wp--preset--color--muted); }
.avesta-order-status a:not(.button) { color: var(--av-blue); }
.avesta-order-status__notes { margin: .9rem 0 0; padding-left: 1.2rem; font-size: .9375rem; color: var(--wp--preset--color--muted); }
.avesta-order-status__notes li + li { margin-top: .25rem; }
.avesta-order-status__flash { padding: .6rem .9rem; border-radius: 10px; font-size: .9375rem; background: var(--wp--preset--color--base); border: 1px solid var(--st-line); }
.avesta-order-status__flash.is-error { border-color: var(--wp--preset--color--danger-line); color: var(--wp--preset--color--danger); background: var(--wp--preset--color--danger-soft); }
.avesta-order-status .avesta-pay-buttons { margin-top: 1rem; }
.avesta-order-status .avesta-pay-button { min-height: 52px; padding: .7rem 2rem !important; font-size: 1.0625rem !important; font-weight: 700; border-radius: 10px; }

/* แถบ 4 ขั้นตอน */
.avesta-order-steps { list-style: none; margin: 1.1rem 0 0 !important; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; counter-reset: none; }
.avesta-order-steps li { display: flex; align-items: center; gap: .5rem; padding: .55rem .65rem; border-radius: 10px; background: var(--wp--preset--color--base); border: 1px solid var(--av-line); font-size: .875rem; font-weight: 600; color: var(--wp--preset--color--muted); line-height: 1.3; }
.avesta-order-steps__num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid currentColor; font-size: .8125rem; }
.avesta-order-steps li.is-done { color: var(--wp--preset--color--success); border-color: var(--wp--preset--color--success-line); }
.avesta-order-steps li.is-done .avesta-order-steps__num { background: var(--wp--preset--color--success); border-color: var(--wp--preset--color--success); }
.avesta-order-steps li.is-done .avesta-order-steps__num::before { content: ""; width: 14px; height: 14px; background: var(--wp--preset--color--base); -webkit-mask: var(--avesta-i-check) center/contain no-repeat; mask: var(--avesta-i-check) center/contain no-repeat; }
.avesta-order-steps li.is-current { color: var(--av-navy); border-color: var(--st); box-shadow: inset 0 0 0 1px var(--st); }
.avesta-order-steps li.is-current .avesta-order-steps__num { background: var(--st); border-color: var(--st); color: var(--wp--preset--color--base); }

/* อีเมล 2 ฉบับหลังชำระเงิน */
.avesta-order-status__mails { margin: .5rem 0 0 !important; padding: 0; list-style: none; display: grid; gap: .45rem; }
.avesta-order-status__mails li { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; padding: .65rem .9rem; border-radius: 10px; background: var(--wp--preset--color--base); border: 1px solid var(--av-line); }
.avesta-order-status__mails li::before { content: ""; flex: none; width: 18px; height: 18px; background: var(--av-blue); -webkit-mask: var(--avesta-i-mail) center/contain no-repeat; mask: var(--avesta-i-mail) center/contain no-repeat; }
.avesta-order-status__sent { margin-left: auto; padding: .1rem .55rem; border-radius: 999px; background: var(--wp--preset--color--success); color: var(--wp--preset--color--base); font-size: .75rem; font-weight: 700; }

@media (max-width: 767px) {
	.avesta-order-status { padding: 1.15rem 1rem; }
	.avesta-order-steps { grid-template-columns: 1fr 1fr; }
	.avesta-order-status .avesta-pay-buttons form, .avesta-order-status .avesta-pay-button { width: 100%; }
}

/* ---------- กันหน้าเลื่อนขวาบนมือถือ ----------
 * ข้อความสำหรับโปรแกรมอ่านหน้าจอ (position:absolute) ในการ์ดสินค้าอ้างอิงตำแหน่งกับ .avesta-carousel
 * ซึ่งอยู่นอกแถบเลื่อน จึงหลุดออกนอกแถบและขยายหน้าเว็บไปกว้าง 2,000px (เห็นเป็นพื้นขาวด้านขวา)
 * ให้แถบเลื่อนเป็นตัวอ้างอิงแทน และตัดส่วนเกินแนวนอนของทั้งหน้าไว้อีกชั้น (clip ไม่ทำให้ sticky เสีย) */
.avesta-carousel .wc-block-product-template { position: relative; }
html, body { overflow-x: clip; }

/* ---------- หน้าเกี่ยวกับเรา: รูปอาคาร / หน้าติดต่อเรา: แผนที่ ---------- */
.avesta-about-photo { margin: 0 0 var(--wp--preset--spacing--40, 2rem); }
.avesta-about-photo img { display: block; width: 100%; height: auto; aspect-ratio: 1085 / 678; object-fit: cover; }
.avesta-map { position: relative; aspect-ratio: 16 / 9; max-height: 460px; width: 100%; border-radius: 10px; overflow: hidden; border: 1px solid var(--wp--preset--color--line, var(--wp--preset--color--line)); background: var(--wp--preset--color--surface); }
.avesta-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 767px) { .avesta-map { aspect-ratio: 4 / 3; } }

/* ราคาของสินค้าขอใบเสนอราคา (การ์ดและหน้าสินค้า) */
.avesta-quote-price { font-weight: 700; color: var(--av-navy); }

/* ปุ่ม LINE ลอย: ยกขึ้นเมื่อชี้ และวงสัญญาณจางๆ รอบปุ่มเป็นระยะ ให้เห็นว่ากดคุยได้ */
.avesta-line-fab { transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.avesta-line-fab:hover, .avesta-line-fab:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(4, 136, 59, .35); }
.avesta-line-fab::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(6, 199, 85, .55); animation: avesta-line-pulse 2.8s ease-out infinite; pointer-events: none; }
@keyframes avesta-line-pulse { 0% { box-shadow: 0 0 0 0 rgba(6, 199, 85, .55); } 70%, 100% { box-shadow: 0 0 0 14px rgba(6, 199, 85, 0); } }
@media (prefers-reduced-motion: reduce) { .avesta-line-fab::after { animation: none; } .avesta-line-fab:hover { transform: none; } }
