/*
Theme Name: VAPEPODTH
Template: twentytwentyfive
Description: ธีมลูกของ Twenty Twenty-Five ปรับสีและฟอนต์ตามแบรนด์ VAPEPODTH
Version: 1.0
*/

/* มือถือ: หัวเว็บแถวเดียว (โลโก้ + เมนู/บัญชี/ตะกร้า) */
@media (max-width: 781px) {
	header.wp-block-template-part > .has-base-background-color { padding-top: 10px !important; padding-bottom: 10px !important; }
	header.wp-block-template-part .is-content-justification-space-between { flex-wrap: nowrap; }
	header.wp-block-template-part .wp-block-site-logo img { width: 150px !important; height: auto !important; }
}

/* แถบหัวข้อทุกหน้า — ชิดหัวเว็บ โทนเดียวกับแบนเนอร์หน้าแรก */
.vp-page-hero { background: radial-gradient(70% 140% at 50% 0%, rgba(216,143,33,.16), transparent 70%), var(--wp--preset--color--espresso); color: #fff; text-align: center; }
.vp-page-hero h1, .vp-page-hero .wp-block-post-title, .vp-page-hero .wp-block-query-title { color: #fff; margin: 0 auto; font-size: clamp(24px, 3.6vw, 34px); line-height: 1.35; }
.vp-page-hero .woocommerce-breadcrumb, .vp-page-hero .wc-block-breadcrumbs { color: rgba(255,255,255,.55); font-size: 13px; margin: 0 0 8px; text-align: center; }
.vp-page-hero .woocommerce-breadcrumb a { color: var(--wp--preset--color--gold); text-decoration: none; }
.vp-page-hero p, .vp-page-hero .wp-block-post-date { color: rgba(255,255,255,.72); margin: 8px auto 0; font-size: 14px; }
.wp-site-blocks > .wp-block-woocommerce-page-content-wrapper, .wp-site-blocks > .vp-page-hero, .wp-site-blocks > main.vp-main { margin-top: 0; }
main.vp-main > .wp-block-post-content > :first-child { margin-top: 0; }
@media (max-width: 781px) { .vp-page-hero { padding-top: 22px !important; padding-bottom: 24px !important; } }
/* อะไรก็ตามที่ต่อจากหัวเว็บ (แถบหัวข้อ / กล่องหน้าสินค้าของ Woo) ไม่ต้องเว้นระยะ */
.wp-site-blocks > header.wp-block-template-part + * { margin-top: 0; }

/* หน้าแรก: ลิงก์หมวดย่อยในกล่องหมวดหมู่ */
.vp-cat-subs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px !important; }
.vp-cat-subs a { display: inline-block; background: #F7F3EC; border: 1px solid #ECE6DC; border-radius: 44px; padding: 4px 12px; font-size: 13px; color: var(--wp--preset--color--gold-ink); text-decoration: none; }
.vp-cat-subs a:hover { border-color: var(--wp--preset--color--gold); }

/* เมนูย่อยหัวเว็บ: กว้างพอให้ชื่อหมวดอยู่บรรทัดเดียว */
@media (min-width: 782px) {
	header .wp-block-navigation .wp-block-navigation__submenu-container { min-width: 270px !important; border-radius: 12px; border-color: #ECE6DC !important; box-shadow: 0 10px 28px rgba(43,36,25,.12); padding: 6px 0; overflow: hidden; }
	header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content { white-space: nowrap; padding: 9px 16px; }
	header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: #F7F3EC; color: var(--wp--preset--color--gold-ink); }
}

/* จอกลาง (แท็บเล็ต/โน้ตบุ๊กเล็ก): ย่อโลโก้+ระยะเมนูให้หัวเว็บอยู่แถวเดียว */
@media (min-width: 782px) and (max-width: 1100px) {
	header.wp-block-template-part .wp-block-site-logo img { width: 150px !important; height: auto !important; }
	header.wp-block-template-part .is-content-justification-space-between { flex-wrap: nowrap; gap: 14px; }
	header .wp-block-navigation, header .wp-block-navigation .wp-block-navigation__container { gap: 14px !important; font-size: 14px; }
}
@media (min-width: 782px) and (max-width: 880px) {
	header .wp-block-navigation, header .wp-block-navigation .wp-block-navigation__container { gap: 10px !important; font-size: 13px; }
	header.wp-block-template-part .is-content-justification-space-between > .wp-block-group { gap: 10px; }
}

/* แท็บเล็ต (600–1023px): เมนู 8 รายการยาวเกิน → ใช้ปุ่ม ☰ เหมือนมือถือ */
@media (min-width: 600px) and (max-width: 1023px) {
	header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
	header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
}


/* หัวเว็บจอเล็ก (≤1023px): ☰ ซ้าย · โลโก้กลาง · ตะกร้ากรอบมนขวา */
.vp-top-short { display: none; }
@media (max-width: 1023px) {
	header.wp-block-template-part > .has-base-background-color { padding: 8px 14px !important; border-bottom: 1px solid #EFE8DD; }
	header.wp-block-template-part .is-content-justification-space-between { display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
	header.wp-block-template-part .is-content-justification-space-between > .wp-block-group { display: contents; }
	header.wp-block-template-part .wp-block-site-logo { grid-column: 2; grid-row: 1; justify-self: center; line-height: 0; }
	header.wp-block-template-part .wp-block-site-logo img { width: auto !important; height: 70px !important; max-width: 190px; object-fit: contain; }
	header.wp-block-template-part .wp-block-navigation { grid-column: 1; grid-row: 1; justify-self: start; }
	header.wp-block-template-part .wp-block-navigation__responsive-container-open { width: 40px; height: 40px; align-items: center; justify-content: center; color: #2B2419; }
	header.wp-block-template-part .wp-block-navigation__responsive-container-open svg { width: 28px; height: 28px; }
	header.wp-block-template-part .wp-block-woocommerce-mini-cart { grid-column: 3; grid-row: 1; justify-self: end; }
	header.wp-block-template-part .wc-block-mini-cart__button { width: 40px; height: 40px; padding: 0 !important; display: flex; align-items: center; justify-content: center; border: 1.5px solid #2B2419; border-radius: 10px; color: #2B2419; background: #fff; }
	header.wp-block-template-part .wc-block-mini-cart__button:hover { background: #F7F3EC; }
	header.wp-block-template-part .wc-block-mini-cart__icon { width: 22px; height: 22px; }
	header.wp-block-template-part .wc-block-mini-cart__badge { background: #D88F21 !important; color: #1C1C1C !important; font-weight: 800; }
	header.wp-block-template-part .wp-block-woocommerce-customer-account { grid-column: 3; grid-row: 1; justify-self: end; margin-right: 50px; }
}
@media (max-width: 781px) {
	header.wp-block-template-part .wp-block-woocommerce-customer-account { display: none !important; } /* มือถือใช้ปุ่ม "บัญชี" ในแถบล่าง */
	header.wp-block-template-part > .has-espresso-background-color { padding-top: 7px !important; padding-bottom: 7px !important; }
	header.wp-block-template-part > .has-espresso-background-color p { font-size: 12px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.vp-top-full { display: none; }
	.vp-top-short { display: inline; }
}
