/* =====================================================================
   FILE     : styles.css
   PURPOSE  : Public gallery — refined editorial aesthetic.
              Playfair Display headlines + DM Sans body.
              Warm neutral palette with deep forest green accents.
   ===================================================================== */

/* ── Reset & Variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --cream:      #F7F4EF;
    --warm-white: #FDFCFA;
    --stone:      #E8E3D9;
    --stone-mid:  #C8C0B0;
    --stone-dark: #8A8070;
    --ink:        #1C1A17;
    --ink-mid:    #4A4640;
    --green:      #2D5A3D;
    --green-light:#3D7A52;
    --green-pale: #EAF2ED;
    --red:        #C0392B;
    --red-pale:   #FDECEA;
    --gold:       #B8860B;
    --shadow-sm:  0 1px 3px rgba(28,26,23,.08);
    --shadow-md:  0 4px 16px rgba(28,26,23,.10);
    --shadow-lg:  0 8px 32px rgba(28,26,23,.12);
    --radius:     10px;
    --radius-sm:  6px;
    --transition: 0.2s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--cream);
    color: var(--ink);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-light); }
img { display: block; max-width: 100%; }

/* ── Header ── */
.site-header {
    background: var(--warm-white);
    border-bottom: 1px solid var(--stone);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.logo-mark {
    width: 36px; height: 36px;
    background: var(--green);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.05em;
}
.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
}
.site-nav { display: flex; gap: 24px; }
.site-nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-mid);
    letter-spacing: 0.02em;
    transition: color var(--transition);
}
.site-nav a:hover { color: var(--green); }

/* ── Main ── */
.site-main { flex: 1; }
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Page Hero ── */
.page-hero {
    background: var(--warm-white);
    border-bottom: 1px solid var(--stone);
    padding: 40px 24px 32px;
}
.page-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
}
.page-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: 8px;
}
.page-hero p {
    font-size: 16px;
    color: var(--stone-dark);
    max-width: 560px;
}

/* ── Filter Bar ── */
.filter-bar {
    background: var(--warm-white);
    border-bottom: 1px solid var(--stone);
    padding: 16px 24px;
    position: sticky;
    top: 64px;
    z-index: 90;
}
.filter-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.filter-search {
    flex: 1;
    min-width: 200px;
    position: relative;
}
.filter-search input {
    width: 100%;
    padding: 9px 12px 9px 38px;
    border: 1px solid var(--stone);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: var(--cream);
    color: var(--ink);
    transition: border-color var(--transition);
}
.filter-search input:focus {
    outline: none;
    border-color: var(--green);
    background: var(--warm-white);
}
.filter-search::before {
    content: '⌕';
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--stone-dark);
    font-size: 18px;
    pointer-events: none;
}
.filter-select {
    padding: 9px 32px 9px 12px;
    border: 1px solid var(--stone);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: var(--cream);
    color: var(--ink);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A8070' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
    transition: border-color var(--transition);
}
.filter-select:focus { outline: none; border-color: var(--green); }

