/* Fretwork — Fine & Boutique Guitars */

:root {
    --bg: #14100c;
    --bg-raise: #1d1712;
    --bg-card: #211a14;
    --line: #34291f;
    --text: #ece4d6;
    --muted: #a2937f;
    --brass: #c9a86a;
    --brass-bright: #e0be7c;
    --ember: #d97b3f;
    --danger: #d96a5a;
    --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brass); text-decoration: none; }
a:hover { color: var(--brass-bright); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, .logo-mark { font-family: var(--serif); font-weight: 400; }

/* ---------- header ---------- */
.site-header {
    border-bottom: 1px solid var(--line);
    background: rgba(20, 16, 12, 0.96);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-top: 20px;
    padding-bottom: 20px;
}
.logo { display: flex; align-items: baseline; gap: 14px; }
.logo-mark {
    font-size: 28px;
    letter-spacing: 0.04em;
    color: var(--text);
}
.logo-mark.small { font-size: 22px; color: var(--brass); }
.logo-sub {
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
}
.site-nav a {
    margin-left: 28px;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}
.site-nav a:hover { color: var(--brass-bright); }

/* ---------- hero ---------- */
.hero { padding: 90px 0 60px; }
.eyebrow {
    font-size: 12px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: 18px;
}
.hero h1 {
    font-size: clamp(42px, 6.5vw, 76px);
    line-height: 1.05;
    font-weight: 300;
    margin-bottom: 24px;
}
.lede { max-width: 560px; color: var(--muted); font-size: 18px; }

/* ---------- gallery grid ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
    padding-bottom: 90px;
}
.card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    color: var(--text);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
    transform: translateY(-4px);
    border-color: #4d3d2b;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    color: var(--text);
}
.card-image { position: relative; aspect-ratio: 3 / 4; overflow: hidden; }
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.card:hover .card-image img { transform: scale(1.04); }
.card.is-sold .card-image img { filter: grayscale(0.55) brightness(0.75); }

.badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 12px;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border-radius: 999px;
}
.badge-featured { background: var(--brass); color: #191207; }
.badge-sold { background: rgba(20, 16, 12, 0.85); color: var(--muted); border: 1px solid var(--line); }

.card-body { padding: 18px 20px 22px; }
.card-brand {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: 6px;
}
.card-name { font-size: 22px; margin-bottom: 4px; }
.card-meta { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.card-price { font-size: 18px; font-weight: 500; }
.sold-text { color: var(--muted); font-style: italic; font-weight: 400; }

/* ---------- about ---------- */
.about { border-top: 1px solid var(--line); background: var(--bg-raise); }
.about-inner { padding: 70px 24px 80px; max-width: 720px; }
.about h2 { font-size: 30px; margin-bottom: 18px; }
.about p { color: var(--muted); margin-bottom: 14px; }

/* ---------- detail page ---------- */
.detail { padding: 40px 24px 90px; }
.breadcrumb { margin-bottom: 28px; font-size: 14px; }
.detail-grid {
    display: grid;
    grid-template-columns: minmax(320px, 460px) 1fr;
    gap: 56px;
    align-items: start;
}
.detail-image {
    position: sticky;
    top: 100px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
}
.detail-image img { width: 100%; display: block; }
.detail-info h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.1; margin-bottom: 14px; }
.tagline { font-size: 19px; color: var(--muted); font-style: italic; margin-bottom: 28px; }

.price-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 10px; }
.price { font-size: 32px; font-family: var(--serif); color: var(--brass-bright); }
.ship-note { font-size: 13px; color: var(--muted); margin-bottom: 30px; }

