.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 34px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: .25s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card .thumb { height: 178px; display: block; position: relative; overflow: hidden; background: linear-gradient(135deg, #3e7c4f, #7cae6a); }
.card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.card .tag { display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--farm-earth); background: #fff; border: 1px solid #ecdcbf; border-radius: 6px; padding: 3px 9px; margin-bottom: 8px; }
.card h3 { font-size: 19px; margin: 6px 0 8px; }
.card h3 a { color: inherit; }
.card p { font-size: 14px; color: var(--muted); flex: 1; }
.meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.filter-btn { border: 1.5px solid #d9cdb0; background: #fff; color: #6a5d3f; font-weight: 700; font-size: 14px; padding: 9px 18px; border-radius: 999px; cursor: pointer; transition: .2s; }
.filter-btn.active { background: var(--farm-green); border-color: var(--farm-green); color: #fff; }
.filter-btn:hover { border-color: var(--farm-green); }

.product-detail-section { padding-top: 54px; }
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: start; }
.product-media { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; background: #f3f7f2; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { margin: 6px 0 12px; }
.price-lg { font-size: 34px; color: var(--farm-green); margin: 20px 0; }
.product-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.product-facts { display: grid; gap: 10px; margin-bottom: 24px; }
.product-facts > div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.product-facts dt { color: var(--muted); }
.product-facts dd { margin: 0; text-align: right; }
.product-desc { background: #f8faf7; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; font-size: 15px; line-height: 1.8; color: #3d4a40; }
.product-desc p { margin: 0; }

/* order modal */
.omod { position: fixed; inset: 0; background: rgba(16, 28, 46, .55); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 90; }
.omod.show { display: flex; }
.omod[hidden] { display: none; }
.ocard { background: #fff; border-radius: 16px; max-width: 460px; width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(10, 20, 40, .3); overflow: hidden; }
.ocard .oh { background: linear-gradient(135deg, #1f5f3a, #2f7d4a); color: #fff; padding: 16px 20px; font-weight: 800; font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.ocard .oh .x { cursor: pointer; font-size: 20px; line-height: 1; opacity: .85; background: none; border: none; color: #fff; }
.ocard .ob { padding: 18px 20px; overflow-y: auto; }
.ocard .pname { font-size: 14px; font-weight: 700; color: #2f7d4a; margin-bottom: 12px; }
.plist { max-height: 220px; overflow: auto; border: 1.5px solid #e3e8ef; border-radius: 10px; padding: 2px 0; }
.prow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; font-size: 14px; cursor: pointer; }
.prow:hover { background: #f2f7f4; }
.prow-main { display: flex; align-items: center; gap: 8px; }
.prow span i { font-style: normal; color: #8a95a5; font-size: 12px; margin-left: 6px; }
.prow input[type="number"] { width: 64px; text-align: center; padding: 4px 6px; border: 1.5px solid #e3e8ef; border-radius: 7px; font-size: 14px; }
.o2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.oform label, .ob label { display: block; font-size: 13px; font-weight: 700; color: #3a4454; margin: 10px 0 5px; }
.ob input, .ob textarea { width: 100%; padding: 10px 12px; border: 1.5px solid #e3e8ef; border-radius: 9px; font-size: 14px; font-family: inherit; }
.ob input:focus, .ob textarea:focus { outline: none; border-color: #2f7d4a; box-shadow: 0 0 0 3px rgba(47, 125, 74, .12); }
.ocard .ofoot { padding: 0 20px 18px; display: flex; gap: 10px; }
.ocard .ofoot .btn { flex: 1; }
.oresult { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #e6f1e7; color: #274a2f; font-size: 14px; font-weight: 600; display: none; }
.oresult.is-error { background: #fef2f2; color: #b91c1c; }

@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .product-detail { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .o2 { grid-template-columns: 1fr; }
  .ocard { max-height: calc(100vh - 20px); }
}
