/* style.css - Colorful theme for AP MALL */

/* General styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --primary-color: #FF5722; /* Vibrant Orange */
    --secondary-color: #FFC107; /* Amber */
    --accent-color: #03A9F4; /* Light Blue */
    --bg-color: #F8F9FA; /* Light Gray */
    --text-color: #212529; /* Dark Gray */
    --card-bg: #FFFFFF;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2.5em;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo span {
    font-size: 0.5em;
    font-weight: 400;
    opacity: 0.8;
}

nav a, .user-auth, .cart-icon {
    color: white;
    text-decoration: none;
    font-weight: 600;
    margin-left: 25px;
    transition: transform 0.2s ease-in-out;
}

nav a:hover, .user-auth:hover, .cart-icon:hover {
    transform: scale(1.05);
}

.user-auth-section {
    display: flex;
    align-items: center;
}

.cart-icon {
    position: relative;
}

.cart-count {
    background-color: var(--accent-color);
    color: white;
    font-size: 0.8em;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 6px;
    position: absolute;
    top: -5px;
    right: -10px;
}

/* Hero Section */
.hero {
    background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
    color: white;
    padding: 80px 0;
    text-align: center;
    border-radius: 15px;
    margin-top: 20px;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.product-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 2px solid var(--bg-color);
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.product-info p {
    color: #666;
    margin-bottom: 15px;
}

.product-price {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.add-to-cart-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    width: 100%;
    text-transform: uppercase;
}

.add-to-cart-btn:hover {
    background-color: #e64a19;
}

/* Cart & Checkout */
.cart-items {
    padding: 20px 0;
}

.cart-item {
    display: flex;
    align-items: center;
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    margin-right: 20px;
}

.item-details {
    flex-grow: 1;
}

.item-details h4 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

.item-details p {
    margin: 5px 0;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.quantity-control button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
}

.remove-btn {
    background-color: #F44336; /* Red */
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 20px;
}

.cart-summary {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-top: 30px;
}

.cart-summary h3 {
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.cart-summary p {
    display: flex;
    justify-content: space-between;
    font-size: 1.2em;
    margin-bottom: 10px;
}

#shipping-address {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
}

.checkout-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.checkout-btn:hover {
    background-color: #0288d1;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5em;
    cursor: pointer;
    color: #666;
}

.auth-form h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.auth-form p {
    margin-bottom: 20px;
    color: #666;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.auth-form button {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.auth-form button:hover {
    background-color: #e64a19;
}

/* Footer */
footer {
    background-color: var(--text-color);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}