/* ═══════════════════════════════════════════════════════════════
   Digitalcafe Photo&Frames — Design System
   โทน: เขียวมิ้นท์ · บีช/ครีม · เงิน
   ═══════════════════════════════════════════════════════════════ */
:root {
  --mint-50:  #ecfbf5;
  --mint-100: #d2f4e7;
  --mint-200: #a9ead1;
  --mint-300: #6fdcb4;
  --mint-400: #38cba0;
  --mint-500: #16b88b;   /* CTA หลัก (สดแบบ lalapix) */
  --mint-600: #0f9f78;
  --mint-700: #0c7d60;
  --green-ink:#123c30;   /* text เข้ม */

  --beige-50: #fdfbf7;
  --beige-100:#f7f1e6;
  --beige-200:#efe6d5;

  --silver-100:#f2f4f5;
  --silver-200:#e4e8ea;
  --silver-300:#cfd6d9;
  --silver-400:#a9b3b7;

  --ink:      #24312c;
  --muted:    #6b7a74;
  --danger:   #d9534f;
  --warn:     #e0a800;
  --ok:       #3aa877;

  --shadow-sm: 0 2px 8px rgba(18,60,48,.06);
  --shadow:    0 8px 24px rgba(18,60,48,.09);
  --shadow-lg: 0 18px 48px rgba(18,60,48,.14);
  --radius:   18px;
  --radius-sm:12px;
  --radius-lg:28px;
  --maxw: 1200px;
  --font: 'Sarabun', 'Prompt', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Prompt', 'Sarabun', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4 { font-family: var(--font-head); color: var(--green-ink); line-height: 1.25; margin: 0 0 .5em; }
a { color: var(--mint-600); text-decoration: none; }
a:hover { color: var(--mint-700); }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  padding: 12px 22px; border-radius: 999px; border: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .15s;
  text-align: center; line-height: 1.1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--mint-500); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--mint-600); color:#fff; box-shadow: var(--shadow); }
