/* --- Global --- */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #4a4a4a;
    --background-color: #f6f6f7;
    --surface-color: #ffffff;
    --accent-color: #007bff;
    --success-color: #25D366; /* WhatsApp Green */
    --danger-color: #dc3545;
    --border-color: #e5e5e5;
    --font-family: 'Helvetica Neue', Helvetica, Arial, sans-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;
}

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

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

.cart-button {
    display: flex;
    align-items: center;
    background-color: var(--accent-color);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.cart-button:hover {
    background-color: #0056b3;
}

.cart-text {
    margin-left: 8px;
    font-weight: bold;
}

.cart-icon {
    font-size: 1.5rem;
    position: relative;
}

#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);
}

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

h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    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: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
}

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

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

.product-card-info {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-card h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.product-card p {
    color: var(--secondary-color);
    margin: 0;
    font-weight: 500;
    font-size: 1.2rem;
}

.product-card button {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    opacity: 0;
    white-space: nowrap;
}

.product-card:hover button {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Page Header for Checkout --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.continue-shopping-btn {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

.continue-shopping-btn:hover {
    text-decoration: underline;
}

.product-card button:hover {
    background-color: #0056b3;
}


/* --- 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;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    gap: 15px;
}

.cart-item:last-child {
    border-bottom: none;
}

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

.cart-item-info {
    flex-grow: 1;
}

.cart-item-info span {
    display: block;
    font-size: 1rem;
}

.cart-item-info span:first-child {
    font-weight: bold;
    margin-bottom: 5px;
}

.cart-item button {
    background: transparent;
    color: var(--danger-color);
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    transition: 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: #e9ecef;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-color);
}

/* --- Responsive Design (Mobile-First) --- */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .product-card h3 {
        font-size: 1rem;
    }

    .product-card p {
        font-size: 1.1rem;
    }

    .checkout-container {
        grid-template-columns: 1fr;
    }

    nav h1 a {
        font-size: 1.3rem;
    }

    h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    #send-whatsapp {
        padding: 18px;
        font-size: 1.1rem;
    }
}

/* --- Notification --- */
.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--primary-color);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
