/* ============================================================
   GARAGE SALE — styles.css
   ============================================================ */

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

:root {
    --color-primary:       #a8784f;
    --color-primary-dark:  #8a5e38;
    --color-primary-light: #f2e4d4;
    --color-bg:            #f8f4ef;
    --color-surface:       #ffffff;
    --color-text:          #2c2c2c;
    --color-text-muted:    #6b6b6b;
    --color-border:        #dfd4c6;
    --color-success:       #27ae60;
    --color-sold:          #e74c3c;
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.10);
    --shadow-lg:  0 8px 24px rgba(0,0,0,0.12);
    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  16px;
    --font-sans:  'Segoe UI', system-ui, -apple-system, sans-serif;
    --max-width:  1200px;
    --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--color-primary-dark); }

/* --- Layout --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
    background-color: var(--color-surface);
    border-bottom: 3px solid var(--color-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.site-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.site-logo span { color: var(--color-text); }

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}
.nav-links a {
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color var(--transition), color var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    background:
        linear-gradient(to bottom, rgba(18,12,6,0.55) 0%, rgba(18,12,6,0.38) 100%),
        url('https://images.pexels.com/photos/13874114/pexels-photo-13874114.jpeg?auto=compress&cs=tinysrgb&w=1600&fit=max')
        center / cover no-repeat;
    color: white;
    padding: 5rem 1.5rem 4rem;
    text-align: center;
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero h1 {
    font-size: clamp(1.9rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.45);
}
.hero .tagline {
    font-size: 1.05rem;
    opacity: 0.9;
}
.hero-meta {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.4rem;
}
.hero-badge {
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 100px;
    padding: 0.4rem 1rem;
    font-size: 0.88rem;
    font-weight: 500;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--color-border);
    border-radius: 1px;
}

/* ============================================================
   LOCATION / MAP SECTION
   ============================================================ */
.location-section {
    padding: 2.5rem 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.location-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .location-layout {
        grid-template-columns: 1fr 320px;
        align-items: start;
    }
}

#map {
    height: 340px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.location-info {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.4rem;
    box-shadow: var(--shadow-sm);
}
.location-info h3 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}
.location-info h3:first-child { margin-top: 0; }
.location-info p {
    color: var(--color-text-muted);
    font-size: 0.92rem;
    margin-bottom: 0.25rem;
}
.address-line {
    font-weight: 600;
    color: var(--color-text) !important;
    font-size: 0.95rem !important;
}

/* ============================================================
   ITEMS SECTION
   ============================================================ */
.items-section {
    padding: 2rem 1.5rem 3rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* --- Filter Buttons --- */
.filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}
.filter-btn {
    padding: 0.45rem 1.1rem;
    border: 2px solid var(--color-border);
    border-radius: 100px;
    background: var(--color-surface);
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-sans);
}
.filter-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}
.filter-count {
    background: rgba(255,255,255,0.25);
    border-radius: 100px;
    padding: 0.05em 0.45em;
    font-size: 0.78em;
    margin-left: 0.3em;
}
.filter-btn:not(.active) .filter-count {
    background: var(--color-bg);
    color: var(--color-text-muted);
}

/* --- Item Grid --- */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

/* --- Item Card --- */
.item-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}
.item-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.card-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--color-bg);
}
.card-image-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.item-card:hover .card-image img { transform: scale(1.04); }

.card-category-badge {
    position: absolute;
    top: 0.55rem;
    left: 0.55rem;
    background: var(--color-primary);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
}
.card-status-badge {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    color: white;
}
.card-status-badge.available { background: var(--color-success); }
.card-status-badge.sold      { background: var(--color-sold); }

.no-photo {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5ede2, #ead8c1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--color-text-muted);
    font-size: 0.82rem;
}
.no-photo-icon {
    font-size: 2.2rem;
    opacity: 0.45;
}

.card-body {
    padding: 1rem 1.1rem 1.1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.card-description {
    font-size: 0.83rem;
    color: var(--color-text-muted);
    flex: 1;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}
.card-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}
.card-price .currency {
    font-size: 0.8rem;
    font-weight: 600;
    vertical-align: super;
}
.card-price.poa {
    font-size: 1rem;
}

.btn-read-more {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.83rem;
    font-weight: 600;
    transition: background var(--transition);
}
.btn-read-more:hover {
    background: var(--color-primary-dark);
    color: white;
}

