/* Variables */
:root {
    --primary-color: #d4a3a3; /* Soft pink */
    --secondary-color: #f8f4f4; /* Light gray */
    --text-color: #333;
    --accent-color: #a3d4d4; /* Soft teal */
    --white: #fff;
    --border-radius: 5px;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

button {
    cursor: pointer;
    padding: 10px 15px;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #c09090; /* Darker pink */
}

/* Header */
header {
    background-color: var(--white);
    padding: 15px 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 10px; /* Add space below title on wrap */
}

header h1 a.logo-link {
    color: var(--primary-color);
    text-decoration: none;
}

header nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap; /* Allow nav items to wrap */
}

header nav ul li {
    margin-left: 15px;
    margin-bottom: 5px; /* Add space between wrapped items */
}

header nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    padding: 5px 0; /* Add some padding for better click area */
    position: relative; /* For potential active state indicator */
}

header nav ul li a:hover {
     color: var(--primary-color);
     text-decoration: none;
}

/* Optional: Add an indicator for the current page */
/* body.page-nouveautes nav a[href="nouveautes.html"],
body.page-vetements nav a[href="vetements.html"],
body.page-occasion nav a[href="occasion.html"],
body.page-accessoires nav a[href="accessoires.html"],
body.page-beaute nav a[href="beaute.html"],
body.page-contact nav a[href="contact.html"] {
    font-weight: bold;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
} */

.cart-icon-container {
    position: relative;
    cursor: pointer;
    margin-left: 20px; /* Space from nav */
}

.cart-icon-container i {
    font-size: 1.5rem;
    color: var(--text-color);
}

.cart-icon-container .cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--accent-color);
    color: var(--white);
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: bold;
    min-width: 20px; /* Ensure circle shape */
    text-align: center;
}

/* Hero Section */
.hero {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
    margin-bottom: 30px;
}

.hero h2 {
    margin-bottom: 15px;
    font-size: 2.5rem;
}

/* Product Catalog */
.product-catalog {
    padding: 30px 0;
}

.product-catalog h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: var(--primary-color);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid */
    gap: 25px;
}

.product-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 250px; /* Fixed height for images */
    object-fit: cover; /* Crop images nicely */
}

.product-info {
    padding: 15px;
    flex-grow: 1; /* Allow info to take remaining space */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Push button to bottom */
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.product-info .price {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.product-info .condition {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.add-to-cart-btn {
    width: 100%;
    margin-top: auto; /* Push button to bottom */
}

/* Cart Modal */
.cart-modal {
    position: fixed;
    top: 0;
    right: -400px; /* Start off-screen */
    width: 350px;
    max-width: 90%;
    height: 100vh;
    background-color: var(--white);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transition: right 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.cart-modal.open {
    right: 0;
}

.cart-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cart-content h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: center;
}

.close-cart {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
}

#cart-items {
    flex-grow: 1;
    margin-bottom: 20px;
    overflow-y: auto; /* Allow item list to scroll if needed */
    border-top: 1px solid var(--secondary-color);
    border-bottom: 1px solid var(--secondary-color);
    padding: 10px 0;
}
#cart-items p {
    text-align: center;
    color: #777;
}

.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--secondary-color);
}
.cart-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: var(--border-radius);
}

.cart-item-info {
    flex-grow: 1;
}
.cart-item-info h4 {
    font-size: 0.9rem;
    margin-bottom: 3px;
}
.cart-item-info p {
    font-size: 0.9rem;
    color: #555;
    text-align: left; /* override default paragraph centering */
}

.cart-item-controls {
    display: flex;
    align-items: center;
    margin-left: 10px;
}
.cart-item-controls button {
    background: none;
    border: 1px solid var(--secondary-color);
    color: var(--text-color);
    width: 25px;
    height: 25px;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    border-radius: 3px;
    margin: 0 5px;
}
.cart-item-controls button.remove-item {
    color: #e74c3c; /* Red for remove */
    border: none;
    font-size: 1.2rem;
}

.cart-total {
    text-align: right;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.checkout-button {
    width: 100%;
    background-color: var(--accent-color);
}
.checkout-button:hover:enabled { 
    background-color: #8bc7c7; 
}
.checkout-button:disabled { 
    background-color: #ccc;
    cursor: not-allowed;
    color: #777;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Styles for generic content pages */
.content-page {
    padding: 40px 0;
    min-height: 60vh; /* Ensure footer doesn't jump up */
}

.content-page h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: var(--primary-color);
}

.content-page p {
    text-align: center;
    color: #555;
    margin-bottom: 20px;
}

/* Styles for Contact Form */
.contact-form {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    background-color: #fdfdfd;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(212, 163, 163, 0.5); /* Soft pink glow */
}

.form-group textarea {
    height: 150px;
    resize: vertical; /* Allow vertical resizing */
}

.contact-form button {
    width: 100%;
    background-color: var(--accent-color);
    font-size: 1.1rem;
    padding: 12px 15px;
}

.contact-form button:hover {
    background-color: #8bc7c7;
}

/* Footer */
footer {
    background-color: #333;
    color: var(--secondary-color);
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
}

footer .container {
     display: flex;
     flex-direction: column;
     align-items: center;
}

footer ul {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap; /* Allow wrapping */
    justify-content: center; /* Center items when wrapped */
}

footer ul li {
    margin: 0 10px;
    margin-bottom: 5px; /* Space when wrapped */
}

footer ul li a {
    color: var(--secondary-color);
}
footer ul li a:hover {
     color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: flex-start; /* Align items to the left */
    }
    header nav ul {
        margin-top: 10px;
        margin-left: 0; /* Remove left margin */
        justify-content: flex-start; /* Align nav items left */
    }
     header nav ul li {
         margin-left: 0;
         margin-right: 15px; /* Space between nav items */
    }
    .cart-icon-container {
        position: absolute; /* Position relative to header */
        top: 15px; /* Adjust vertical position */
        right: 20px; /* Position to the right */
        margin-left: 0;
    }
    .hero h2 {
        font-size: 2rem;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Adjust for smaller screens */
        gap: 15px;
    }
    .product-card img {
        height: 200px; /* Adjust image height */
    }
     footer .container {
          align-items: center; /* Center footer content */
     }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
    }
    .cart-modal {
        width: 95%;
        right: -100%; /* Adjust off-screen position */
    }
     header h1 {
         font-size: 1.8rem;
     }
      header nav ul li {
         font-size: 0.9rem;
         margin-right: 10px;
    }
     .cart-icon-container i {
        font-size: 1.3rem;
    }
    .cart-icon-container .cart-count {
        top: -6px;
        right: -8px;
        font-size: 0.7rem;
        min-width: 18px;
    }
}