/* ==========================================================
   SAFOUA ÉTUDE — DESIGN DE RÉFÉRENCE
   Adaptation Express / Nunjucks du projet Safoua Boutique
   UTF-8
========================================================== */

:root {
    --primary: #c9a227;
    --primary-dark: #a88417;
    --secondary: #1f1f1f;
    --background: #ffffff;
    --text: #222222;
    --light: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
}

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

.container {
    max-width: 1320px;
}

/* TOPBAR */

.topbar {
    font-size: .9rem;
}

/* HEADER */

.main-header {
    position: relative;
    z-index: 10;
}

.brand {
    white-space: nowrap;
}

.brand-logo {
    width: 75px;
    height: 65px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-name {
    color: var(--primary);
    font-size: 2rem;
    font-weight: 700;
    white-space: nowrap;
}

.search-bar .form-control {
    height: 46px;
    border-radius: 8px 0 0 8px;
    border: 1px solid #dee2e6;
}

.search-bar .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .15rem rgba(201, 162, 39, .15);
}

.search-bar .btn {
    height: 46px;
    border-radius: 0 8px 8px 0;
}

.header-actions {
    white-space: nowrap;
}

.header-action {
    text-decoration: none;
    color: #222;
    font-size: .95rem;
    transition: .25s ease;
}

.header-action:hover {
    color: var(--primary-dark);
}

.header-action i {
    margin-right: 4px;
}

/* NAVBAR */

.main-navbar {
    position: relative;
    z-index: 9;
}

.main-navbar .nav-link {
    transition: .25s ease;
}

.main-navbar .nav-link:hover {
    color: var(--primary) !important;
}

/* HERO */

.hero {
    height: 600px;
    background:
        linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)),
        url("/hero-school.png");
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-overlay {
    width: 100%;
}

.hero-title {
    color: #fff;
    font-size: 4rem;
    font-weight: 700;
}

.hero-subtitle {
    color: #fff;
    font-size: 1.5rem;
    margin-top: 20px;
}

/* SECTIONS */

.categories-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.products-section {
    padding: 90px 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.6rem;
    font-weight: 700;
    color: #222;
}

.section-subtitle {
    text-align: center;
    color: #777;
    margin: 15px 0 60px;
    font-size: 1.1rem;
}

/* CATEGORIES */

.category-card {
    overflow: hidden;
    background: #fff;
    border: none;
    border-radius: 18px;
    transition: .35s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(0,0,0,.18);
}

.category-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transition: .45s;
}

.category-card:hover .category-image {
    transform: scale(1.08);
}

.category-body {
    padding: 25px;
}

.category-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #222;
}

.gold-link {
    color: var(--primary);
    font-weight: 600;
}

.gold-link:hover {
    color: var(--primary-dark);
}

/* PRODUCTS */

.product-card {
    transition: all .3s ease;
    overflow: hidden;
    border-radius: 15px;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,.18) !important;
}

.product-image-wrap {
    overflow: hidden;
    background: #fff;
}

.product-image {
    width: 100%;
    aspect-ratio: 5 / 3.5;
    object-fit: contain;
    transition: transform .4s ease;
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
    font-size: .8rem;
}

.product-name {
    min-height: 50px;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #222;
}

.product-button {
    transition: .3s;
}

.product-button:hover {
    transform: scale(1.03);
}

/* FOOTER */

.site-footer {
    margin-top: 0;
}

/* RESPONSIVE */

@media (max-width: 991.98px) {

    .header-actions {
        justify-content: center !important;
    }

    .hero {
        height: 520px;
    }

    .hero-title {
        font-size: 3.2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }
}

