/* pd2.css — หน้าสินค้าเลย์เอาต์ใหม่ (ใช้กับ photocard-v2.php) */
.p2, .p2-more { --o: #00AEEF; --o-d: #0094cf; --o-l: #e8f7fe; }
.p2 { background: #fff; padding: 48px 0 56px; }

/* layout บน */
.p2-top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: stretch; }

/* แกลเลอรี */
.p2-gallery { display: flex; flex-direction: column; }
.p2-main { position: relative; flex: 1 1 auto; min-height: 320px; border-radius: 16px; overflow: hidden; background: var(--off); }
.p2-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* ฝั่งสั่งซื้อ */
.p2-title { font-size: clamp(34px, 4.2vw, 46px); font-weight: 700; line-height: 1.15; color: var(--ink); padding-bottom: 14px; position: relative; margin-bottom: 18px; }
.p2-cmy-title { position: absolute; left: 0; bottom: 0; }
.p2-lead { font-size: 15.5px; font-weight: 300; line-height: 1.8; color: var(--dark); margin-bottom: 20px; }

.p2-price {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 6px;
  background: #f6f6f7; border-radius: 14px; padding: 18px 24px; margin-bottom: 22px;
}
.p2-price-main small, .p2-price-time small { display: block; font-size: 14px; font-weight: 500; color: var(--ink); }
.p2-price-main > span { font-size: 12px; color: var(--muted); font-weight: 300; }
.p2-price-num { display: flex; align-items: baseline; gap: 8px; color: var(--ink); line-height: 1.1; margin: 2px 0; }
.p2-price-num b { font-size: 44px; font-weight: 700; letter-spacing: -0.01em; }
.p2-baht { font-size: 36px; font-weight: 700; }
.p2-price-time { display: flex; align-items: center; gap: 12px; padding-left: 22px; border-left: 1px solid var(--mid); }
.p2-time-ico { flex: none; width: 44px; height: 44px; color: var(--ink); }
.p2-time-ico svg { width: 100%; height: 100%; }
.p2-price-time b { display: block; font-size: 19px; white-space: nowrap; font-weight: 600; color: var(--ink); margin-top: 2px; }

/* ตัวเลือก */
.p2-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 24px; }
.p2-opt { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: center; gap: 8px; }
.p2-opt span { font-size: 14px; font-weight: 600; color: var(--ink); }
.p2-opt select {
  width: 100%; height: 40px; padding: 0 30px 0 10px; font: inherit; font-size: 13px; text-overflow: ellipsis; color: var(--ink);
  border: 1px solid var(--mid); border-radius: 8px; background: #fff; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 20px;
  transition: border-color .15s;
}
.p2-opt select:hover { border-color: var(--dark); }
.p2-opt select:focus { outline: none; border-color: var(--o); }

/* ปุ่ม — สั่งพิมพ์: ดำ / LINE: เขียวแบรนด์ — ชี้แล้วแสงปาด */
.p2-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.p2-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 20px; border-radius: 10px; font-size: 15px; font-weight: 600;
  transition: background .18s, color .18s, border-color .18s, transform .18s; white-space: nowrap;
}
.p2-btn svg { width: 20px; height: 20px; flex: none; }
.p2-btn { position: relative; overflow: hidden; }
.p2-btn > * { position: relative; z-index: 2; }
.p2-btn-order { background: #111; color: #fff; }
.p2-btn-line { background: #06C755; color: #fff; border: 1.5px solid #06C755; }
/* ชี้/กด: แสงปาดผ่านปุ่ม (เหมือนปุ่ม Hero หน้าแรก) ไม่เปลี่ยนสีพื้น */
.p2-btn::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -30%; width: 30%; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.6) 50%, transparent 100%);
  transform: skewX(-20deg) translateX(0);
}
.p2-btn:hover::after, .p2-btn:active::after, .p2-btn:focus-visible::after { animation: p2-shine .75s ease-out 1; }
@keyframes p2-shine {
  from { transform: skewX(-20deg) translateX(0); }
  to   { transform: skewX(-20deg) translateX(520%); }
}
@media (prefers-reduced-motion: reduce) { .p2-btn:hover::after, .p2-btn:active::after { animation: none; } }

