/* Header — gilded navigation bar */
#cathedral-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, rgba(13,13,13,0.95) 0%, rgba(13,13,13,0.8) 100%);
    border-bottom: 1px solid var(--gold-dark);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#main-nav {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
}

#main-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cream-dark);
    position: relative;
}

#main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s;
}

#main-nav a:hover::after,
#main-nav a.active::after { width: 100%; }
#main-nav a:hover,
#main-nav a.active { color: var(--gold); }

/* Search bar */
#search-bar {
    width: 100%;
    max-width: 500px;
    margin-top: 0.5rem;
}

#search-input {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: rgba(245, 240, 232, 0.08);
    border: 1px solid var(--gold-dark);
    border-radius: 100px;
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(197, 164, 78, 0.15);
}

#search-input::placeholder {
    color: rgba(245, 240, 232, 0.4);
}

/* Hero section — compact banner so content is immediately visible */
#hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem 1rem 1rem;
}

.hero__content {
    max-width: 700px;
}

.hero__label {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gold, #C5A44E);
    margin-bottom: 0.5rem;
}

.hero__title {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--cream, #F5F0E8);
    line-height: 1.2;
    margin-bottom: 0.4rem;
}

.hero__patron {
    font-size: 0.9rem;
    color: rgba(245, 240, 232, 0.6);
    margin-bottom: 0.75rem;
}

.hero__cta {
    display: inline-block;
    padding: 0.6rem 1.75rem;
    background: linear-gradient(135deg, var(--gold, #C5A44E), var(--gold-light, #D4B75E));
    color: #0D0D0D;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(197, 164, 78, 0.3);
}

/* Quick browse area below hero */
#quick-browse {
    padding: 0 0 0.5rem;
}

@media (min-width: 1024px) {
    #hero { padding: 2rem 2rem 1.25rem; }
    .hero__title { font-size: 2.4rem; }
    .hero__patron { font-size: 1rem; }
}

/* Category grid — Gaudi archways */
#categories {
    padding: 1rem 1rem 1.5rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    background: rgba(245, 240, 232, 0.04);
    border: 1px solid rgba(197, 164, 78, 0.2);
    border-radius: 40px 40px 8px 8px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 8px 32px rgba(197, 164, 78, 0.15);
}

.category-card h3 {
    font-size: 1.1rem;
    margin-top: 0.5rem;
    color: var(--gold-light);
}

/* Product cards */
.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.product-card {
    background: rgba(245, 240, 232, 0.05);
    border: 1px solid rgba(197, 164, 78, 0.15);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card .info {
    padding: 1rem;
}

.product-card .name {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--cream);
}

.product-card .price {
    color: var(--gold);
    font-weight: 600;
    margin-top: 0.25rem;
}

.product-card .business {
    font-size: 0.8rem;
    color: rgba(245, 240, 232, 0.5);
    margin-top: 0.5rem;
}

/* Golden glow hover effect */
.glow-hover {
    transition: box-shadow 0.3s;
}
.glow-hover:hover {
    box-shadow: 0 0 30px rgba(197, 164, 78, 0.2);
}

/* Stained glass loading animation */
@keyframes rosary-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-rosary {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(197, 164, 78, 0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: rosary-spin 1s linear infinite;
    margin: 2rem auto;
}

/* Section titles */
.section-title {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 1.4rem;
    color: var(--gold, #C5A44E);
    padding: 0 2rem;
    margin-bottom: 1rem;
}

/* Featured horizontal scroll */
.featured-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0 2rem 1rem;
    scrollbar-width: none;
}
.featured-scroll::-webkit-scrollbar { display: none; }

.featured-card {
    flex-shrink: 0;
    width: 180px;
    scroll-snap-align: start;
    background: rgba(245, 240, 232, 0.04);
    border: 1px solid rgba(197, 164, 78, 0.15);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.featured-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.featured-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.featured-card__placeholder {
    width: 100%;
    height: 140px;
    background: rgba(197, 164, 78, 0.08);
}

.featured-card__info {
    padding: 0.75rem;
}

.featured-card__name {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 0.85rem;
    color: var(--cream, #F5F0E8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-card__price {
    color: var(--gold, #C5A44E);
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.featured-card__location {
    font-size: 0.75rem;
    color: rgba(245, 240, 232, 0.5);
    margin-top: 0.25rem;
}

.featured-card--biz {
    min-height: 80px;
    display: flex;
    align-items: center;
}

#featured-products,
#featured-businesses {
    padding: 0.75rem 0;
}

/* Hide D3 visualizations on small screens */
@media (max-width: 479px) {
    #categories svg,
    #map-view svg {
        display: none;
    }
}

/* Footer */
#cathedral-footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(197, 164, 78, 0.2);
    font-size: 0.85rem;
    color: rgba(245, 240, 232, 0.5);
}

/* Desktop overrides */
@media (min-width: 1024px) {
    #cathedral-header {
        padding: 1rem 2rem;
    }
    #main-nav {
        gap: 1.5rem;
    }
    #categories {
        padding: 1rem 2rem 1.5rem;
    }
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}