.btn-outline { background: #fff; color: var(--mint-700); border: 1.5px solid var(--mint-300); }
.btn-outline:hover { background: var(--mint-50); }
.btn-ghost { background: var(--silver-100); color: var(--green-ink); }
.btn-ghost:hover { background: var(--silver-200); }
.btn-danger { background: #fff; color: var(--danger); border: 1.5px solid var(--danger); }
.btn-danger:hover { background: #fdeeee; }
.btn-sm { padding: 8px 15px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ── Announcement topbar ─────────────────────────────────── */
.topbar {
  background: linear-gradient(90deg, var(--mint-500), var(--mint-400));
  color: #fff; text-align: center; font-family: var(--font-head); font-weight: 600;
  font-size: .9rem; letter-spacing: .5px; padding: 8px 12px;
}
.topbar a { color: #fff; text-decoration: underline; }

/* ── Utility bar (login/lang/cart tier) ──────────────────── */
.utilbar { background: var(--beige-100); border-bottom: 1px solid var(--silver-200); font-size: .86rem; }
.utilbar-inner { display: flex; align-items: center; height: 38px; gap: 16px; }
.utilbar .util-left { color: var(--muted); }
.utilbar .util-left a { color: var(--muted); }
.utilbar .util-left a:hover { color: var(--mint-700); }
.utilbar .util-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.utilbar .util-right a { color: var(--green-ink); font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.utilbar .util-right a:hover { color: var(--mint-700); }
@media (max-width: 640px){ .utilbar .util-left { display: none; } .utilbar-inner { justify-content: flex-end; } }

/* ── Header / Nav ────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--silver-200);
}
.nav { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-head); font-weight: 700; color: var(--green-ink); font-size: 1.18rem; }
.brand img { width: 44px; height: 44px; border-radius: 12px; }
.brand small { display:block; font-weight:600; font-size:.66rem; color: var(--mint-600); letter-spacing:1.5px; }
.nav-links { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.nav-links a { padding: 6px 12px; color: var(--green-ink); font-weight: 500; font-family: var(--font-head); border-bottom: 2px solid transparent; border-radius: 0; }
.nav-links a:hover, .nav-links a.active { color: var(--mint-600); border-bottom-color: var(--mint-500); background: transparent; }
.cart-link { position: relative; }
.cart-badge {
  position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--danger); color: #fff; border-radius: 999px; font-size: .72rem;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.nav-toggle { display: none; margin-left: auto; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--green-ink); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 70px; left: 0; right: 0; flex-direction: column;
    background: var(--beige-50); border-bottom: 1px solid var(--silver-200);
    padding: 10px 18px; gap: 2px; margin: 0; display: none; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; }
  .cart-link { align-self: flex-start; }
}

/* ── Hero / Banner (rounded card, lalapix-style) ─────────── */
.hero { position: relative; max-width: var(--maxw); margin: 20px auto 0; padding: 0 18px; }
.slides { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.slide {
  display: none; position: relative; min-height: 440px;
  background-size: cover; background-position: center;
}
.slide.active { display: block; animation: fade .6s ease; }
@keyframes fade { from { opacity: .3 } to { opacity: 1 } }
.slide::after { content:''; position:absolute; inset:0; background: linear-gradient(90deg, rgba(11,60,45,.68) 0%, rgba(11,60,45,.30) 52%, rgba(11,60,45,0) 82%); }
.slide-inner { position: relative; z-index: 2; padding: 70px 56px; color:#fff; }
.slide-inner h1 { color: #fff; font-size: clamp(1.9rem, 4.3vw, 3.1rem); max-width: 560px; text-shadow: 0 2px 14px rgba(0,0,0,.28); line-height: 1.18; }
.slide-inner p { max-width: 500px; font-size: 1.12rem; color: #f0fff9; margin-bottom: 24px; text-shadow: 0 1px 8px rgba(0,0,0,.2); }
.slide-dots { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; gap: 8px; justify-content: center; z-index: 3; }
.slide-dots button { width: 10px; height: 10px; border-radius: 999px; border: none; background: rgba(255,255,255,.55); cursor: pointer; transition: width .2s; }
.slide-dots button.active { background: #fff; width: 28px; }
@media (max-width:600px){ .slide { min-height: 340px } .slide-inner { padding: 44px 28px } .slides { border-radius: 20px } }

/* ── Sections ────────────────────────────────────────────── */
.section { padding: 56px 0; }
.section.beige { background: var(--beige-100); }
.section.mint { background: var(--mint-50); }
.section.tint { background: linear-gradient(180deg, var(--mint-50), #fff); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.eyebrow { display:inline-block; font-family: var(--font-head); font-weight:600; color: var(--mint-600); background: var(--mint-100); padding: 4px 14px; border-radius: 999px; font-size:.85rem; margin-bottom: 10px; }
/* left-aligned header with view-all link (lalapix) */
.head-row { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom: 26px; }
.head-row h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0; }
.head-row .subtitle { color: var(--muted); font-size: .98rem; margin-top: 4px; }
.head-row .view-all { font-family: var(--font-head); font-weight: 600; color: var(--mint-600); white-space: nowrap; }
.head-row .view-all:hover { color: var(--mint-700); }

/* ── Grid & Cards ────────────────────────────────────────── */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px){ .grid-4 { grid-template-columns: repeat(2,1fr) } .grid-3 { grid-template-columns: repeat(2,1fr) } }
@media (max-width: 560px){ .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr } }

.card {
  background: #fff; border: 1px solid var(--silver-200); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-img { aspect-ratio: 4/3; overflow: hidden; background: var(--silver-100); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 1.08rem; margin: 0; }
.card-cat { font-size: .78rem; color: var(--mint-600); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.price { font-family: var(--font-head); font-weight: 700; color: var(--green-ink); font-size: 1.25rem; }
.price small { font-weight: 500; font-size: .8rem; color: var(--muted); }
.card .btn { margin-top: auto; }

/* ── Product card (lalapix minimal tile) ─────────────────── */
.product-card { display:flex; flex-direction:column; transition: transform .16s ease; color: var(--ink); }
.product-card:hover { transform: translateY(-4px); color: var(--ink); }
.product-card .p-img {
  display:block; position:relative; aspect-ratio: 1/1; border-radius: var(--radius);
  overflow:hidden; background: var(--silver-100); box-shadow: var(--shadow-sm);
}
.product-card .p-img img { width:100%; height:100%; object-fit: cover; transition: transform .45s ease; }
.product-card:hover .p-img img { transform: scale(1.06); }
.p-badge {
  position:absolute; top:10px; left:10px; z-index:2; background: #ff5a5f; color:#fff;
  font-family: var(--font-head); font-weight:700; font-size:.72rem; padding:3px 10px; border-radius: 9px;
}
.product-card .p-body { padding: 13px 4px 4px; display:flex; flex-direction:column; gap:4px; flex:1; }
.product-card .p-title { font-family: var(--font-head); font-weight:600; color: var(--green-ink); font-size:1.05rem; line-height:1.35; }
.product-card:hover .p-title { color: var(--mint-600); }
.product-card .p-desc {
  font-size:.9rem; color: var(--muted); line-height:1.45;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.product-card .p-price { font-family: var(--font-head); font-weight:700; color: var(--mint-600); font-size:1.02rem; margin-top: 3px; }

/* category tiles */
.cat-tiles { display:grid; grid-template-columns: repeat(4,1fr); gap:16px; }
@media(max-width:700px){ .cat-tiles{ grid-template-columns: repeat(2,1fr) } }
.cat-tile { display:flex; flex-direction:column; align-items:center; gap:8px; padding:26px 14px; border-radius: var(--radius);
  background: var(--mint-50); border:1px solid var(--mint-100); text-align:center; transition: transform .15s, box-shadow .15s; }
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); background:#fff; }
.cat-tile .emoji { font-size: 2rem; }
.cat-tile strong { color: var(--green-ink); font-family: var(--font-head); }
.cat-tile span { font-size:.85rem; color: var(--muted); }

/* service card */
.svc-card { background:#fff; border:1px solid var(--silver-200); border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow-sm); }
.svc-card .card-img { aspect-ratio: 16/10; }
.svc-body { padding: 16px; }
.svc-body h3 { font-size: 1.05rem; }
.pill-note { display:inline-block; background: var(--beige-200); color: var(--green-ink); font-weight:600; padding: 4px 12px; border-radius: 999px; font-size: .85rem; margin-top: 6px; }

/* ── Feature strip ───────────────────────────────────────── */
.features { display:grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
@media(max-width:760px){ .features{ grid-template-columns: repeat(2,1fr) } }
.feature { text-align:center; padding: 18px; }
.feature .ic { font-size: 2rem; }
.feature h4 { margin: 8px 0 4px; }
.feature p { color: var(--muted); font-size: .92rem; margin:0; }

/* ── Forms ───────────────────────────────────────────────── */
label { font-weight: 600; color: var(--green-ink); font-size: .95rem; display:block; margin-bottom: 5px; }
input, select, textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--silver-300); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 1rem; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--mint-400); box-shadow: 0 0 0 3px var(--mint-100); }
.field { margin-bottom: 16px; }
.row-2 { display:grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media(max-width:560px){ .row-2{ grid-template-columns:1fr } }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background:#fff; }
table.data th, table.data td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--silver-200); font-size: .94rem; }
table.data th { background: var(--mint-50); color: var(--green-ink); font-family: var(--font-head); white-space: nowrap; }
table.data tr:hover td { background: var(--beige-50); }

/* price table (services) */
.price-table { width:100%; border-collapse: collapse; background:#fff; border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow-sm); }
.price-table th { background: var(--mint-500); color:#fff; padding: 12px; font-family: var(--font-head); }
.price-table td { padding: 10px 12px; border-bottom: 1px solid var(--silver-200); }
.price-table tr:last-child td { border-bottom: none; }

/* ── Badges ──────────────────────────────────────────────── */
.badge { display:inline-block; padding: 3px 11px; border-radius: 999px; font-size: .82rem; font-weight: 600; }
.badge.pending { background: #fff4d6; color: #96700a; }
.badge.paid { background: var(--mint-100); color: var(--mint-700); }
.badge.shipped { background: #dbeafe; color: #1d4ed8; }
.badge.cancelled { background: #fde2e1; color: var(--danger); }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { background: var(--green-ink); color: #cfe8dd; padding: 52px 0 24px; margin-top: 40px; }
.site-footer h4 { color: #fff; margin-bottom: 14px; }
.footer-grid { display:grid; grid-template-columns: 1.5fr 1fr 1.2fr 1.1fr; gap: 30px; }
@media(max-width:900px){ .footer-grid{ grid-template-columns: 1fr 1fr } }
@media(max-width:560px){ .footer-grid{ grid-template-columns: 1fr } }
.footer-links { list-style:none; padding:0; margin:0; }
.footer-links li { margin: 7px 0; }
.footer-social { display:flex; gap:10px; margin-top:14px; }
.footer-social a { width:38px; height:38px; border-radius:10px; background: rgba(255,255,255,.12); display:flex; align-items:center; justify-content:center; font-size:1.1rem; color:#fff; }
.footer-social a:hover { background: var(--mint-500); }
.site-footer a { color: #a9dcc4; }
.site-footer a:hover { color: #fff; }
.footer-contact li { list-style: none; margin: 6px 0; padding-left: 26px; position: relative; }
.footer-contact { padding: 0; margin: 0; }
.footer-contact li .ic { position:absolute; left:0; top:1px; }
.footer-map iframe { width: 100%; height: 180px; border: 0; border-radius: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 30px; padding-top: 18px; text-align:center; font-size: .88rem; color: #9fc4b4; }

/* ── Floating contact ────────────────────────────────────── */
.float-contact { position: fixed; right: 16px; bottom: 16px; z-index: 60; display:flex; flex-direction: column; gap: 10px; }
.float-contact a { width: 52px; height: 52px; border-radius: 999px; display:flex; align-items:center; justify-content:center; box-shadow: var(--shadow); font-size: 1.5rem; color:#fff; }
.fc-line { background: #06c755; }
.fc-tel { background: var(--mint-500); }
.fc-fb { background: #1877f2; }

/* ── Utility / misc ──────────────────────────────────────── */
.notice { background: var(--mint-50); border: 1px solid var(--mint-200); border-radius: var(--radius-sm); padding: 14px 16px; color: var(--green-ink); }
.notice.warn { background: #fff8e6; border-color: #f2df9e; }
.tag-filter { display:flex; flex-wrap: wrap; gap: 8px; justify-content:center; margin-bottom: 28px; }
.tag-filter button { padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--silver-300); background:#fff; cursor:pointer; font-family: var(--font-head); font-weight:500; color: var(--green-ink); }
.tag-filter button.active { background: var(--mint-500); color:#fff; border-color: var(--mint-500); }
.spinner { text-align:center; padding: 50px; color: var(--muted); }
.qr-box { text-align:center; }
.qr-box img, .qr-box canvas { width: 220px; height: 220px; margin: 0 auto; border: 8px solid #fff; border-radius: 12px; box-shadow: var(--shadow-sm); }
.divider { height:1px; background: var(--silver-200); margin: 22px 0; }
.breadcrumb { font-size: .9rem; color: var(--muted); padding: 16px 0; }
.breadcrumb a { color: var(--muted); }
