@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* --- Global --- */
:root {
    --primary-color: #5A1F1F; /* Deep Red from Logo */
    --secondary-color: #4a4a4a;
    --background-color: #F7F2E9; /* Lighter Cream for background */
    --surface-color: #ffffff;
    --accent-color: #5A1F1F;
    --text-on-dark: #EFE1C5; /* Cream from Logo */
    --success-color: #25D366; /* WhatsApp Green */
    --danger-color: #dc3545;
    --border-color: #e5e5e5;
    --font-family: 'Amiri', serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    background-color: var(--background-color);
    color: var(--primary-color);
    line-height: 1.6;
}

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

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

/* --- Header --- */
header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav h1 a {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0;
}

.cart-icon {
    font-size: 1.8rem;
    position: relative;
    color: var(--secondary-color);
}

#cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid var(--surface-color);
}

/* --- Hero Section --- */
.hero {
    background-color: var(--primary-color);
    color: var(--text-on-dark);
    text-align: center;
    padding: 60px 20px;
}

.hero h1 {
    font-size: 2.8rem;
    margin-top: 0;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.hero-note {
    font-size: 1rem;
    font-weight: bold;
    margin-top: 20px;
    background-color: rgba(0, 0, 0, 0.15);
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
}


/* --- Main Content --- */
main {
    padding: 40px 0;
}

h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--primary-color);
}

/* --- Products Grid --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

.product-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s, transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

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

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

.product-card h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
}

.product-card p {
    color: var(--secondary-color);
    margin: 0 0 auto; /* Pushes button to the bottom */
    font-weight: 500;
    font-size: 1.2rem;
}

.product-card button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s;
}

.product-card button:hover {
    background-color: #4a1a1a;
}

.not-available {
    color: var(--danger-color);
    font-weight: bold;
    text-align: center;
    margin-top: 15px;
}


/* --- Checkout Page --- */
.checkout-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: flex-start;
}

#cart-items {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}
.cart-item:last-child {
    border-bottom: none;
}
.cart-item span {
    font-size: 1.1rem;
}

.cart-item button {
    background: var(--danger-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 30px;
    text-align: center;
    transition: background-color 0.3s;
}
.cart-item button:hover {
    background-color: #c82333;
}


.checkout-summary {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    position: sticky;
    top: 90px; /* Adjust based on header height */
}

.checkout-summary h3 {
    margin-top: 0;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
}

#region {
    padding: 10px;
    width: 100%;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

#send-whatsapp {
    background-color: var(--success-color);
    color: white;
    border: none;
    padding: 15px;
    width: 100%;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#send-whatsapp:hover {
    background-color: #1EBE5A;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    background-color: #e7ddd0;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-color);
}

/* --- Side Cart (New) --- */
#side-cart {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s ease;
}

#side-cart.open {
    visibility: visible;
    opacity: 1;
}

#cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.side-cart-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 360px;
    max-width: 90%;
    height: 100%;
    background-color: var(--surface-color);
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

#side-cart.open .side-cart-content {
    transform: translateX(0);
}

.side-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.side-cart-header h3 {
    margin: 0;
    font-size: 1.4rem;
}

#close-cart-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--secondary-color);
}

#side-cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.side-cart-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    gap: 15px;
}

.side-cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.side-cart-item-details {
    flex-grow: 1;
}

.side-cart-item-details h4 {
    margin: 0 0 5px;
    font-size: 1rem;
}

.side-cart-item-details p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.side-cart-item .remove-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--danger-color);
}

.side-cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.side-cart-footer .subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.side-cart-footer .btn-checkout {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--accent-color);
    color: white;
    text-align: center;
    border-radius: 5px;
    font-size: 1.1rem;
    margin-bottom: 10px;
    transition: background-color 0.3s;
}
.side-cart-footer .btn-checkout:hover {
    background-color: #4a1a1a;
}

#continue-shopping-btn {
    width: 100%;
    padding: 10px;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--secondary-color);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
}


/* --- Responsive Design (Mobile-First) --- */
@media (max-width: 768px) {
    .checkout-container {
        grid-template-columns: 1fr;
    }
    nav h1 a {
        font-size: 1.1rem; /* Adjust for long title on mobile */
    }
    h2 {
        font-size: 1.8rem;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
}