@import url('https://fonts.googleapis.com/css2?family=Cal+Sans:wght@400;700&display=swap');

:root {
    --primary: #1a1a1a;
    --secondary: #8a4d0f;
    --accent: #d4c9a8;
    --light: #fffef0;
    --dark: #121212;
    --text: #333;
}

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

body {
    font-family: 'Cal Sans', sans-serif;
    background: var(--dark);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

li {
    list-style: none;
}
header {
    background: var(--primary);
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--light);
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 10px;
    color: var(--secondary);
}

nav ul {
    display: flex;
    gap: 20px;
}

nav a {
    color: var(--light);
    transition: color 0.3s;
}

nav a:hover,
li:hover {
    color: var(--secondary);
}

.header-icons {
    display: flex;
    gap: 20px;
}

.icon-link {
    color: var(--light);
    font-size: 1.2rem;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.products-header {
    font-size: 1.2rem;
    word-spacing: 4px;
    margin-bottom: 20px;
    color: var(--light);
}

main {
    flex: 1;
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.search-container {
    display: flex;
}

#search-input {
    flex-grow: 1;
    border-radius: 4px 0 0 4px;
    width: 400px;
    padding: 8px 15px;
    border: 1px solid var(--accent);
    border-right: none;
}

#search-btn {
    padding: 9px 15px;
    border-radius: 0 4px 4px 0;
    background: var(--secondary);
    color: var(--light);
    border: none;
    cursor: pointer;
}

.filter-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-options select {
    padding: 8px 15px;
    border-radius: 4px;
    border: 1px solid var(--accent);
}

#reset-filters {
    background: var(--secondary);
    color: var(--light);
    border: none;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 4px;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    margin-left: 50px;
}

#products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.product-card:hover {
    transform: scale(1.05);
    background-color: var(--accent);
    color: var(--light);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text);
}

.product-info h4 {
    font-size: 1rem;
    margin-bottom: 3px;
}

.product-info p {
    margin-bottom: 10px;
    font-size: 0.8rem;
}

.product-info .price {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 10px;
}

.add-to-cart {
    font-family: 'Cal Sans', sans-serif;
    background: var(--secondary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: auto;
}

.out-of-stock {
    color: #d63031;
    background: var(--light);
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: not-allowed;
    margin-top: auto;
    text-align: center;
}

footer {
    background: var(--primary);
    color: var(--light);
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-content {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-column h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.footer-column h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.footer-column a:hover {
    color: var(--secondary);
    font-size: 1.2rem;
    scale: 1.1;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icons a {
    color: var(--light);
    font-size: 1.2rem;
}

.social-icons a:hover {
    color: var(--secondary);
    font-size: 1.2rem;
    scale: 1.2;
}

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.input-email {
    padding: 8px;
    border-radius: 4px 0 0 4px;
    border: 1px solid var(--accent);
    flex-grow: 1;
}

.search-btn {
    padding: 8px 15px;
    border-radius: 0 4px 4px 0;
    background: var(--secondary);
    color: var(--light);
    border: none;
    cursor: pointer;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}