.filter-price {
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-price input {
    width: 90px;
    padding: 9px 10px;
    border: 1px solid var(--stone);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: var(--cream);
    color: var(--ink);
}
.filter-price input:focus { outline: none; border-color: var(--green); }
.filter-price span { color: var(--stone-dark); font-size: 13px; }

.btn-filter {
    padding: 9px 20px;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}
.btn-filter:hover { background: var(--green-light); }

.btn-reset {
    padding: 9px 16px;
    background: transparent;
    color: var(--stone-dark);
    border: 1px solid var(--stone);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-reset:hover { border-color: var(--ink-mid); color: var(--ink); }

/* ── Results Bar ── */
.results-bar {
    max-width: 1200px;
    margin: 24px auto 16px;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.results-count { font-size: 14px; color: var(--stone-dark); }
.sort-wrap { display: flex; align-items: center; gap: 8px; }
.sort-wrap label { font-size: 13px; color: var(--stone-dark); }

/* ── Grid ── */
.items-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 48px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* ── Item Card ── */
.item-card {
    background: var(--warm-white);
    border: 1px solid var(--stone);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
}
.item-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.item-card.is-sold { opacity: 0.72; }

.card-image-wrap {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #fff;
}
.card-image-wrap img {
    width: 100%; height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}
.item-card:hover .card-image-wrap img { opacity: 0.92; }

.card-badge {
    position: absolute;
    top: 10px; left: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.badge-sale   { background: var(--green); color: #fff; }
.badge-sold   { background: var(--ink-mid); color: #fff; }
.badge-posted { background: var(--gold); color: #fff; }
.badge-lot    { background: var(--green-pale); color: var(--green); border: 1px solid var(--green); }

.price-label {
    font-size: 12px;
    color: var(--stone-dark);
    align-self: flex-end;
    padding-bottom: 2px;
}

/* ── Item detail — thumbnail gallery ── */
.detail-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.detail-thumb {
    width: 72px; height: 54px;
    border: 2px solid var(--stone);
    border-radius: var(--radius-sm);
    overflow: hidden;
    padding: 0;
    background: #fff;
    cursor: pointer;
    transition: border-color var(--transition), opacity var(--transition);
    flex-shrink: 0;
}
.detail-thumb img {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
}
.detail-thumb:hover { border-color: var(--green); }
.detail-thumb.active {
    border-color: var(--green);
    opacity: 1;
}
.detail-thumb:not(.active) { opacity: 0.65; }
.lot-pieces-remaining { margin-bottom: 4px; }
.lot-pieces-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--green-pale);
    color: var(--green);
    border: 1px solid var(--green);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}
.card-category {
    font-size: 11px;
    font-weight: 500;
    color: var(--stone-dark);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-condition {
    font-size: 12px;
    color: var(--stone-dark);
}
.card-price {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--stone);
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.price-current {
    font-size: 20px;
    font-weight: 600;
    color: var(--green);
}
.price-current.is-sale { color: var(--green); }
.price-original {
    font-size: 14px;
    color: var(--stone-dark);
    text-decoration: line-through;
}
.price-sold {
    font-size: 16px;
    font-weight: 500;
    color: var(--stone-dark);
}

/* ── No Results ── */
.no-results {
    max-width: 1200px;
    margin: 64px auto;
    padding: 0 24px;
    text-align: center;
}
.no-results h2 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: var(--ink);
    margin-bottom: 8px;
}
.no-results p { color: var(--stone-dark); }

/* ── Pagination ── */
.pagination {
    max-width: 1200px;
    margin: 0 auto 48px;
    padding: 0 24px;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px; height: 38px;
    padding: 0 10px;
    border: 1px solid var(--stone);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--ink-mid);
    transition: all var(--transition);
    background: var(--warm-white);
}
.pagination a:hover { border-color: var(--green); color: var(--green); }
.pagination .current {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
    font-weight: 600;
}
.pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ── Detail Page ── */
.detail-wrap {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 24px 64px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
.detail-images { position: sticky; top: 84px; }
.detail-main-image {
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    aspect-ratio: 4/3;
}
.detail-main-image img {
    width: 100%; height: 100%;
    object-fit: contain;
}
.detail-info { display: flex; flex-direction: column; gap: 20px; }
.detail-breadcrumb {
    font-size: 13px;
    color: var(--stone-dark);
    display: flex;
    gap: 6px;
    align-items: center;
}
.detail-breadcrumb a { color: var(--stone-dark); }
.detail-breadcrumb a:hover { color: var(--green); }
.detail-category {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green);
}
.detail-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 700;
    line-height: 1.25;
    color: var(--ink);
}
.detail-condition {
    font-size: 13px;
    color: var(--stone-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}
.detail-price-box {
    background: var(--green-pale);
    border: 1px solid #C3DFC8;
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.detail-price-box.is-sold {
    background: var(--stone);
    border-color: var(--stone-mid);
}
.detail-price-current {
    font-size: 32px;
    font-weight: 700;
    color: var(--green);
    font-family: 'Playfair Display', serif;
}
.detail-price-original {
    font-size: 16px;
    color: var(--stone-dark);
    text-decoration: line-through;
}
.detail-price-label {
    font-size: 13px;
    color: var(--stone-dark);
}
.detail-retail-value {
    font-size: 13px;
    color: var(--stone-dark);
    margin-top: 4px;
}
.detail-you-save {
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
    margin-top: 6px;
}
.detail-catalog-no {
    font-size: 12px;
    color: var(--stone-dark);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--stone);
    letter-spacing: 0.02em;
}
.detail-sold-label {
    font-size: 20px;
    font-weight: 600;
    color: var(--stone-dark);
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--green);
    color: #fff;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition);
    width: 100%;
}
.btn-contact:hover { background: var(--green-light); color: #fff; transform: translateY(-1px); }

.detail-description {
    border-top: 1px solid var(--stone);
    padding-top: 20px;
}
.detail-description h2 {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--ink);
}
.detail-description p { font-size: 15px; color: var(--ink-mid); line-height: 1.7; margin-bottom: 8px; }

/* ── Contact Form ── */
.contact-wrap {
    max-width: 640px;
    margin: 48px auto;
    padding: 0 24px 64px;
}
.contact-wrap h1 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--ink);
}
.contact-wrap .subtitle {
    color: var(--stone-dark);
    margin-bottom: 32px;
    font-size: 15px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}
.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-mid);
    letter-spacing: 0.02em;
}
.form-group input,
.form-group textarea,
.form-group select {
    padding: 11px 14px;
    border: 1px solid var(--stone);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    background: var(--warm-white);
    color: var(--ink);
    transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--green);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-error { color: var(--red); font-size: 13px; }
