/* ==========================================================================
   การ์ดสินค้า product-cards.css — ใช้ร่วมกันที่ food-print.php (งานพิมพ์ร้านอาหาร) และ books.php (งานพิมพ์หนังสือ) รูป + ตัวเลือกสเปก + ปุ่มขอราคางานพิมพ์
   โหลดต่อจาก site.css ใช้คลาสขึ้นต้นด้วย ot- ทั้งหมด ไม่กระทบหน้าอื่น
   ========================================================================== */
.ot-sec { scroll-margin-top: 96px; }
/* แถบลัดไปแต่ละหมวด */
.ot-jump { padding: 28px 0 0; }
.ot-jump .container { display: flex; flex-wrap: wrap; gap: 10px; }
.ot-jump a { display: inline-flex; padding: 9px 12px 9px 12px; align-items: center; gap: 9px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; line-height: 1.4; transition: border-color .2s ease, box-shadow .2s ease; }
.ot-jump a:hover { border-color: var(--green-600); box-shadow: var(--kk-shadow, 0 12px 32px rgba(0, 82, 65, .10)); }
.ot-jump .ico { width: 18px; height: 18px; color: var(--green-700); }
.ot-jump small { display: inline-grid; min-width: 22px; height: 22px; padding: 0 6px; place-items: center; color: var(--green-800); background: var(--green-50); border-radius: 999px; font-size: 12px; font-weight: 700; }
/* รายการสินค้า */
.ot-list { display: grid; gap: 22px; }
.ot-card { scroll-margin-top: 110px; display: grid; overflow: hidden; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); background: #fff; border: 1px solid var(--line); border-radius: 24px; transition: box-shadow .2s ease; }
.ot-card:hover { box-shadow: var(--kk-shadow, 0 12px 32px rgba(0, 82, 65, .10)); }
/* รูปสินค้า 1:1 */
.ot-media { position: relative; overflow: hidden; margin: 18px 0 18px 18px; align-self: start; aspect-ratio: 1 / 1; background: var(--green-50); border-radius: 18px; }
.ot-media > img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* หน้างานพิมพ์ร้านอาหาร: รูปแนวตั้ง 2:3 ยืดเต็มความสูงการ์ด (ความสูงตามเนื้อหาฝั่งขวา รูปจึงถูกตัดขอบซ้าย-ขวาเล็กน้อย) */
.ot-portrait .ot-media { align-self: stretch; aspect-ratio: auto; min-height: 420px; }
.ot-portrait .ot-media > img { position: absolute; inset: 0; }
.ot-media .kk-tag { position: absolute; top: 14px; left: 14px; z-index: 1; }
.ot-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: radial-gradient(circle at 50% 38%, #fff 0%, #eaf8f0 58%, #d7f0e3 100%); }
.ot-ph::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(0, 139, 87, .14) 1px, transparent 1px); background-size: 18px 18px; -webkit-mask-image: radial-gradient(circle at 50% 45%, transparent 30%, #000 80%); mask-image: radial-gradient(circle at 50% 45%, transparent 30%, #000 80%); }
.ot-ph-ico { position: relative; display: grid; width: 112px; height: 112px; place-items: center; color: var(--green-700); background: #fff; border-radius: 34px; box-shadow: 0 14px 34px rgba(0, 82, 65, .14); }
.ot-ph-ico .ico { width: 54px; height: 54px; stroke-width: 1.6; }
.ot-ph small { position: relative; color: var(--muted); font-size: 13px; font-weight: 600; }
.ot-ph-size { position: relative; margin-top: -8px; padding: 3px 10px; color: var(--green-800); background: rgba(255, 255, 255, .8); border: 1px dashed var(--green-300); border-radius: 999px; font-size: 12px; font-style: normal; font-weight: 600; }
/* งานพิมพ์ที่คำนวณราคาออนไลน์ได้ (ลิงก์ไปหน้านามบัตร / ใบปลิว) */
.ot-calc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ot-calc-card { display: flex; padding: 14px 18px 14px 14px; align-items: center; gap: 16px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 22px; text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease; }
.ot-calc-card:hover { border-color: var(--green-600); box-shadow: var(--kk-shadow, 0 12px 32px rgba(0, 82, 65, .10)); }
.ot-calc-img { display: grid; width: 96px; height: 96px; flex: none; overflow: hidden; place-items: center; color: var(--green-700); background: var(--green-50); border-radius: 16px; }
.ot-calc-img img { width: 100%; height: 100%; object-fit: cover; }
.ot-calc-img .ico { width: 36px; height: 36px; }
.ot-calc-t { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 3px; }
.ot-calc-t b { font-size: 17px; line-height: 1.35; }
.ot-calc-t small { color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.ot-calc-card em { flex: none; font-style: normal; }
/* รายละเอียด + ตัวเลือก */
.ot-body { display: flex; min-width: 0; margin: 0; padding: 26px 28px 24px 26px; flex-direction: column; }
.ot-body h3 { margin: 0 0 6px; color: var(--ink); font-size: 22px !important; font-weight: 700; line-height: 1.35 !important; }
.ot-text { margin: 0 0 12px; color: var(--text); font-size: 14.5px; line-height: 1.7; }
.ot-fit { display: flex; margin: 0; padding: 0; flex-wrap: wrap; gap: 6px; list-style: none; }
.ot-fit li { padding: 3px 11px; color: var(--green-800); background: var(--green-50); border: 1px solid #d3efdf; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.ot-opts-h { display: flex; margin: 18px 0 12px; padding-top: 16px; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; border-top: 1px dashed var(--line); }
.ot-opts-h b { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-size: 15px; }
.ot-opts-h b .ico { width: 17px; height: 17px; color: var(--green-700); }
.ot-opts-h small { color: var(--muted); font-size: 12.5px; }
.ot-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.ot-opts .kk-field { align-content: start; }
.ot-opts .kk-field select,
.ot-opts .kk-field input { min-height: 44px; font-size: 14.5px; }
.ot-opts .ot-note { grid-column: 1 / -1; }
.ot-opts .ot-note textarea { min-height: 64px; font-size: 14.5px; }
.ot-custom { margin-top: 2px; }
.ot-body .kk-error { margin-top: 12px; }
.ot-foot { display: flex; margin-top: 18px; padding-top: 16px; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px dashed var(--line); }
.ot-foot .kk-btn { min-width: 210px; }
/* แท็บเล็ต: รูปเล็กลงอยู่ซ้าย ตัวเลือกเรียงแถวเดียว */
@media (max-width: 1100px) {
    .ot-card { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
    .ot-body { padding: 22px 22px 22px 22px; }
}
@media (max-width: 860px) {
    .ot-calc { grid-template-columns: 1fr; }
    .ot-card { grid-template-columns: minmax(0, 250px) minmax(0, 1fr); }
    .ot-opts { grid-template-columns: 1fr; }
}
/* มือถือ: รูปอยู่บน (กลางจอ) ตัวเลือกอยู่ล่าง */
@media (max-width: 680px) {
    .ot-card { grid-template-columns: 1fr; }
    .ot-media { width: calc(100% - 28px); max-width: 460px; margin: 14px auto 0; }
    .ot-portrait .ot-media { align-self: auto; aspect-ratio: 4 / 5; min-height: 0; max-width: 380px; }
}
@media (max-width: 600px) {
    .ot-jump { padding-top: 20px; }
    .ot-jump .container { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .ot-jump .container::-webkit-scrollbar { display: none; }
    .ot-jump a { flex: none; font-size: 13.5px; }
    .ot-card { border-radius: 20px; }
    .ot-media { border-radius: 16px; }
    .ot-ph-ico { width: 92px; height: 92px; border-radius: 28px; }
    .ot-ph-ico .ico { width: 44px; height: 44px; }
    .ot-body { padding: 16px 16px 18px; }
    .ot-body h3 { font-size: 19px !important; }
    .ot-opts { grid-template-columns: 1fr; }
    .ot-foot { flex-direction: column; align-items: stretch; }
    .ot-foot .kk-btn { width: 100%; }
    .ot-calc-card { flex-wrap: wrap; }
    .ot-calc-img { width: 72px; height: 72px; }
    .ot-calc-card em { width: 100%; }
}
/* กล่องปรึกษาทีมงาน */
.ot-help { position: relative; display: grid; overflow: hidden; min-height: 150px; padding: 26px 40px; align-items: center; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; background: linear-gradient(100deg, #e8f6ee 0%, #f2faf6 100%); border: 1px solid #d5ecdf; border-radius: 26px; }
.ot-help.has-photo { padding: 0 40px 0 18px; grid-template-columns: 22% 42% minmax(0, 1fr); column-gap: 1.5%; row-gap: 0; }
.ot-help-photo { display: block; align-self: end; width: 137%; max-width: none; height: auto; }
.ot-help-text,
.ot-help-btns { position: relative; z-index: 1; }
.ot-help-text h2 { margin: 0 0 8px; color: var(--green-950); font-size: clamp(19px, 1.9vw, 30px) !important; font-weight: 700; line-height: 1.35 !important; }
.ot-help-text p { margin: 0; color: var(--text); font-size: clamp(13.5px, 1.05vw, 16px); line-height: 1.7; }
@media (min-width: 1700px) { .ot-help-text p br { display: none; } .ot-help.has-photo { grid-template-columns: 22% 46% minmax(0, 1fr); } }
.ot-help-btns { display: flex; width: 270px; flex-direction: column; gap: 10px; }
.ot-help-btns .kk-btn { width: 100%; justify-content: center; }
.ot-help.has-photo .ot-help-btns { width: min(100%, 290px); justify-self: end; }
/* ขั้นตอนการสั่งพิมพ์ 3 ข้อ */
.ot-how-head { margin: 0 auto 28px; text-align: center; }
.ot-how-eyebrow { display: inline-flex; margin-bottom: 8px; align-items: center; gap: 10px; color: var(--green-700); font-size: 14px; font-weight: 600; }
.ot-how-eyebrow::before,
.ot-how-eyebrow::after { width: 26px; height: 2px; content: ""; background: var(--green-600); border-radius: 2px; opacity: .45; }
.ot-how-head h2 { margin: 0 0 8px; color: var(--green-950); font-size: clamp(22px, 2.5vw, 32px) !important; font-weight: 700; line-height: 1.35 !important; }
.ot-how-head p { margin: 0; color: var(--muted); font-size: 15px; }
.ot-how { display: grid; margin: 0; padding: 0; align-items: stretch; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; list-style: none; }
.ot-how-step { display: flex; padding: 20px 20px; align-items: center; gap: 16px; background: #fff; border: 1px solid #d9eee2; border-radius: 22px; box-shadow: 0 4px 16px rgba(0, 82, 65, .05); }
.ot-how-ico { display: grid; width: 64px; height: 64px; flex: none; place-items: center; color: #fff; background: var(--green-700); border-radius: 50%; }
.ot-how-ico .ico { width: 30px; height: 30px; stroke-width: 1.7; }
.ot-how-step h3 { display: flex; margin: 0 0 6px; align-items: center; gap: 8px; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.35; }
.ot-how-no { display: inline-grid; width: 24px; height: 24px; flex: none; place-items: center; color: #fff; background: var(--green-700); border-radius: 50%; font-size: 13px; font-weight: 700; }
.ot-how-step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.ot-how-arr { display: grid; place-items: center; color: var(--green-600); }
.ot-how-arr .ico { width: 22px; height: 22px; }
@media (max-width: 1100px) {
    .ot-how { grid-template-columns: 1fr; }
    .ot-how-arr { display: none; }
}
@media (max-width: 860px) {
    .ot-help,
    .ot-help.has-photo { padding: 24px 22px; grid-template-columns: 1fr; gap: 18px; }
    .ot-help-photo { display: none; }
    .ot-help-btns { width: 100%; flex-direction: row; }
    .ot-help-btns .kk-btn { flex: 1 1 0; }
}
@media (max-width: 520px) {
    .ot-help-btns { flex-direction: column; }
    .ot-how-step { padding: 18px; gap: 14px; }
    .ot-how-ico { width: 60px; height: 60px; }
    .ot-how-ico .ico { width: 28px; height: 28px; }
}
/* หน้างานพิมพ์ร้านอาหาร: การ์ดรูปซ้ายเต็มความสูง ฟอร์ม 2 คอลัมน์ ชื่อช่องอยู่หน้าช่องเลือก */
.ot-portrait .ot-card { grid-template-columns: minmax(0, 37%) minmax(0, 1fr); }
.ot-portrait .ot-media { margin: 14px 0 14px 14px; min-height: 360px; }
.ot-portrait .ot-media .kk-tag { top: 14px; left: 14px; padding: 5px 13px 5px 8px; color: #fff; background: var(--green-700); font-size: 12.5px; }
.ot-portrait .ot-media .kk-tag::before { display: inline-grid; width: 16px; height: 16px; place-items: center; content: "\2713"; color: var(--green-700); background: #fff; border-radius: 50%; font-size: 10px; font-weight: 800; line-height: 1; }
.ot-portrait .ot-body { padding: 22px 26px 22px 24px; }
.ot-portrait .ot-body h3 { font-size: 21px !important; }
.ot-portrait .ot-text { margin-bottom: 10px; font-size: 14px; }
.ot-portrait .ot-fit li { display: inline-flex; padding: 4px 12px 4px 8px; align-items: center; gap: 5px; background: #fff; border-color: #bfe6d1; }
.ot-portrait .ot-fit li::before { content: "\2713"; color: var(--green-700); font-size: 12px; font-weight: 800; }
.ot-portrait .ot-opts-h { display: none; }
.ot-portrait .ot-opts { margin-top: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.ot-portrait .ot-opts .kk-field { grid-template-columns: 82px minmax(0, 1fr); align-items: center; gap: 4px 10px; }
.ot-portrait .ot-opts .kk-field label { font-size: 13.5px; line-height: 1.3; }
.ot-portrait .ot-opts .kk-field select,
.ot-portrait .ot-opts .kk-field input { min-height: 42px; padding: 8px 12px; border-radius: 10px; font-size: 14px; }
.ot-portrait .ot-opts .ot-custom { grid-column: 2; }
.ot-portrait .ot-opts .ot-note { align-items: start; grid-column: 1 / -1; }
.ot-portrait .ot-opts .ot-note label { padding-top: 10px; }
.ot-portrait .ot-opts .ot-note label small { display: block; }
.ot-portrait .ot-opts .ot-note textarea { min-height: 58px; padding: 8px 12px; border-radius: 10px; font-size: 14px; }
.ot-portrait .ot-foot { margin-top: 14px; padding-top: 0; border-top: 0; }
.ot-portrait .ot-foot .kk-btn { min-width: 260px; }
@media (max-width: 1100px) {
    .ot-portrait .ot-card { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
}
@media (max-width: 860px) {
    .ot-portrait .ot-card { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); }
    .ot-portrait .ot-opts { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .ot-portrait .ot-card { grid-template-columns: 1fr; }
    .ot-portrait .ot-media { margin: 14px 14px 0; min-height: 0; }
}
@media (max-width: 600px) {
    .ot-portrait .ot-body { padding: 16px 16px 18px; }
    .ot-portrait .ot-opts .kk-field,
    .ot-portrait .ot-opts .ot-note { grid-template-columns: 1fr; }
    .ot-portrait .ot-opts .ot-custom { grid-column: 1; }
    .ot-portrait .ot-opts .ot-note label { padding-top: 0; }
    .ot-portrait .ot-foot .kk-btn { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .ot-jump a, .ot-card { transition: none; }
}

/* ไม่มีค่าเริ่มต้น: ช่องที่ยังไม่เลือกตอนกดขอราคา */
.kk-field.is-missing select { border-color: #e2a39b; box-shadow: 0 0 0 3px rgba(214, 69, 69, .1); }
.kk-field.is-missing > label { color: #b3382c; }

/* การ์ด เร็วๆ นี้ (ยังไม่เปิดรับ) */
.ot-soon-tag { position: absolute; right: 14px; top: 14px; padding: 5px 14px; color: #8a5a00; background: #fff3d6; border: 1px solid #f3d99a; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.ot-card:has(.ot-soon) .ot-media > img,
.ot-card:has(.ot-soon) .ot-ph { opacity: .55; filter: grayscale(.35); }
.ot-soon-box { display: grid; margin-top: 18px; padding: 18px 20px; justify-items: start; gap: 8px; background: #fffaf0; border: 1px solid #f3e3b8; border-radius: 16px; }
.ot-soon-box b { color: #8a5a00; font-size: 18px; font-weight: 700; }
.ot-soon-box span { color: var(--text); font-size: 14.5px; line-height: 1.7; }
.ot-soon-box .kk-btn { margin-top: 4px; }