/* Import Google Fonts - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: #f0f2f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header Section --- */
.header {
    background-color: #fff;
    padding: 15px 0;
    border-bottom: 2px solid #ff6b6b;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    margin: 0;
    color: #ff6b6b;
    font-weight: 700;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: #556270;
    color: white;
    padding: 12px 25px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 50px;
    transition: background-color 0.3s, transform 0.3s;
}

.dropbtn:hover {
    background-color: #404a55;
    transform: translateY(-2px);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 8px;
    margin-top: 10px;
    animation: fadeInDropdown 0.3s ease-in-out;
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-content a {
    color: #333;
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    border-radius: 8px;
}

.dropdown-content a:hover {
    background-color: #f0f2f5;
    color: #ff6b6b;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.header-icons {
    display: flex;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: #f0f2f5;
    border-radius: 50px;
    padding: 5px 15px;
    transition: box-shadow 0.3s;
}

.search-box:focus-within {
    box-shadow: 0 0 0 2px #ff6b6b;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    padding: 8px;
    font-size: 14px;
    width: 200px;
}

.search-box button,
#cart-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    margin-left: 10px;
    color: #556270;
    transition: color 0.3s, transform 0.3s;
}

.search-box button:hover,
#cart-btn:hover {
    color: #ff6b6b;
    transform: scale(1.1);
}

.cart-icon {
    position: relative;
}

#cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff6b6b;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: 600;
}

/* --- Banner Section --- */
.banner-section {
    width: 100%;
    overflow: hidden;
    position: relative;
    margin-top: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.banner-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    font-weight: bold;
    background-size: cover;
    background-position: center;
    position: relative;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
    animation: fadeIn 1s ease-in-out;
}

.slide .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
    padding: 20px;
}

.slide h2 {
    font-size: 3em;
    margin-bottom: 10px;
    animation: slideInFromTop 1s ease-out forwards;
}

.slide p {
    font-size: 1.5em;
    animation: slideInFromBottom 1s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInFromTop {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInFromBottom {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- Product Section --- */
.products-section {
    padding: 80px 0;
}

h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.8em;
    color: #333;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: #ff6b6b;
    margin: 10px auto 0;
    border-radius: 5px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: #fff;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

.product-card img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.product-card h4 {
    margin: 15px 0 10px;
    font-size: 1.4em;
    color: #556270;
    font-weight: 600;
}

.product-card .price {
    font-weight: 700;
    color: #ff6b6b;
    font-size: 1.3em;
    margin-bottom: 15px;
}

.product-card .actions button {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    margin: 5px;
    font-size: 1em;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.3s;
}

.add-to-cart-btn {
    background-color: #ff6b6b;
    color: white;
}

.add-to-cart-btn:hover {
    background-color: #e55a5a;
    transform: scale(1.05);
}

.buy-now-btn {
    background-color: #556270;
    color: white;
}

.buy-now-btn:hover {
    background-color: #404a55;
    transform: scale(1.05);
}

/* --- Modal Styles --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 550px;
    position: relative;
    animation: fadeInModal 0.5s ease-in-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInModal {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s, transform 0.3s;
}

.close-btn:hover {
    color: #333;
    transform: rotate(90deg);
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-item p {
    flex-grow: 1;
    margin-left: 20px;
    font-weight: 500;
}

.quantity-controls {
    display: flex;
    align-items: center;
}

.quantity-controls button {
    padding: 5px 10px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    transition: background-color 0.3s;
}

.quantity-controls button:hover {
    background-color: #e0e0e0;
}

.quantity-controls span {
    margin: 0 15px;
    font-weight: 600;
}

.remove-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.remove-btn:hover {
    background-color: #c82333;
}

.cart-total {
    text-align: right;
    font-size: 1.5em;
    font-weight: 700;
    margin-top: 25px;
    color: #ff6b6b;
}

#checkout-btn {
    width: 100%;
    padding: 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.2em;
    margin-top: 30px;
    font-weight: 600;
    transition: background-color 0.3s;
}

#checkout-btn:hover {
    background-color: #218838;
}

/* Payment Form */
#payment-form label {
    display: block;
    margin-top: 20px;
    font-weight: 600;
    color: #556270;
}

#payment-form input {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

#payment-form input:focus {
    border-color: #ff6b6b;
    outline: none;
}

#payment-form button {
    width: 100%;
    padding: 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: 600;
    margin-top: 30px;
    transition: background-color 0.3s;
}

#payment-form button:hover {
    background-color: #0056b3;
}

/* --- Footer Section --- */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 60px 0;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-col {
    flex: 1 1 200px;
    padding: 0 20px;
}

.footer-col h3 {
    font-size: 20px;
    margin-bottom: 25px;
    position: relative;
    font-weight: 700;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    height: 3px;
    width: 60px;
    background-color: #ff6b6b;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: white;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: #ff6b6b;
}

.social-links a {
    display: inline-block;
    margin-right: 15px;
    font-size: 28px;
    color: white;
    transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
    color: #ff6b6b;
    transform: translateY(-3px);
}

.footer-col form {
    display: flex;
    flex-direction: column;
}

.footer-col form input {
    padding: 12px;
    border: none;
    border-radius: 50px;
    margin-bottom: 10px;
    background-color: #404a55;
    color: white;
}

.footer-col form input::placeholder {
    color: #bbb;
}

.footer-col form button {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.footer-col form button:hover {
    background-color: #e55a5a;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #4a5568;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        text-align: center;
    }
    .header .nav-links, .header .header-icons {
        margin-top: 15px;
    }
    .footer .container {
        flex-direction: column;
        align-items: center;
    }
    .footer-col {
        margin-bottom: 30px;
        text-align: center;
    }
    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .search-box input {
        width: 100%;
    }
}