/*
Theme Name: Yuttapaisan Curtain
Theme URI: https://www.facebook.com/yuttapaisancurtain
Author: ยุทธไพศาล ผ้าม่าน เหล็กดัดและมุ้งลวด
Description: ธีมเว็บไซต์สำหรับร้านยุทธไพศาล ผ้าม่าน เหล็กดัดและมุ้งลวด โทนขาว น้ำเงิน ทอง แก้ไขรูปและข้อความได้ทั้งหมดใน Site Editor
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.3.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yuttapaisan
*/

/* ---------- Header ---------- */
.yp-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .yp-header { top: 32px; }
.yp-brand-sub { letter-spacing: .22em; }

/* ---------- Hero ---------- */
.yp-hero .wp-block-cover__background {
	background: linear-gradient(90deg, rgba(12, 24, 48, .72) 0%, rgba(12, 24, 48, .45) 38%, rgba(12, 24, 48, 0) 70%) !important;
	opacity: 1 !important;
}
.yp-hero .wp-block-button__link { min-height: 48px; display: inline-flex; align-items: center; gap: 10px; }

/* ---------- Stats ---------- */
.yp-stats > .wp-block-column + .wp-block-column { border-left: 1px solid var(--wp--preset--color--line); }
@media (max-width: 781px) {
	.yp-stats > .wp-block-column + .wp-block-column { border-left: 0; border-top: 1px solid var(--wp--preset--color--line); padding-top: 20px; }
}

/* ---------- Collection grid ---------- */
.yp-grid { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1000px) { .yp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px)  { .yp-grid { gap: 12px; } }
.yp-grid .wp-block-image { margin: 0 0 10px; }
.yp-grid .wp-block-image img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; height: auto; }
.yp-num { color: var(--wp--preset--color--gold-dark); margin-right: .35em; }

/* ---------- Process ---------- */
.yp-steps > * { border-bottom: 1px solid var(--wp--preset--color--line); }
.yp-cover-img img, .yp-cover-img { height: 100%; }
.yp-cover-img img { object-fit: cover; width: 100%; min-height: 420px; }