/* --- Empty state --- */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--color-text-muted);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 2.5rem 1.5rem;
    margin-top: 2rem;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 600px) {
    .footer-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .footer-inner { grid-template-columns: repeat(3, 1fr); }
}
.footer-section h4 {
    color: var(--color-primary);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.7rem;
}
.footer-section p,
.footer-section a {
    color: #aaa;
    font-size: 0.88rem;
    line-height: 1.9;
}
.footer-section a:hover { color: var(--color-primary); }
.footer-bottom {
    max-width: var(--max-width);
    margin: 1.5rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
    text-align: center;
    font-size: 0.78rem;
    color: #555;
}

/* ============================================================
   ITEM DETAIL PAGE
   ============================================================ */
.page-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 1.5rem;
}
.breadcrumb {
    max-width: var(--max-width);
    margin: 0 auto;
    font-size: 0.83rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.breadcrumb a { color: var(--color-primary); }
.breadcrumb-sep { opacity: 0.4; }

.item-detail {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 768px) {
    .item-detail {
        grid-template-columns: 1.2fr 1fr;
        align-items: start;
    }
}

.item-pickup-map-section {
    max-width: var(--max-width);
    margin: 1.5rem auto 0;
    padding: 0 1.5rem 2.5rem;
}

/* -- Gallery -- */
.gallery-main {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    aspect-ratio: 4 / 3;
    cursor: zoom-in;
    position: relative;
}
.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-main .no-photo {
    position: absolute;
    inset: 0;
}

.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
}
.gallery-thumb {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color var(--transition);
    flex-shrink: 0;
    background: var(--color-bg);
}
.gallery-thumb:hover,
.gallery-thumb.active { border-color: var(--color-primary); }
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* -- Item Info panel -- */
.item-info {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}
.item-info h1 {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 0.5rem;
}
.item-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.badge {
    display: inline-block;
    padding: 0.22rem 0.7rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-category  { background: var(--color-primary-light); color: var(--color-primary-dark); }
.badge-condition { background: #e8f5e9; color: #2e7d32; }
.badge-available { background: #e8f5e9; color: #2e7d32; }
.badge-sold      { background: #ffebee; color: #c62828; }

/* -- Pricing card -- */
.pricing-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.2rem;
}
.price-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}
.asking-price {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--color-primary);
    display: flex;
    align-items: baseline;
    gap: 0.15rem;
    line-height: 1;
}
.asking-price .currency {
    font-size: 1rem;
    font-weight: 600;
}
.retail-estimate {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.84rem;
    color: var(--color-text-muted);
}
.retail-estimate strong { color: var(--color-text); }

/* -- Components list -- */
.components-list { list-style: none; }
.components-list li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}
.components-list li:last-child { border-bottom: none; }
.components-list li::before {
    content: '✓';
    color: var(--color-success);
    font-weight: 700;
    flex-shrink: 0;
}

/* -- Details table -- */
.details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.details-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}
.details-table tr:nth-child(even) td { background: var(--color-bg); }
.details-table td:first-child {
    font-weight: 600;
    color: var(--color-text-muted);
    width: 40%;
    white-space: nowrap;
}

/* -- Contact CTA -- */
.contact-cta {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    border-radius: var(--radius-md);
    padding: 1.2rem;
    text-align: center;
}
.contact-cta h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.contact-cta p {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.75rem;
}
.contact-cta a {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: underline;
}
.contact-cta a:hover { opacity: 0.85; }

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-text-muted);
    font-size: 0.88rem;
    transition: color var(--transition);
}
.btn-back:hover { color: var(--color-primary); }

.sub-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: 0.6rem;
    font-weight: 600;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.lightbox.open { display: flex; }
.lightbox-img-wrap {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-img-wrap img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius-sm);
    opacity: 0.8;
    transition: opacity var(--transition), background var(--transition);
}
.lightbox-close:hover { opacity: 1; background: rgba(255,255,255,0.2); }
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
    line-height: 1;
    transition: background var(--transition);
}
.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ============================================================
   ABOUT / CONTACT PAGE
   ============================================================ */
.about-content {
    max-width: 820px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3rem;
}
.about-content h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
}
.about-content h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 2rem 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}
.about-content p {
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 0.75rem;
}
.about-content ol,
.about-content ul {
    padding-left: 1.5rem;
    color: var(--color-text-muted);
    line-height: 2.1;
}
.about-content a { font-weight: 500; }

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}
.contact-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}
.contact-card-icon { font-size: 1.4rem; flex-shrink: 0; }
.contact-card h4 {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: 0.2rem;
}
.contact-card a,
.contact-card p {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.92rem;
}
.contact-card a:hover { color: var(--color-primary); }

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 480px) {
    .hero { padding: 2rem 1rem; }
    .items-section,
    .location-section { padding-left: 1rem; padding-right: 1rem; }
    .lightbox-nav { display: none; }
    .item-detail { padding: 1rem; }
}
