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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-gray: #ecf0f1;
    --medium-gray: #95a5a6;
    --dark-gray: #7f8c8d;
    --text-color: #2c3e50;
    --text-light: #ffffff;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
}

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

/* Header Styles */
.header {
    background: var(--text-light);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--light-gray);
    border-radius: 25px;
    padding: 8px 15px;
    width: 300px;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    padding: 5px;
}

.search-box button {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--dark-gray);
}

.cart-link {
    position: relative;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
}

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--text-light);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s;
}

.cta-button {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--text-light);
    padding: 15px 30px;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    animation: fadeInUp 1s ease 0.4s;
}

.cta-button:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Product Section */
.products-section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--dark-gray);
    font-size: 1.1rem;
}

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

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

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: var(--light-gray);
}

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

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary-color);
    color: var(--text-light);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-badge.new {
    background: var(--success-color);
}

.product-badge.sale {
    background: var(--warning-color);
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    color: var(--medium-gray);
    font-size: 0.875rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.product-title a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.product-title a:hover {
    color: var(--secondary-color);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.stars {
    color: var(--warning-color);
}

.rating-count {
    color: var(--dark-gray);
    font-size: 0.875rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.original-price {
    color: var(--dark-gray);
    text-decoration: line-through;
}

.add-to-cart {
    width: 100%;
    background: var(--accent-color);
    color: var(--text-light);
    border: none;
    padding: 12px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart:hover {
    background: #2980b9;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-light);
}

.btn-secondary:hover {
    background: #c0392b;
}

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

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

/* Cart Section */
.cart-section {
    padding: 60px 0;
}

.cart-empty {
    text-align: center;
    padding: 60px 0;
}

.cart-table {
    background: var(--text-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.cart-table table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.cart-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--primary-color);
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.cart-product-info {
    flex: 1;
}

.cart-product-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.cart-product-details {
    color: var(--dark-gray);
    font-size: 0.875rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--light-gray);
    background: var(--text-light);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-btn:hover {
    background: var(--light-gray);
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid var(--light-gray);
    padding: 5px;
    border-radius: 4px;
}

.remove-btn {
    background: var(--secondary-color);
    color: var(--text-light);
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.remove-btn:hover {
    background: #c0392b;
}

.cart-summary {
    background: var(--text-light);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    max-width: 400px;
    margin-left: auto;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-gray);
}

.summary-row:last-of-type {
    border-bottom: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.free-shipping-notice {
    background: #d4edda;
    color: var(--success-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    text-align: center;
}

/* Checkout Section */
.checkout-section {
    padding: 60px 0;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

.checkout-form {
    background: var(--text-light);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.payment-method {
    position: relative;
    cursor: pointer;
}

.payment-method input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.payment-method-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.payment-method input[type="radio"]:checked + .payment-method-label {
    border-color: var(--accent-color);
    background: #e3f2fd;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 40px 0 20px;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--text-light);
}

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

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

.social-links a:hover {
    background: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 1s ease;
}

/* Success Message */
.success-message {
    background: #d4edda;
    color: var(--success-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .checkout-container {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--text-light);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .search-box {
        width: 200px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .cart-table {
        overflow-x: auto;
    }

    .cart-table table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 15px;
    }

    .checkout-form {
        padding: 1.5rem;
    }

    .cart-summary {
        padding: 1.5rem;
    }
}