/* Jack Dalton's Gunworks – listings. Colors match the logo: black, gold, white, red for SOLD. */
:root {
	--jdg-ink: #121212;      /* logo black */
	--jdg-accent: #7d5f17;   /* dark gold (prices, hovers) */
	--jdg-brass: #c49a48;    /* logo gold */
	--jdg-paper: #ffffff;    /* white card */
	--jdg-line: #e3e1dc;
	--jdg-sold: #a4161a;     /* SOLD red */
	--jdg-pending: #b26a00;
}

/* ---------- Grid ---------- */
.jdg-grid { display: grid; gap: 28px; margin: 0 0 30px; }
.jdg-cols-1 { grid-template-columns: 1fr; }
.jdg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.jdg-cols-3 { grid-template-columns: repeat(3, 1fr); }
.jdg-cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .jdg-cols-3, .jdg-cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .jdg-grid { grid-template-columns: 1fr; } }

.jdg-card { background: var(--jdg-paper); border: 1px solid var(--jdg-line); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.jdg-card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .15); transform: translateY(-2px); }
.jdg-card-img { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #f3f3f3; }
.jdg-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jdg-noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: #6b6b6b; font-style: italic; }
.jdg-card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.jdg-card-title { font-size: 18px; line-height: 1.3; margin: 0 0 6px; padding: 0; }
.jdg-card-title a { color: var(--jdg-ink); text-decoration: none; }
.jdg-sold-tag { color: var(--jdg-sold); font-weight: 800; }
.jdg-card-cal { font-size: 14px; color: #5c5c5c; margin-bottom: 6px; }
.jdg-card-price { font-size: 20px; font-weight: 700; color: var(--jdg-accent); margin: auto 0 12px; padding-top: 6px; }
.jdg-was { text-decoration: line-through; color: #8a8a8a; font-weight: 500; font-size: 16px; }

/* Sold cards stay visible, just muted */
.jdg-is-sold .jdg-card-img img { filter: grayscale(35%) brightness(.9); }

/* Diagonal ribbon */
.jdg-ribbon { position: absolute; top: 22px; left: -46px; width: 180px; transform: rotate(-45deg); background: var(--jdg-sold); color: #fff; text-align: center; font-weight: 900; letter-spacing: 3px; font-size: 15px; padding: 6px 0; box-shadow: 0 2px 6px rgba(0,0,0,.35); z-index: 2; }
.jdg-ribbon-pending { background: var(--jdg-pending); font-size: 12px; letter-spacing: 2px; }

/* Buttons */
.jdg-btn { display: inline-block; align-self: flex-start; background: var(--jdg-ink); color: #fff !important; padding: 10px 20px; border: 0; border-radius: 3px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 13px; text-decoration: none; cursor: pointer; transition: background .2s; }
.jdg-btn:hover { background: var(--jdg-accent); }
.jdg-is-sold .jdg-card .jdg-btn, .jdg-card.jdg-is-sold .jdg-btn { background: #5c5c5c; }

/* ---------- Single listing ---------- */
.jdg-single { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 10px 40px; margin-bottom: 30px; }
.jdg-single > .jdg-gallery { grid-column: 1; }
.jdg-single > .jdg-side { grid-column: 2; }
.jdg-single > .jdg-gallery + .jdg-side { grid-row: 1; }
.jdg-single > .jdg-side:first-child { grid-column: 1 / -1; }
.jdg-single > .jdg-video-section, .jdg-single > .jdg-desc, .jdg-single > .jdg-inquiry { grid-column: 1 / -1; }
@media (max-width: 900px) { .jdg-single { grid-template-columns: 1fr; } .jdg-single > * { grid-column: 1 !important; grid-row: auto !important; } }

.jdg-main { position: relative; overflow: hidden; border-radius: 4px; background: #f3f3f3; }
.jdg-main img { width: 100%; height: auto; display: block; }
.jdg-main .jdg-ribbon { top: 34px; left: -52px; width: 220px; font-size: 20px; padding: 8px 0; }
.jdg-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.jdg-thumb { padding: 0; border: 2px solid transparent; background: none; width: 76px; height: 76px; cursor: pointer; border-radius: 3px; overflow: hidden; }
.jdg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jdg-thumb.is-active { border-color: var(--jdg-brass); }

.jdg-buybox { background: var(--jdg-paper); border: 1px solid var(--jdg-line); border-radius: 4px; padding: 20px 22px; margin-bottom: 10px; }
.jdg-price { font-size: 32px; font-weight: 800; color: var(--jdg-accent); line-height: 1.1; margin-bottom: 6px; }
.jdg-cal { margin-bottom: 14px; color: #5c5c5c; }
.jdg-phone { margin-top: 10px; font-size: 14px; }
.jdg-status-banner { display: inline-block; color: #fff; font-weight: 900; letter-spacing: 3px; padding: 6px 16px; margin-bottom: 10px; border-radius: 3px; }
.jdg-banner-sold { background: var(--jdg-sold); font-size: 22px; }
.jdg-banner-pending { background: var(--jdg-pending); }
.jdg-sold-note { background: var(--jdg-sold); color: #fff; text-align: center; font-weight: 700; letter-spacing: 1px; padding: 8px; margin-bottom: 20px; border-radius: 3px; }

.jdg-h { font-size: 20px; color: var(--jdg-ink); border-bottom: 2px solid var(--jdg-brass); padding-bottom: 6px; margin: 18px 0 10px; }
ul.jdg-work { list-style: none; margin: 0; padding: 0 !important; }
ul.jdg-work li { position: relative; padding: 4px 0 4px 26px; }
ul.jdg-work li::before { content: "\2605"; position: absolute; left: 0; color: var(--jdg-brass); }
.jdg-videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.jdg-video iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.jdg-desc { margin-bottom: 30px; }

/* Inquiry form */
.jdg-inquiry { background: var(--jdg-paper); border: 1px solid var(--jdg-line); border-radius: 4px; padding: 10px 24px 20px; margin-top: 20px; }
.jdg-inquiry label { display: block; font-weight: 600; font-size: 14px; color: var(--jdg-ink); }
.jdg-inquiry input, .jdg-inquiry textarea { width: 100%; padding: 10px; border: 1px solid #c8c5be; border-radius: 3px; background: #fff; font-weight: 400; margin-top: 4px; }
.jdg-inquiry input[readonly] { background: #f0eee9; }
.jdg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .jdg-row { grid-template-columns: 1fr; } }
.jdg-hp { position: absolute !important; left: -9999px !important; }
.jdg-notice { padding: 10px 14px; border-radius: 3px; font-weight: 600; }
.jdg-ok { background: #edf7ee; color: #1b5e20; }
.jdg-err { background: #fdecec; color: var(--jdg-sold); }

.jdg-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: flex; align-items: center; justify-content: center; z-index: 999999; cursor: zoom-out; }
.jdg-lightbox img { max-width: 94vw; max-height: 92vh; }
.jdg-empty { font-style: italic; }
.jdg-privacy-note { font-size: 14px; color: #5c5c5c; margin: 0; }
