/* =========================
   RESET & VARIABLES
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #0b0b0b;
    --white: #ffffff;
    --gray: #8a8a8a;
    --light: #f7f7f5;
}

/* =========================
   GLOBAL
========================= */

body {
    font-family: "Helvetica Neue", Arial, sans-serif;
    background-color: var(--light);
    color: var(--black);
}

/* =========================
   HEADER
========================= */

.header {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 100px 20px 80px;
    background: var(--black);
    color: var(--white);
}

.header h1 {
    font-size: 38px;
    font-weight: 300;
    letter-spacing: 6px;
    text-transform: uppercase;
}

.header p {
    margin-top: 18px;
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    opacity: 0.7;
}

/* =========================
   LOGO
========================= */

.top-bar {
    position: absolute;
    top: 35px;
    left: 40px;
    z-index: 10;
}

.logo img {
    height: 70px;
    width: auto;
}

/* =========================
   FILTRES (DASHBOARD)
========================= */

.filters {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: -40px auto 80px;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.06);

    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: start;
    gap: 40px;
}

.filter-group span {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 20px;
    display: block;
}

.filter-group button {
    background: transparent;
    border: none;
    padding: 8px 0;
    margin-right: 25px;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #111;
    cursor: pointer;
    position: relative;
}

.filter-group button::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 1px;
    background: #000;
    transition: width 0.3s ease;
}

.filter-group button:hover::after,
.filter-group button.active::after {
    width: 100%;
}

/* =========================
   COMPTEUR
========================= */

.results-count {
    text-align: right;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #777;
    white-space: nowrap;
    align-self: start;
}
/* =========================
   SHOWROOM GRID
========================= */

.showroom {
    max-width: 1400px;
    margin: auto;
    padding: 0 40px 120px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 80px 50px;
    align-items: start;
}

/* =========================
   CARTES MATIÈRES
========================= */

.stone-card {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.stone-card.hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
    pointer-events: none;
}

.stone-image {
    height: 460px;
    overflow: hidden;
    background: #eaeaea;
}

.stone-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s ease;
}

.stone-card:hover img {
    transform: scale(1.06);
}

.stone-info {
    margin-top: 18px;
}

.stone-info h4 {
    font-size: 15px;
    font-weight: 400;
}

.stone-info p {
    margin-top: 6px;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #777;
}

/* =========================
   FOOTER
========================= */

.footer {
    padding: 60px 20px;
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #999;
}

/* =========================
   PAGE MATIÈRE
========================= */

.product-page {
    background: #fff;
}

.product-header {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 20;
    padding: 25px 40px;
    border-bottom: 1px solid #eee;
}

.back {
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #000;
}

.product {
    display: grid;
    grid-template-columns: 60% 40%;
    min-height: calc(100vh - 80px);
}

.gallery {
    padding: 40px;
    background: #fafafa;
}

.images {
    position: relative;
    height: 80vh;
}

.images img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
}

#img1:checked ~ .images .img1,
#img2:checked ~ .images .img2,
#img3:checked ~ .images .img3,
#img4:checked ~ .images .img4 {
    opacity: 1;
}

.thumbnails {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.thumbnails img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
}

.thumbnails img:hover {
    opacity: 1;
}

.product-info {
    padding: 80px 60px;
}

.product-info h1 {
    font-size: 42px;
    font-weight: 300;
    letter-spacing: 2px;
}

.category {
    margin-top: 15px;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #888;
}

.description {
    margin-top: 40px;
    font-size: 15px;
    line-height: 1.9;
    max-width: 420px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {

    .filters {
        flex-direction: column;
        gap: 40px;
        margin: -20px 20px 60px;
        padding: 30px;
    }

    .showroom {
        padding: 0 20px 80px;
        gap: 50px;
    }

    .stone-image {
        height: 380px;
    }

    .product {
        grid-template-columns: 1fr;
    }

    .images {
        height: 60vh;
    }

    .product-info {
        padding: 40px;
    }

    .top-bar {
        top: 20px;
        left: 20px;
    }

    .logo img {
        height: 46px;
    }
}
/* =========================
   TEXTE PAGE MATIÈRE – LUXE
========================= */

.product-info {
    padding: 100px 70px;
    display: flex;
    flex-direction: column;
}

.stone-label {
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #999;
}

.stone-name {
    margin-top: 25px;
    font-size: 46px;
    font-weight: 300;
    letter-spacing: 2px;
    line-height: 1.2;
}

.stone-separator {
    width: 60px;
    height: 1px;
    background: #000;
    margin: 35px 0 45px;
}

.stone-description {
    font-size: 16px;
    line-height: 2;
    color: #444;
    max-width: 460px;
}

/* Responsive */
@media (max-width: 900px) {
    .product-info {
        padding: 50px 30px;
    }

    .stone-name {
        font-size: 34px;
    }
}
/* ===== RETOUR SHOWROOM ===== */

.product-header {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 20;
    height: 90px;
}

.back-link {
    position: absolute;
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #000;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.back-link:hover {
    opacity: 1;
}

/* Mobile */
@media (max-width: 768px) {
    .back-link {
        right: 20px;
        font-size: 10px;
    }
}
/* =========================
   PAGE MATIÈRE – HEADER
========================= */

.product-page {
    background: #fff;
}

.product-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: 90px;
    background: #ffffff;
    border-bottom: 1px solid #eee;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 40px;
}

