@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@300;400;600;700&display=swap');

/* ===== Global ===== */

body {
    margin: 0;
    background: #121212;
    color: #f5f5f5;
    font-family: Inter, sans-serif;
    overflow-x: hidden;
}

h1,
h2 {
    font-family: "Playfair Display", serif;
}

.gold {
    color: #d4a843;
}

/* ===== Header ===== */

header {
    position: sticky;
    top: 0;
    background: rgba(18, 18, 18, 0.95);
    padding: 18px 5%;
    border-bottom: 1px solid #2b2b2b;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.links a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s ease;
}

.links a:hover {
    color: #d4a843;
}

/* ===== Hero ===== */

.hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;

    background:
        linear-gradient(rgba(0, 0, 0, 0.55),
        rgba(0, 0, 0, 0.75)),
        linear-gradient(135deg, #3d2f0f, #222);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 10px;
}

.hero p {
    max-width: 750px;
    margin: 20px auto;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ===== Buttons ===== */

.btn {
    display: inline-block;
    margin: 10px;
    padding: 14px 26px;

    background: #d4a843;
    color: #111;

    text-decoration: none;
    font-weight: 700;

    border-radius: 6px;

    transition:
        background 0.3s ease,
        transform 0.2s ease;
}

.btn:hover {
    background: #e3b751;
    transform: translateY(-2px);
}

.btn-disabled {
    background: #3a3a3a;
    color: #8a8a8a;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-secondary {
    background: transparent;
    color: #d4a843;
    border: 1px solid #d4a843;
}

.btn-secondary:hover {
    background: rgba(212, 168, 67, 0.12);
    transform: translateY(-2px);
}

/* ===== Content Sections ===== */

.section {
    max-width: 1200px;
    margin: auto;
    padding: 70px 5%;
}

.section h2 {
    margin-bottom: 30px;
}

/* ===== Card Grid ===== */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

/* ===== Product Cards ===== */

.card {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.card .btn {
    margin: auto 0 0 0;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    border-radius: 0;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.card img {
    width: 100%;
    height: 500px;

    object-fit: cover;
    object-position: center;

    display: block;
}

.card a {
    position: relative;
    display: block;
    width: 100%;
}

.variant-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(18, 18, 18, 0.75);
    color: #d4a843;
    border: 1px solid #d4a843;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.card h3 {
    margin: 0;
    padding: 12px 20px;

    text-align: center;

    color: #d4a843;
    font-family: "Playfair Display", serif;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;

    min-height: 56px;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Model Detail Gallery ===== */

.model-gallery {
    max-width: 700px;
    margin: 0 auto 30px;
}

.model-gallery #main-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    display: block;
    cursor: zoom-in;
}

.thumbnail-row {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.thumbnail:hover {
    opacity: 0.85;
}

.thumbnail.active {
    opacity: 1;
    outline: 2px solid #d4a843;
}

.model-specs {
    max-width: 700px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

/* ===== Filters ===== */

.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filters select {
    background: #1e1e1e;
    color: #f5f5f5;
    border: 1px solid #2b2b2b;
    padding: 10px 14px;
    border-radius: 6px;
    font-family: Inter, sans-serif;
    cursor: pointer;
}

.filters select:hover {
    border-color: #d4a843;
}

.model-specs select {
    background: #1e1e1e;
    color: #f5f5f5;
    border: 1px solid #2b2b2b;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: Inter, sans-serif;
    cursor: pointer;
    margin: 0 0 15px 8px;
}

/* ===== Instagram Embeds ===== */

.insta-embeds {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.insta-embeds .instagram-media {
    width: 100% !important;
    max-width: 340px !important;
    margin: 10px !important;
    flex: 1 1 300px;
}

/* ===== Mobile Responsiveness ===== */

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .links {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }

    .links a {
        margin-left: 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero h2 {
        font-size: 1.1rem;
    }

    .card img {
        height: 280px;
    }

    .browse-main .card img {
        height: 220px;
    }

    .model-gallery #main-image {
        max-height: 320px;
        object-fit: contain;
    }

    .product-layout .model-gallery {
        max-width: 92%;
        margin: 0 auto;
    }
}

/* ===== Contact Form ===== */

.contact-form {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-form label {
    font-weight: 600;
    margin-top: 12px;
}

.contact-form input,
.contact-form textarea {
    background: #1e1e1e;
    color: #f5f5f5;
    border: 1px solid #2b2b2b;
    border-radius: 6px;
    padding: 12px;
    font-family: Inter, sans-serif;
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #d4a843;
}

.contact-form button {
    align-self: flex-start;
    margin-top: 16px;
    border: none;
    cursor: pointer;
}

/* ===== Browse Layout (Available Models) ===== */

.browse-layout {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.browse-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
}

.sidebar-block {
    margin-bottom: 28px;
}

.sidebar-block label,
.sidebar-heading {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #f5f5f5;
}

.sidebar-block input[type="text"],
.sidebar-block select {
    width: 100%;
    background: #1e1e1e;
    color: #f5f5f5;
    border: 1px solid #2b2b2b;
    border-radius: 6px;
    padding: 10px 12px;
    font-family: Inter, sans-serif;
    box-sizing: border-box;
}

.sidebar-block input[type="text"]:focus,
.sidebar-block select:focus {
    outline: none;
    border-color: #d4a843;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
}

#series-checkboxes {
    max-height: 440px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #cfcfcf;
    cursor: pointer;
}

.checkbox-item input {
    accent-color: #d4a843;
    cursor: pointer;
}

.checkbox-count {
    margin-left: auto;
    color: #7a7a7a;
    font-size: 0.85rem;
}

.browse-main {
    flex: 1;
    min-width: 0;
}

.results-count {
    color: #9a9a9a;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.card-series {
    margin: -10px 0 4px;
    color: #d4a843;
    font-size: 0.85rem;
    text-align: center;
}

.card-artist {
    margin: 0 0 10px;
    color: #9a9a9a;
    font-size: 0.9rem;
    text-align: center;
}

/* ===== Pagination ===== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
}

.page-btn {
    background: #1e1e1e;
    color: #f5f5f5;
    border: 1px solid #2b2b2b;
    border-radius: 6px;
    padding: 8px 14px;
    font-family: Inter, sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    border-color: #d4a843;
}

.page-btn.active {
    background: #d4a843;
    color: #111;
    font-weight: 700;
    border-color: #d4a843;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-ellipsis {
    color: #7a7a7a;
    padding: 0 4px;
}

/* ===== Product Layout (Model Detail) ===== */

.back-link {
    display: inline-block;
    color: #d4a843;
    text-decoration: none;
    margin-bottom: 24px;
}

.back-link:hover {
    text-decoration: underline;
}

.product-layout {
    display: flex;
    align-items: flex-start;
    gap: 50px;
}

.product-layout .model-gallery {
    flex: 1;
    min-width: 0;
    max-width: none;
    margin: 0;
}

.product-info {
    flex: 1;
    position: sticky;
    top: 90px;
}

.product-meta {
    color: #9a9a9a;
    margin: 0 0 6px;
    font-size: 0.95rem;
}

.product-meta a {
    color: #9a9a9a;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.product-meta a:hover {
    color: #d4a843;
    border-color: #d4a843;
}

/* ===== Related Models ===== */

.related-models {
    padding: 60px 0 0;
    margin-top: 20px;
    border-top: 1px solid #2b2b2b;
}

.related-models h2 {
    margin-bottom: 24px;
}

.related-models .grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.related-models .card img {
    height: 260px;
}

.product-info h1 {
    margin: 0 0 20px;
}

.product-info .model-specs {
    max-width: none;
    margin: 0 0 20px;
}

/* ===== Mobile: Browse & Product Layouts ===== */

@media (max-width: 900px) {
    .browse-layout,
    .product-layout {
        flex-direction: column;
        align-items: stretch;
    }

    .browse-sidebar,
    .product-info {
        width: 100%;
        position: static;
    }
}

/* ===== Gallery Navigation Arrows ===== */

.main-image-wrap {
    position: relative;
    background: #1e1e1e;
    border-radius: 12px;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-photos-message {
    color: #9a9a9a;
    text-align: center;
    padding: 40px 30px;
    margin: 0;
    font-size: 0.95rem;
}

.no-photos-message a {
    color: #d4af37;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(18, 18, 18, 0.65);
    color: #f5f5f5;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.gallery-arrow:hover {
    background: rgba(212, 168, 67, 0.85);
    color: #111;
}

.gallery-arrow-left {
    left: 12px;
}

.gallery-arrow-right {
    right: 12px;
}

/* ===== Compact Grid (Available Models) ===== */

.section-wide {
    max-width: 1800px;
}

.browse-main .grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.browse-main .card img {
    height: 320px;
}

/* ===== Image Lightbox ===== */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    z-index: 2000;
    cursor: zoom-out;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* ===== Desktop-only Gallery Crop Adjustment ===== */

@media (min-width: 901px) {
    .model-gallery #main-image {
        width: auto;
        max-width: 100%;
        height: auto;
        max-height: 760px;
        object-fit: contain;
        display: block;
        margin: 0 auto;
    }

    .main-image-wrap {
        background: #1e1e1e;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .product-layout .model-gallery {
        flex: 0 1 640px;
        max-width: 640px;
    }

    .product-info {
        flex: 1;
    }
}

/* ===== Sticky Browse Toolbar (Available Models) ===== */

.browse-section {
    padding-top: 24px;
}

.browse-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 24px;
}

.browse-toolbar h1 {
    margin: 0;
}

.browse-toolbar .results-count {
    margin: 0;
}

.pagination-top {
    margin: 0 0 0 auto;
}

@media (min-width: 901px) {
    .browse-toolbar {
        position: sticky;
        top: var(--header-h, 61px);
        z-index: 900;
        background: #121212;
        padding: 14px 0;
        border-bottom: 1px solid #2b2b2b;
    }

    .browse-sidebar {
        top: calc(var(--header-h, 61px) + var(--toolbar-h, 70px) + 20px);
        max-height: calc(100vh - var(--header-h, 61px) - var(--toolbar-h, 70px) - 40px);
        overflow-y: auto;
    }
}