/* จุดเด่น 4 ข้อ (แถบใต้ส่วนสั่งซื้อ) */
.p2-feats {
  list-style: none; margin: 40px 0 0; padding: 6px 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #f6f6f7; border-radius: 14px;
}
.p2-feats li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-left: 1px solid var(--mid); }
.p2-feats li:first-child { border-left: 0; }
.p2-feat-ico { flex: none; width: 40px; height: 40px; color: var(--ink); }
.p2-feat-ico svg { width: 100%; height: 100%; display: block; }
.p2-feats b { display: block; font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.p2-feats small { display: block; font-size: 12.5px; font-weight: 300; color: var(--dark); line-height: 1.4; margin-top: 2px; }
@media (max-width: 960px) {
  .p2-feats { grid-template-columns: 1fr 1fr; }
  .p2-feats li:nth-child(3) { border-left: 0; }
  .p2-feats li:nth-child(n+3) { border-top: 1px solid var(--mid); }
}
@media (max-width: 480px) {
  .p2-feats { grid-template-columns: 1fr; }
  .p2-feats li, .p2-feats li:nth-child(3) { border-left: 0; }
  .p2-feats li + li { border-top: 1px solid var(--mid); }
}
/* สินค้าแนะนำ (ก่อน footer) — ธีมฟ้าเหมือนส่วนบนของหน้า */
.p2-rec { background: #fff; padding: 64px 0 72px; }
.p2-rec .product-grid .pcard { text-decoration: none; }
@media (max-width: 560px) { .p2-rec { padding: 44px 0 52px; } }
/* รายละเอียดสินค้า + ตัวอย่างงาน */
.p2-more { background: #fff; padding: 64px 0; border-top: 1px solid var(--light); }
.p2-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
.p2-card { background: #fff; border: 1px solid var(--light); border-radius: 18px; padding: 28px 30px; }
.p2-card-h { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; color: var(--ink); padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--light); }
.p2-card-h .p2-i { width: 24px; height: 24px; color: var(--ink); flex: none; }
.p2-lead2 { font-size: 15px; font-weight: 300; line-height: 1.95; color: var(--dark); margin-bottom: 24px; }
.p2-sub { font-size: 14px; font-weight: 600; color: var(--ink); margin: 0 0 12px; }
.p2-pills { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.p2-pills li { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px 8px 11px; border-radius: 999px; background: #F2F2F3; color: var(--ink); font-size: 13.5px; font-weight: 400; line-height: 1.2; }
.p2-pills .p2-i { width: 17px; height: 17px; color: var(--ink); flex: none; }
.p2-filebox { display: flex; align-items: center; gap: 18px; padding: 16px 18px; border-radius: 14px; background: #f6f6f7; }
.p2-filebox p { font-size: 13.5px; font-weight: 300; line-height: 1.7; color: var(--dark); margin: 0; }
.p2-files { display: flex; gap: 10px; flex: none; }
.p2-file { position: relative; width: 46px; height: 56px; border-radius: 7px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 9px; color: #fff; font-size: 12px; }
.p2-file::before { content: ''; position: absolute; top: 0; right: 0; width: 14px; height: 14px; border-radius: 0 7px 0 8px; background: rgba(255,255,255,.45); }
.p2-file b { font-weight: 800; letter-spacing: .02em; }
.p2-file-pdf { background: linear-gradient(160deg, #ff5a4f, #d9261c); }
.p2-file-jpg { background: linear-gradient(160deg, #4aa8ff, #1668d6); }
.p2-file-png { background: linear-gradient(160deg, #c46bff, #8d2fd1); }

.p2-specs { margin: 0; }
.p2-spec { display: grid; grid-template-columns: 190px 1fr; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--mid); }
.p2-spec:last-child { border-bottom: 0; padding-bottom: 0; }
.p2-spec:first-child { padding-top: 0; }
.p2-spec dt { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; color: var(--ink); }
.p2-spec dt .p2-i { width: 22px; height: 22px; color: var(--ink); flex: none; }
.p2-spec dd { margin: 0; font-size: 14px; font-weight: 300; color: var(--dark); line-height: 1.6; }

.p2-samples { background: #F6F6F7; border-top: 0; }
.p2-sample-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 14px; }
.p2-sample { margin: 0; border-radius: 14px; overflow: hidden; background: var(--off); }
.p2-sample-big { grid-column: span 2; grid-row: span 2; }
.p2-sample img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.p2-sample:hover img { transform: scale(1.05); }

@media (max-width: 960px) {
  .p2-sample-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
}
@media (max-width: 560px) {
  .p2-more { padding: 44px 0; }
  .p2-sample-grid { grid-auto-rows: 150px; gap: 10px; }
}
/* รายละเอียดสินค้า — จอเล็ก */
@media (max-width: 960px) { .p2-detail { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .p2-card { padding: 22px 18px; border-radius: 14px; }
  .p2-spec { grid-template-columns: 1fr; gap: 4px; }
  .p2-spec dd { padding-left: 34px; }
  .p2-filebox { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* การ์ดสินค้าแนะนำ — สไตล์เดียวกับการ์ดหน้าแรก (ไม่แยกสีตามหมวด) */
.p2-rec .pcard-accent-line { display: none; }
.p2-rec .pcard:hover { transform: none; border-color: #0A0A0A; box-shadow: none; }
.p2-rec .pcard-badge { background: #0A0A0A; color: #fff; }
.p2-rec .ptag.hi { background: #F2F2F3; border-color: #E2E2E4; color: #0A0A0A; }
.p2-rec .pcard-btn { background: #0A0A0A; position: relative; overflow: hidden; }
.p2-rec .pcard-btn::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -30%; width: 30%; pointer-events: none;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.45) 50%, transparent 100%);
  transform: skewX(-20deg) translateX(0);
}
.p2-rec .pcard:hover .pcard-btn::after { animation: p2-shine .75s ease-out 1; }
/* หัวข้อส่วนต่างๆ — สไตล์เดียวกับหน้าแรก (eyebrow + แถบ CMY + หัวข้อใหญ่ กึ่งกลาง) */
.p2-head { text-align: center; max-width: 760px; margin: 0 auto 36px; }
.p2-eyebrow { display: inline-flex; align-items: center; gap: 14px; font-size: 11.5px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: #6b7280; margin-bottom: 14px; }
.p2-cmy { display: inline-flex; gap: 4px; }
.p2-cmy b { width: 18px; height: 5px; border-radius: 3px; transform: skewX(-20deg); }
.p2-cmy b:nth-child(1) { background: var(--cmyk-c); }
.p2-cmy b:nth-child(2) { background: var(--cmyk-m); }
.p2-cmy b:nth-child(3) { background: var(--cmyk-y); }
.p2-h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; color: var(--ink); margin: 0; }
@media (max-width: 560px) { .p2-head { margin-bottom: 28px; } }

/* หน้าสินค้าแบบ "สอบถามราคา" (includes/product-pd2.php) */
.p2-noimg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #8a8a8a; text-align: center; padding: 24px; }
.p2-noimg-ic { width: 44px; height: 44px; opacity: .5; }
.p2-noimg span { font-size: 18px; font-weight: 600; color: #444; }
.p2-noimg small { font-size: 12px; font-weight: 300; }
.p2-price-ask .p2-price-num b { font-size: 30px; }
.p2-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 22px; padding: 0; }
.p2-tags li { font-size: 12px; font-weight: 400; color: #444; background: #F2F2F3; border: 1px solid #E2E2E4; border-radius: 999px; padding: 4px 12px; }
.p2-faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.p2-faq-item { background: #fff; border: 1px solid var(--light); border-radius: 14px; padding: 0 20px; }
.p2-faq-item summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.p2-faq-item summary::-webkit-details-marker { display: none; }
.p2-faq-item summary::after { content: '+'; font-size: 22px; font-weight: 300; line-height: 1; color: var(--ink); flex: none; }
.p2-faq-item[open] summary::after { content: '–'; }
.p2-faq-item p { margin: 0; padding: 0 0 18px; font-size: 14px; font-weight: 300; line-height: 1.8; color: var(--dark); }

/* ตัวอย่างงาน (รูปแนวนอน/การ์ดเชิญ) + lightbox */
.p2-sample-grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.p2-sample2 { margin: 0; border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid var(--light); }
.p2-sample2-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.p2-sample2 img { display: block; width: 100%; height: auto; aspect-ratio: 1400 / 1013; object-fit: cover; transition: transform .35s ease; }
.p2-sample2:hover img { transform: scale(1.04); }
.p2-lightbox { position: fixed; inset: 0; z-index: 10000; background: rgba(10,10,10,.88); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.p2-lightbox[hidden] { display: none; }
.p2-lightbox img { max-width: min(1200px, 100%); max-height: 100%; border-radius: 10px; }
.p2-lightbox-x { position: absolute; top: 16px; right: 20px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: #111; font-size: 24px; line-height: 1; cursor: pointer; }
@media (max-width: 560px) { .p2-sample-grid2 { grid-template-columns: 1fr; } }
/* ฟอร์มขอใบเสนอราคา */
.p2-quote { background: #fff; }
.p2-rec { border-top: 1px solid var(--light); }
.p2-quote-lead { text-align: center; max-width: 640px; margin: -12px auto 28px; font-size: 14.5px; font-weight: 300; line-height: 1.8; color: var(--dark); }
.p2-quote-card { width: 100%; margin: 0; background: #fff; border: 1px solid var(--light); border-radius: 18px; padding: 32px 34px; }
.p2-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 22px; }
.p2-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.p2-field > span { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.p2-field > span em { color: #d0342c; font-style: normal; }
.p2-field input, .p2-field select, .p2-field textarea {
  width: 100%; font: inherit; font-size: 14.5px; color: var(--ink); background: #fff;
  border: 1px solid var(--mid); border-radius: 10px; padding: 0 14px; height: 46px; transition: border-color .15s;
}
.p2-field textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
.p2-field select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 20px; }
.p2-field input:hover, .p2-field select:hover, .p2-field textarea:hover { border-color: var(--dark); }
.p2-field input:focus, .p2-field select:focus, .p2-field textarea:focus { outline: none; border-color: var(--ink); }
.p2-field ::placeholder { color: #a5a5a5; font-weight: 300; }
.p2-field-wide { grid-column: 1 / -1; }
.p2-field-note p { margin: 0; font-size: 13px; font-weight: 300; line-height: 1.7; color: var(--muted); }
.p2-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.p2-form-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.p2-form-foot .p2-btn { min-width: 240px; border: 0; cursor: pointer; font-family: inherit; }
.p2-form-foot .p2-btn:disabled { opacity: .6; cursor: default; }
.p2-form-note { margin: 0; font-size: 12.5px; font-weight: 300; color: var(--muted); }
.p2-form-msg { grid-column: 1 / -1; margin: 0; padding: 12px 16px; border-radius: 10px; background: #fdecea; color: #a52a22; font-size: 14px; }
.p2-quote-done { text-align: center; padding: 28px 12px; }
.p2-quote-done-ic { width: 54px; height: 54px; color: var(--ink); margin-bottom: 12px; }
.p2-quote-done h3 { font-size: 22px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.p2-quote-done p { margin: 0 auto; max-width: 480px; font-size: 14.5px; font-weight: 300; line-height: 1.8; color: var(--dark); }
@media (max-width: 960px) { .p2-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .p2-quote-card { padding: 22px 18px; border-radius: 14px; }
  .p2-form { grid-template-columns: 1fr; }
  .p2-form-foot .p2-btn { width: 100%; min-width: 0; }
}
/* ตัวอย่างงานหลายด้าน (หน้า/หลัง) */
.p2-faces { display: flex; flex-direction: column; }
.p2-face-tabs { display: flex; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--light); background: #fff; }
.p2-face-tab { flex: 1; font: inherit; font-size: 13px; font-weight: 600; color: var(--dark); background: #F2F2F3; border: 1px solid transparent; border-radius: 999px; padding: 8px 12px; cursor: pointer; transition: background .15s, color .15s; }
.p2-face-tab:hover { background: #E7E7E9; }
.p2-face-tab.active { background: #111; color: #fff; }