/* Logo */
.product-header .logo img {
    height: 46px;
    width: auto;
}

/* Bouton retour */
.back-link {
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #000;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.back-link:hover {
    opacity: 1;
}

/* =========================
   PAGE MATIÈRE – CONTENU
========================= */

.product {
    display: grid;
    grid-template-columns: 60% 40%;
    min-height: calc(100vh - 90px);
}

/* Galerie */
.gallery {
    padding: 40px;
    background: #fafafa;
}

.images {
    position: relative;
    height: 80vh;
}

.images img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
}

#img1:checked ~ .images .img1,
#img2:checked ~ .images .img2,
#img3:checked ~ .images .img3,
#img4:checked ~ .images .img4 {
    opacity: 1;
}

/* Thumbnails */
.thumbnails {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.thumbnails img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
}

.thumbnails img:hover {
    opacity: 1;
}

/* Infos */
.product-info {
    padding: 100px 70px;
    display: flex;
    flex-direction: column;
}

.stone-label {
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #999;
}

.stone-name {
    margin-top: 25px;
    font-size: 46px;
    font-weight: 300;
    letter-spacing: 2px;
    line-height: 1.2;
}

.stone-separator {
    width: 60px;
    height: 1px;
    background: #000;
    margin: 35px 0 45px;
}

.stone-description {
    font-size: 16px;
    line-height: 2;
    color: #444;
    max-width: 460px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {

    .product {
        grid-template-columns: 1fr;
    }

    .images {
        height: 60vh;
    }

    .product-info {
        padding: 50px 30px;
    }

    .product-header {
        padding: 0 20px;
    }

    .product-header .logo img {
        height: 34px;
    }

    .back-link {
        font-size: 10px;
    }
}
/* ===== FILTRES PREMIUM ===== */

.filters {
    backdrop-filter: blur(8px);
}

.filter-group button {
    padding: 10px 18px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

/* ===== FILTRES MINIMAL LUXE ===== */

.filter-group button {
    background: transparent;
    border: none;
    padding: 8px 0;
    margin-right: 25px;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #111;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.filter-group button::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 0;
    height: 0.5px;
    background: #000;
    transition: width 0.35s ease;
}



/* Hover */
.filter-group button:hover::after {
    width: 100%;
}

/* Actif */
.filter-group button.active::after {
    width: 100%;
}







.results-count {
    text-align: right;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #777;
}
.stone-card.hidden {
    display: none;
}

/* ===== BARRE RECHERCHE SOUS COMPTEUR ===== */

.search-under-counter {
    max-width: 1400px;
    margin: 20px auto 60px;
    padding: 0 40px;
    display: flex;
    justify-content: flex-end;
}

#search-input {
    width: 340px;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #ccc;
    background: transparent;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    outline: none;
    transition: all 0.3s ease;
}

#search-input::placeholder {
    color: #aaa;
}

#search-input:focus {
    border-bottom: 1px solid #000;
}

/* ===== SEARCH BAR POSITION FIX ===== */

.search-under-counter {
    grid-column: 3; /* même colonne que le compteur */
    margin-top: 20px;
    text-align: right;
}

.search-under-counter input {
    width: 280px;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #000;
    background: transparent;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    outline: none;
}

.search-under-counter input::placeholder {
    color: #999;
    letter-spacing: 2px;
}

/* ===== POSITION SEARCH SOUS COMPTEUR ===== */

.filters {
    position: relative;
}

.search-box {
    position: absolute;
    right: 40px;
    top: 55px; /* hauteur sous le compteur */
}

#search-input {
    width: 300px;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #ccc;
    background: transparent;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    outline: none;
}

#search-input:focus {
    border-bottom: 1px solid #000;
}