/* style.css - CAGE BÂTIMENT */

/* ===== Variables ===== */
:root {
    --primary-color: #146cda;
    --secondary-color: #ff5722;
    --dark-color: #333;
    --light-color: #f5f5f5;
    --white: #fff;
    --success-color: #28a745;
    --border-color: #ddd;
    --text-color: #333;
    --gray-text: #666;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: none;
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ===== Header Top ===== */
.header-most-top {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 10px 0;
    text-align: center;
    font-size: 14px;
}

.header-most-top a {
    color: var(--secondary-color);
    font-weight: bold;
}

/* ===== Main Header ===== */
.header-bot {
    background-color: var(--white);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-section {
    text-align: center;
}

.logo {
    max-height: 80px;
    margin-bottom: 10px;
}

.logo-text {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: var(--dark-color);
}

.header-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.info-item {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-item i {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

/* ===== Search Box ===== */
.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box form {
    display: flex;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid var(--dark-color);
    border-right: none;
    border-radius: 5px 0 0 5px;
    font-size: 14px;
}

.search-box button {
    padding: 10px 20px;
    background-color: var(--dark-color);
    color: var(--white);
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background-color: var(--primary-color);
}

/* ===== User Actions ===== */
.user-actions {
    display: flex;
    gap: 15px;
    font-size: 14px;
}

.user-link, .logout-link {
    color: var(--primary-color);
}

.user-link i, .logout-link i {
    margin-right: 5px;
}

/* ===== Cart Link ===== */
.cart-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: var(--light-color);
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
}

.cart-link i {
    font-size: 20px;
    color: var(--secondary-color);
}

/* ===== Navigation ===== */
.main-nav {
    background-color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 15px 20px;
    color: var(--white);
    font-weight: 600;
    font-size: 15px;
}

.nav-menu > li:hover > a {
    background-color: rgba(0,0,0,0.1);
}

.nav-menu > li > a i {
    margin-right: 5px;
}

/* ===== Dropdown Menu ===== */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    min-width: 250px;
    display: none;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--dark-color);
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu li a:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

/* ===== Slider Section ===== */
.slider-section {
    padding: 30px 0;
    background-color: var(--white);
}

.main-slider {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.slider-item {
    position: relative;
}

.slider-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.slider-caption {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: rgba(0,0,0,0.6);
    color: var(--white);
    padding: 20px 30px;
    border-radius: 5px;
}

.slider-caption h2 {
    font-size: 28px;
    margin: 0;
}

.banner-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.banner-grid img {
    width: 100%;
    height: 192px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s;
}

.banner-grid img:hover {
    transform: scale(1.05);
}

/* ===== Features Section ===== */
.features-section {
    padding: 40px 0;
    background-color: var(--light-color);
}

.feature-box {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    margin-bottom: 20px;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.feature-box i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-box h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.feature-box p {
    color: var(--gray-text);
    font-size: 14px;
}

/* ===== Products Section ===== */
.products-section {
    padding: 50px 0;
    background-color: var(--white);
}

.products-section.new-products {
    background-color: var(--light-color);
}

.section-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 40px;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

/* ===== Product Card ===== */
.product-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
    margin-bottom: 30px;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.badge-new {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--success-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(20, 108, 218, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.btn-detail {
    padding: 10px 25px;
    background-color: var(--white);
    color: var(--primary-color);
    border-radius: 25px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
}

.btn-detail:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.product-info {
    padding: 20px;
}

.product-info h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--dark-color);
    min-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-info .price {
    font-size: 20px;
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 15px;
}

.btn-add-cart {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-add-cart:hover {
    background-color: var(--secondary-color);
}

.btn-add-cart i {
    margin-right: 5px;
}

/* ===== Pagination ===== */
.pagination-nav {
    margin-top: 40px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.pagination li {
    display: inline-block;
}

.pagination li a {
    display: block;
    padding: 10px 15px;
    background-color: var(--white);
    color: var(--dark-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    transition: all 0.3s;
}

.pagination li.active a {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination li a:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

/* ===== Newsletter ===== */
.newsletter-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.newsletter-section h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.newsletter-section p {
    font-size: 16px;
    margin-bottom: 25px;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin-top: 20px;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 50px 0 0 50px;
    font-size: 16px;
}

.newsletter-form button {
    padding: 15px 40px;
    background-color: var(--dark-color);
    color: var(--white);
    border: none;
    border-radius: 0 50px 50px 0;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

.newsletter-img {
    width: 100%;
    border-radius: 10px;
}

/* ===== Footer ===== */
.main-footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 50px 0 30px;
}

.main-footer h3 {
    color: var(--secondary-color);
    font-size: 20px;
    margin-bottom: 20px;
}

.main-footer ul li {
    margin-bottom: 10px;
}

.main-footer ul li a {
    color: #ddd;
    font-size: 14px;
}

.main-footer ul li a:hover {
    color: var(--secondary-color);
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info i {
    color: var(--primary-color);
    width: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    color: var(--white);
    font-size: 18px;
    transition: all 0.3s;
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.payment-methods img {
    height: 30px;
    width: auto;
    background-color: var(--white);
    padding: 5px;
    border-radius: 5px;
}

/* ===== Copyright ===== */
.copyright {
    background-color: #222;
    color: var(--white);
    text-align: center;
    padding: 20px 0;
}

.copyright p {
    margin: 0;
    font-size: 14px;
}

.copyright a {
    color: var(--secondary-color);
    font-weight: bold;
}

/* ===== Modal ===== */
.modal-content {
    border-radius: 10px;
}

.modal-header {
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 10px 10px 0 0;
}

.modal-header .close {
    color: var(--white);
    opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .nav-menu {
        flex-direction: column;
    }
    
    .slider-item img {
        height: 300px;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background-color: rgba(0,0,0,0.1);
    }
}

@media (max-width: 768px) {
    .header-info {
        flex-direction: column;
    }
    
    .header-actions {
        flex-direction: column;
    }
    
    .search-box {
        width: 100%;
    }
    
    .slider-item img {
        height: 250px;
    }
    
    .banner-grid img {
        height: 150px;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .newsletter-section h2 {
        font-size: 24px;
    }
    
    .newsletter-form {
        flex-direction: column;
        max-width: 100%;
    }
    
    .newsletter-form input,
    .newsletter-form button {
        border-radius: 25px;
        width: 100%;
    }
    
    .newsletter-form button {
        margin-top: 10px;
    }
}

@media (max-width: 576px) {
    .product-card {
        margin-bottom: 20px;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-info h4 {
        font-size: 14px;
        min-height: 35px;
    }
    
    .product-info .price {
        font-size: 16px;
    }
    
    .btn-add-cart {
        padding: 10px;
        font-size: 12px;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.5s ease-out;
}

/* ===== Utilities ===== */
.mt-4 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.text-center {
    text-align: center;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}