/* Google Fonts & Variables */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --gray-color: #6b7280;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --max-width: 1200px;
    --header-height: 80px;
}


/* Reset & Base Styles */

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-color);
    background-color: var(--light-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    text-align: center;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}


/* Header Styles */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: var(--shadow);
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
}

.nav-menu a {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.search-box {
    position: relative;
    width: 200px;
}

.search-box input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-actions i {
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.user-actions i:hover {
    color: var(--primary-color);
}

.cart-icon-container {
    position: relative;
    cursor: pointer;
}

.cart-quantity {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--danger-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}


/* Hero Section */

.hero {
    height: 500px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1441986300917-64674bd600d8') center/cover no-repeat;
    color: white;
    display: flex;
    align-items: center;
    margin-top: var(--header-height);
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.hero-btn {
    background-color: white;
    color: var(--primary-color);
    font-weight: 600;
}

.hero-btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
}


/* Categories Section */

.categories {
    padding: 5rem 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.categories-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.category-card {
    position: relative;
    height: 300px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover img {
    transform: scale(1.05);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.category-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.category-btn {
    background-color: transparent;
    border: 1px solid white;
}

.category-btn:hover {
    background-color: white;
    color: var(--primary-color);
}


/* Shop Section */

.shop {
    padding: 5rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.sort-filter select {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    outline: none;
    cursor: pointer;
}

.shop-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.product-box {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

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

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

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.add-cart {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-cart:hover {
    background-color: var(--secondary-color);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--danger-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}


/* Newsletter Section */

.newsletter {
    background-color: var(--primary-color);
    color: white;
    padding: 4rem 0;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter p {
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    outline: none;
}

.newsletter-form button {
    background-color: var(--dark-color);
}

.newsletter-form button:hover {
    background-color: #111827;
}


/* Cart Styles */

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.cart {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background-color: white;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.cart.active {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-title {
    font-size: 1.25rem;
    font-weight: 600;
}

#close-cart {
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

#close-cart:hover {
    color: var(--danger-color);
}

.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-box {
    display: grid;
    grid-template-columns: 80px 1fr 24px;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
}

.cart-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.cart-detail {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-product-title {
    font-size: 0.875rem;
    font-weight: 500;
}

.cart-price {
    font-weight: 600;
    color: var(--primary-color);
}

.cart-quantity {
    width: 60px;
    padding: 0.25rem 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    outline: none;
}

.cart-remove {
    font-size: 1.25rem;
    color: var(--danger-color);
    cursor: pointer;
    transition: var(--transition);
}

.cart-remove:hover {
    transform: scale(1.1);
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 1.125rem;
}

.btn-buy {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--success-color);
}

.btn-buy:hover {
    background-color: #0d9c6e;
}


/* Empty Cart */

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 2rem;
}

.cart-empty i {
    font-size: 3rem;
    color: var(--gray-color);
    margin-bottom: 1rem;
}

.cart-empty p {
    margin-bottom: 1.5rem;
}


/* Footer */

.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 4rem 0 0;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}


/* Notification */

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 500;
    box-shadow: var(--shadow);
    z-index: 1003;
    animation: slideIn 0.5s ease forwards;
}

.notification.success {
    background-color: var(--success-color);
}

.notification.error {
    background-color: var(--danger-color);
}

.notification.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}


/* Responsive Styles */

@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 80%;
        height: calc(100vh - var(--header-height));
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: var(--transition);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }
    .nav-menu.active {
        left: 0;
    }
    .hamburger {
        display: block;
    }
    .search-box {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero {
        height: 400px;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .categories-container {
        grid-template-columns: 1fr;
    }
    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .hero {
        height: 300px;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .section-title {
        font-size: 1.5rem;
    }
    .cart {
        max-width: 100%;
    }
}


/* Payment Modal Styles */

.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.payment-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close-payment-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

.payment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

#submit-payment {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

#submit-payment:hover {
    background-color: #45a049;
}