/* ---------- Reviews ---------- */
.yp-reviews-split > .wp-block-column:last-child { border-left: 1px solid var(--wp--preset--color--line); padding-left: 48px; }
@media (max-width: 781px) {
	.yp-reviews-split > .wp-block-column:last-child { border-left: 0; padding-left: 0; }
}
.yp-arrow-link a { text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* ---------- Booking form ---------- */
.yp-form { display: flex; flex-direction: column; gap: 22px; }
.yp-form label { display: flex; flex-direction: column; gap: 4px; font-size: 15px; color: var(--wp--preset--color--navy); }
.yp-form input, .yp-form select, .yp-form textarea {
	font: inherit; font-size: 17px; color: var(--wp--preset--color--navy);
	border: 0; border-bottom: 1px solid #B8BFCC; background: transparent;
	min-height: 44px; padding: 4px 0; border-radius: 0;
}
.yp-form input:focus, .yp-form select:focus, .yp-form textarea:focus { outline: none; border-bottom-color: var(--wp--preset--color--navy); }
.yp-form button {
	font: inherit; font-size: 18px; min-height: 54px; border: 0; cursor: pointer;
	background: var(--wp--preset--color--navy); color: #fff; box-shadow: inset 0 -3px 0 var(--wp--preset--color--gold);
}
.yp-form button:hover { background: #0E1B36; }
.yp-form .yp-hp { position: absolute; left: -9999px; }
.yp-form-msg { padding: 12px 16px; font-size: 15px; }
.yp-form-msg.ok { background: #EAF4EC; color: #1F5130; }
.yp-form-msg.err { background: #FBEAEA; color: #7A1F1F; }

/* ---------- Footer ---------- */
.yp-footer a { color: #fff; text-decoration: none; }
.yp-footer a:hover { color: var(--wp--preset--color--gold); }
.yp-footer .yp-sep { width: 1px; align-self: stretch; background: rgba(255,255,255,.25); }
@media (max-width: 781px) { .yp-footer .yp-sep { display: none; } }

/* ---------- Floating call button (mobile) ---------- */
.yp-fab { display: none; }
@media (max-width: 781px) {
	.yp-fab {
		display: inline-flex; align-items: center; gap: 8px; position: fixed; right: 16px; bottom: 16px; z-index: 60;
		min-height: 52px; padding: 0 20px; border-radius: 999px; text-decoration: none;
		background: var(--wp--preset--color--navy); color: #fff; border: 1px solid var(--wp--preset--color--gold);
		box-shadow: 0 6px 20px rgba(20, 38, 74, .3); font-size: 16px;
	}
}

/* ---------- Service band (v1.1) ---------- */
.yp-steps-row { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.yp-steps-row > p { margin: 0 !important; padding: 4px 24px; color: #fff; }
.yp-steps-row > p:first-child { padding-left: 0; }
.yp-steps-row > p + p { border-left: 1px solid rgba(255,255,255,.22); }
.yp-step-num { color: var(--wp--preset--color--gold); font-weight: 500; font-size: 1.1em; }
@media (max-width: 781px) {
	.yp-steps-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
	.yp-steps-row > p { padding-left: 0; }
	.yp-steps-row > p + p { border-left: 0; }
}

/* ---------- Contact list with icons ---------- */
.yp-ico { position: relative; padding-left: 34px; margin: 0 !important; }
.yp-ico::before {
	content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px;
	background: var(--wp--preset--color--navy);
	-webkit-mask: var(--yp-icon) center / contain no-repeat; mask: var(--yp-icon) center / contain no-repeat;
}
.yp-ico-pin   { --yp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E"); }
.yp-ico-phone { --yp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E"); }
.yp-ico-mail  { --yp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='14' rx='1'/%3E%3Cpath d='m3 6 9 7 9-7'/%3E%3C/svg%3E"); }
.yp-ico-ig    { --yp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.5' cy='6.5' r='1' fill='black'/%3E%3C/svg%3E"); }
.yp-ico-map   { --yp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M9 4 3 6v14l6-2 6 2 6-2V4l-6 2-6-2zM9 4v14M15 6v14'/%3E%3C/svg%3E"); }

/* boxed form fields like the mockup */
.yp-contact .yp-form label { font-size: 14px; color: var(--wp--preset--color--muted); }
.yp-contact .yp-form input, .yp-contact .yp-form select, .yp-contact .yp-form textarea {
	border: 1px solid #C9CDD6; background: #fff; padding: 8px 14px;
}
.yp-contact .yp-form { gap: 14px; }
@media (max-width: 781px) { .yp-contact > .wp-block-column { padding-left: 24px !important; padding-right: 24px !important; } }

/* grid items: no stacked block-gap margins */
.yp-grid > *, .yp-steps-row > * { margin-block-start: 0 !important; }
.yp-form > p:empty { display: none; }

/* ---------- Booking: photo + underline form (v1.2) ---------- */
.yp-book { align-items: stretch !important; }
.yp-book-img { padding: 0 !important; }
.yp-book-img .wp-block-image, .yp-book-img .wp-block-image img { margin: 0; height: 100%; }
.yp-book-img .wp-block-image img { width: 100%; object-fit: cover; min-height: 460px; display: block; }
.yp-book .yp-form { gap: 18px; }
.yp-book .yp-form label { font-size: 15px; }
@media (max-width: 781px) {
	.yp-book-img .wp-block-image img { min-height: 260px; }
	.yp-book > .wp-block-column:last-child { padding-left: 24px !important; padding-right: 24px !important; }
}
/* reviews: lighter quotes */
.yp-reviews-split .wp-block-quote p { line-height: 1.6; }
.yp-reviews-split .wp-block-quote cite { font-size: 14px; color: var(--wp--preset--color--muted); font-style: normal; }
#contact.wp-block-group { padding-left: 0 !important; padding-right: 0 !important; }
.yp-reviews-split .wp-block-quote p { font-size: 20px !important; }

/* ---------- v1.3 polish ---------- */
/* hero: align text with the page container, taller on big screens */
.yp-hero { min-height: max(640px, 78vh) !important; }
.yp-hero .wp-block-cover__inner-container {
	width: 100% !important; max-width: 1240px !important; margin-left: auto !important; margin-right: auto !important;
}
.yp-hero .wp-block-cover__inner-container > .wp-block-group { max-width: 600px; margin-left: 0 !important; margin-right: auto !important; }
.yp-hero .wp-block-cover__inner-container > .wp-block-group > * { margin-left: 0 !important; }
.yp-hero h1 { letter-spacing: -.005em; text-shadow: 0 2px 24px rgba(0,0,0,.25); }
.yp-hero .wp-block-buttons .wp-block-button__link { padding: 14px 30px; font-size: 17px; }
.yp-hero .is-style-outline .wp-block-button__link { background: transparent; }

/* stats: clearer labels */
.yp-stats p.has-small-font-size { font-size: 16px !important; }
.yp-stats .has-x-large-font-size { color: var(--wp--preset--color--navy); }

/* section headings: small gold rule above */
#collection > h2::before, #reviews > h2::before {
	content: ""; display: block; width: 48px; height: 2px; background: var(--wp--preset--color--gold); margin-bottom: 16px;
}

/* collection: gentle hover, equal captions */
.yp-grid .wp-block-image { overflow: hidden; }
.yp-grid .wp-block-image img { transition: transform .5s ease; }
.yp-grid > .wp-block-group:hover img { transform: scale(1.04); }
.yp-grid p { font-size: 17px; margin-top: 4px; }

/* service band: keep step names on one line where possible */
.yp-steps-row > p { font-size: clamp(18px, 1.7vw, 24px) !important; }

/* booking heading spacing */
.yp-book h2 { margin-top: 0; }
.yp-hero .wp-block-cover__background {
	background: linear-gradient(90deg, rgba(12,24,48,.80) 0%, rgba(12,24,48,.62) 35%, rgba(12,24,48,.25) 58%, rgba(12,24,48,0) 75%) !important;
}