.form-success {
    background: var(--green-pale);
    border: 1px solid #C3DFC8;
    border-radius: var(--radius);
    padding: 16px 20px;
    color: var(--green);
    font-weight: 500;
    margin-bottom: 24px;
}
.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition);
}
.btn-submit:hover { background: var(--green-light); }

/* ── Footer ── */
.site-footer {
    background: var(--ink);
    padding: 32px 24px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-copy { font-size: 13px; color: var(--stone-mid); }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a { font-size: 13px; color: var(--stone-mid); transition: color var(--transition); }
.footer-nav a:hover { color: #fff; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .detail-wrap { grid-template-columns: 1fr; gap: 24px; }
    .detail-images { position: static; }
    .filter-inner { flex-direction: column; align-items: stretch; }
    .filter-search { min-width: unset; }
    .filter-price { flex-wrap: wrap; }
    .items-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
}
@media (max-width: 480px) {
    .items-grid { grid-template-columns: 1fr; }
    .header-inner { padding: 0 16px; }
}

/* ── Admin nav link ── */
.nav-admin {
    font-size: 13px !important;
    color: var(--stone-dark) !important;
    border: 1px solid var(--stone);
    border-radius: var(--radius-sm);
    padding: 4px 10px !important;
    transition: all var(--transition);
}
.nav-admin:hover {
    border-color: var(--green);
    color: var(--green) !important;
}

/* ── Splash / Landing Page (index.php) ── */
.splash-hero {
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    background: var(--warm-white);
}
.splash-mark {
    width: 80px; height: 80px;
    background: var(--green);
    color: #fff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    margin: 0 auto 32px;
    letter-spacing: 0.02em;
}
.splash-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.15;
    margin-bottom: 16px;
    max-width: 680px;
}
.splash-tagline {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--stone-dark);
    max-width: 480px;
    margin: 0 auto 12px;
    line-height: 1.6;
}
.splash-count {
    font-size: 14px;
    color: var(--stone-mid);
    margin-bottom: 48px;
}
.splash-count strong {
    color: var(--green);
    font-weight: 600;
}
.splash-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 48px;
}
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--green);
    color: #fff;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover {
    background: var(--green-light);
    color: #fff;
    transform: translateY(-1px);
}
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--stone);
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
}
.btn-outline:hover {
    border-color: var(--green);
    color: var(--green);
    transform: translateY(-1px);
}
.splash-divider {
    width: 40px;
    height: 2px;
    background: var(--stone);
    margin: 0 auto 32px;
    border-radius: 1px;
}
.splash-footer-links {
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: var(--stone-dark);
    flex-wrap: wrap;
    justify-content: center;
}
.splash-footer-links a {
    color: var(--stone-dark);
    transition: color var(--transition);
}
.splash-footer-links a:hover { color: var(--green); }

/* ── Set Includes section ── */
.set-includes {
    background: var(--cream);
    border-top: 2px solid var(--stone);
    padding: 40px 24px 56px;
}
.set-includes-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.set-includes-heading {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--stone);
}
.set-includes-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.set-item {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    background: var(--warm-white);
    border: 1px solid var(--stone);
    border-radius: var(--radius);
    padding: 20px;
    align-items: start;
}
.set-item-images { display: flex; flex-direction: column; gap: 8px; }
.set-item-main-wrap {
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #fff;
    aspect-ratio: 4/3;
}
.set-item-main-img {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
}
.set-item-thumbs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.set-item-thumb {
    width: 56px; height: 42px;
    border: 2px solid var(--stone);
    border-radius: var(--radius-sm);
    overflow: hidden;
    padding: 0;
    background: #fff;
    cursor: pointer;
    transition: border-color var(--transition), opacity var(--transition);
}
.set-item-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.set-item-thumb:hover { border-color: var(--green); }
.set-item-thumb.active { border-color: var(--green); }
.set-item-thumb:not(.active) { opacity: 0.65; }
.set-item-info { display: flex; flex-direction: column; gap: 10px; }
.set-item-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
}
.set-item-details {
    font-size: 14px;
    color: var(--ink-mid);
    line-height: 1.7;
}

@media (max-width: 640px) {
    .set-item { grid-template-columns: 1fr; }
    .set-item-main-wrap { max-width: 100%; }
}