.description p { margin-bottom: 16px; color: #d6cbbb; }

.specs-title { font-size: 24px; margin: 36px 0 8px; }
.specs { border-top: 1px solid var(--line); }
.spec-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.spec-row dt {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 3px;
}
.spec-row dd { font-size: 15px; }

/* ---------- buttons ---------- */
.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    font-family: var(--sans);
    transition: background 0.2s ease, transform 0.15s ease;
}
.btn-primary { background: var(--brass); color: #191207; }
.btn-primary:hover { background: var(--brass-bright); color: #191207; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--brass); border: 1px solid var(--brass); }
.btn-secondary:hover { background: rgba(201, 168, 106, 0.1); }
.btn-block { width: 100%; margin-top: 8px; }

/* ---------- checkout ---------- */
.checkout { padding: 40px 24px 90px; }
.checkout-title { font-size: clamp(34px, 4vw, 52px); margin-bottom: 36px; }
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 48px;
    align-items: start;
}
.checkout-form h2 { font-size: 22px; margin: 28px 0 14px; }
.checkout-form h2:first-child { margin-top: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.input, .checkout-form .input {
    margin-bottom: 16px;
}
.checkout-form label {
    display: block;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}
.checkout-form input,
.checkout-form textarea {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    padding: 12px 14px;
}
.checkout-form input:focus,
.checkout-form textarea:focus {
    outline: none;
    border-color: var(--brass);
    box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.15);
}
.checkout-form .error input,
.checkout-form .error textarea,
.checkout-form input.form-error,
.checkout-form textarea.form-error { border-color: var(--danger); }
.error-message {
    color: var(--danger);
    font-size: 13px;
    margin: -12px 0 14px;
    display: block;
}

.payment-note {
    background: var(--bg-raise);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px 22px;
    margin: 26px 0 8px;
}
.payment-note h2 { margin: 0 0 8px; }
.payment-note p { font-size: 14px; color: var(--muted); }

.order-summary { position: sticky; top: 100px; }
.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 24px;
}
.summary-image { border-radius: 8px; overflow: hidden; margin-bottom: 18px; }
.summary-image img { width: 100%; display: block; }
.summary-card h3 { font-size: 22px; margin-bottom: 2px; }
.summary-lines { margin-top: 18px; border-top: 1px solid var(--line); }
.summary-lines > div {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}
.summary-lines dt { color: var(--muted); }
.summary-total { font-size: 17px !important; font-weight: 600; }
.summary-total dt { color: var(--text) !important; }
.summary-fine { font-size: 12px; color: var(--muted); margin-top: 14px; }

/* ---------- confirmation ---------- */
.confirmation { padding: 70px 24px 100px; display: flex; justify-content: center; }
.confirm-card { max-width: 640px; }
.confirm-card h1 { font-size: clamp(40px, 5vw, 64px); margin-bottom: 18px; }
.confirm-card .lede { margin-bottom: 34px; }
.confirm-summary {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 22px;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 36px;
}
.confirm-summary .summary-image { margin: 0; }
.confirm-card h2 { font-size: 24px; margin-bottom: 14px; }
.next-steps { margin: 0 0 36px 20px; color: #d6cbbb; }
.next-steps li { margin-bottom: 10px; }

/* ---------- flash messages ---------- */
.message {
    padding: 14px 20px;
    border-radius: 8px;
    margin: 20px 0 0;
    font-size: 14px;
    background: var(--bg-raise);
    border: 1px solid var(--line);
}
.message.error { border-color: var(--danger); color: var(--danger); }
.message.success { border-color: var(--brass); color: var(--brass-bright); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #0f0c09; }
.footer-inner {
    padding-top: 44px;
    padding-bottom: 44px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-note { font-size: 13px; color: var(--muted); margin-top: 10px; }
.footer-fine { font-size: 12px; color: #6d6152; }

/* ---------- admin ---------- */
.admin-main { padding: 40px 0 90px; }
.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.admin-head h1 { font-size: clamp(30px, 4vw, 42px); }

.admin-login { max-width: 380px; margin: 80px auto; }
.admin-login h1 { font-size: 36px; margin-bottom: 10px; }
.admin-login .lede { margin-bottom: 26px; font-size: 15px; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    font-size: 14px;
}
.admin-table th, .admin-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.admin-table th {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--bg-raise);
}
.admin-table tbody tr:hover { background: rgba(201, 168, 106, 0.04); }
.admin-table .actions { white-space: nowrap; }
.admin-table .actions a { margin-right: 14px; }
.table-sub { font-size: 12px; color: var(--muted); }
.thumb-cell { width: 56px; }
.admin-thumb {
    width: 44px;
    height: 58px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}
.link-danger { color: var(--danger); }
.link-danger:hover { color: #e88b7d; }

.status-pill {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--line);
    color: var(--muted);
}
.status-available, .status-paid { border-color: var(--brass); color: var(--brass-bright); }
.status-sold, .status-cancelled { border-color: var(--danger); color: var(--danger); }
.status-shipped { border-color: #7fb0bd; color: #a8cfd8; }

.admin-form { max-width: 760px; }
.admin-form select {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    padding: 12px 14px;
}
.admin-form input[type="checkbox"] { width: auto; margin-right: 8px; }
.admin-form-actions { display: flex; gap: 14px; margin-top: 26px; }

.admin-order-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}
.admin-order-grid h2 { font-size: 22px; margin-bottom: 14px; }
.admin-order-grid h2 + h2, .status-form { margin-top: 10px; }
.status-form { display: flex; gap: 12px; align-items: flex-start; }
.status-form select {
    background: var(--bg-raise);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    padding: 12px 14px;
    font-size: 15px;
}
.status-form + .summary-fine { margin-top: 12px; }
.admin-order-grid .confirm-summary { margin-bottom: 16px; }

@media (max-width: 900px) {
    .admin-order-grid { grid-template-columns: 1fr; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .detail-grid, .checkout-grid { grid-template-columns: 1fr; }
    .detail-image, .order-summary { position: static; }
    .order-summary { order: -1; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
}