@media (max-width: 575.98px) {

    .topbar .container {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    .brand {
        justify-content: center;
    }

    .brand-name {
        font-size: 1.7rem;
    }

    .header-actions {
        gap: 12px !important;
        font-size: .85rem;
    }

    .hero {
        height: 460px;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .hero .btn {
        margin: 5px 0 !important;
        width: 90%;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* =========================================================
   BOUTIQUE
   ========================================================= */

.shop-page {
    padding: 70px 0 100px;
    background: #fff;
}

.shop-header {
    text-align: center;
    margin-bottom: 35px;
}

.shop-search {
    margin-bottom: 45px;
}

.search-form {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
}

.search-form input {
    flex: 1;
    height: 52px;
    border: 1px solid #ddd;
    border-radius: 8px 0 0 8px;
    padding: 0 18px;
    font-size: 16px;
    outline: none;
}

.search-form input:focus {
    border-color: #d4a017;
}

.search-form button {
    border: none;
    background: #d4a017;
    color: #111;
    padding: 0 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
}

.shop-layout {
    display: flex;
    align-items: flex-start;
    gap: 35px;
}

.shop-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.sidebar-box {
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 25px;
    background: #fff;
}

.sidebar-box h3 {
    font-size: 21px;
    margin: 0 0 20px;
    font-weight: 700;
}

.category-filter {
    display: block;
    text-decoration: none;
    color: #333;
    padding: 12px 14px;
    border-radius: 7px;
    margin-bottom: 5px;
    transition: all .2s ease;
}

.category-filter:hover {
    background: #f7f0df;
    color: #c99813;
}

.category-filter.active {
    background: #d4a017;
    color: #111;
    font-weight: 600;
}

.shop-products {
    flex: 1;
}

.result-info {
    margin-bottom: 25px;
    font-size: 17px;
    color: #555;
}

.product-card {
    height: 100%;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #eee;
    box-shadow: 0 4px 15px rgba(0,0,0,.07);
    transition: transform .2s ease, box-shadow .2s ease;
}

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

.product-image-container {
    height: 260px;
    position: relative;
    overflow: hidden;
    background: #f7f7f7;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
    background: #e63148;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 11px;
    border-radius: 7px;
    text-transform: uppercase;
}

.product-content {
    padding: 22px;
}

.product-name {
    font-size: 21px;
    line-height: 1.3;
    margin: 0 0 15px;
    color: #111;
}

.product-category {
    color: #6d7b88;
    font-size: 15px;
    margin-bottom: 13px;
}

.product-rating {
    margin-bottom: 15px;
}

.stars {
    color: #ffb800;
    letter-spacing: 1px;
}

.reviews {
    color: #6d7b88;
    margin-left: 5px;
}

.product-price-area {
    margin-bottom: 15px;
}

.old-price {
    color: #555;
    text-decoration: line-through;
    margin-right: 8px;
    font-size: 16px;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: #111;
}

.stock {
    font-size: 14px;
    margin-bottom: 15px;
}

.stock.available {
    color: #278a42;
}

.stock.unavailable {
    color: #dc3545;
}

.product-button {
    width: 100%;
    border: none;
    border-radius: 7px;
    background: #ffbc05;
    color: #111;
    padding: 12px;
    font-size: 17px;
    cursor: pointer;
    transition: background .2s ease;
}

.product-button:hover {
    background: #d4a017;
}

.product-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.empty-products {
    text-align: center;
    padding: 70px 20px;
    border: 1px solid #eee;
    border-radius: 12px;
}

.empty-products h3 {
    margin-bottom: 10px;
}

.empty-products p {
    color: #777;
    margin-bottom: 25px;
}

.btn-shop {
    display: inline-block;
    background: #d4a017;
    color: #111;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 7px;
    font-weight: 600;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 991px) {

    .shop-layout {
        flex-direction: column;
    }

    .shop-sidebar {
        width: 100%;
    }

    .sidebar-box {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }

    .sidebar-box h3 {
        width: 100%;
    }

    .category-filter {
        margin: 0;
    }

}


@media (max-width: 576px) {

    .shop-page {
        padding: 45px 0 70px;
    }

    .search-form {
        flex-direction: column;
        gap: 10px;
    }

    .search-form input,
    .search-form button {
        border-radius: 7px;
        height: 50px;
    }

}

/* ============================================================
   Logo responsive sur téléphone
   ============================================================ */

@media (max-width: 576px) {

    .brand-logo {
        width: 55px;
        height: 48px;
        flex-shrink: 1;
    }

    .brand-name {
        font-size: 1.5rem;
    }

}

/* ============================================================
   HEADER RESPONSIVE — TELEPHONE
   ============================================================ */

@media (max-width: 576px) {

    .main-header {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    .main-header .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .main-header .row {
        text-align: center;
    }

    /* Logo + nom */
    .main-header .brand {
        justify-content: center;
        width: 100%;
    }

    .brand-logo {
        width: 55px;
        height: 48px;
        flex-shrink: 1;
    }

    .brand-name {
        font-size: 1.5rem;
    }

    /* Barre de recherche */
    .search-bar {
        width: 100%;
    }

    .search-bar .form-control {
        height: 42px;
    }

    .search-bar .btn {
        height: 42px;
    }

    /* Compte / Favoris / Panier */
    .header-actions {
        justify-content: center !important;
        flex-wrap: wrap;
        gap: 12px !important;
    }

    .header-action {
        font-size: .85rem;
    }

}
