/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #4CAF50;
    color: white;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    transform: translateX(120%);
    transition: transform 0.3s ease-in-out;
    max-width: 300px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: #f44336;
}

.notification.warning {
    background: #ff9800;
}

.notification i {
    font-size: 1.2em;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

:root {
    --primary-color: #4CAF50;
    --primary-hover: #3d8b40;
    --primary-light: #e8f5e9;
    --secondary-color: #FF9800;
    --secondary-hover: #f57c00;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --danger-color: #ef4444;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --text-color: #1e293b;
    --text-light: #64748b;
    --max-width: 1200px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 15px;
    overflow: hidden;
}

/* Header */
header {
    background-color: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(203, 213, 225, 0.3);
    transition: var(--transition);
    transform: translateY(0);
}

header.scrolled {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.98);
}

header.scrolled {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 5px 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo a {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--dark-color);
    text-decoration: none;
}

.logo span {
    color: var(--primary-color);
}

.search-bar {
    flex: 0.6;
    display: flex;
    margin: 0 20px;
}

.search-bar {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.search-bar input {
    width: 100%;
    padding: 14px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 0.95rem;
    transition: var(--transition);
    background-color: #f8fafc;
    box-shadow: var(--shadow-sm);
    padding-right: 50px;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2);
    transform: translateY(-1px);
}

.search-bar button {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.search-bar button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px) scale(1.05);
    box-shadow: var(--shadow-md);
}

.search-bar button:active {
    transform: translateY(0) scale(0.98);
}

.search-bar button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar button:hover {
    background-color: var(--primary-hover);
    transform: translateX(2px);
}

.header-actions {
    display: flex;
    gap: 20px;
}

.header-actions a {
    color: var(--dark-color);
    font-size: 1.3rem;
    text-decoration: none;
    position: relative;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f9fa;
}

.header-actions a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px) rotate(5deg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

/* Navigation */
nav {
    background-color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    justify-content: space-between;
    padding: 0;
    margin: 0;
}

.nav-links li a {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    padding: 16px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.nav-links li a i {
    margin-right: 8px;
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.nav-links li a:hover i {
    transform: translateX(3px);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
    transform: translateX(-50%);
    border-radius: 3px;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 70%;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.nav-links li a:hover,
.nav-links li a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Mobile Menu Button */
.menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .search-bar {
        flex: 0.7;
    }
    
    .nav-links li a {
        padding: 15px 8px;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
        padding: 10px 0;
    }
    
    .search-bar {
        order: 3;
        flex: 1 1 100%;
        margin: 10px 0 0 0;
    }
    
    .menu-btn {
        display: block;
    }
    
    nav {
        display: none;
    }
    
    nav.active {
        display: block;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .nav-links li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links li a {
        padding: 12px 15px;
    }
}

@media (max-width: 576px) {
    .logo a {
        font-size: 1.5rem;
    }
    
    .header-actions {
        gap: 15px;
    }
    
    .header-actions a {
        font-size: 1.1rem;
    }
    
    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
    }
}

/* Featured Products Section */
.featured-section {
    padding: 60px 0;
    background-color: var(--light-color);
    position: relative;
    overflow: hidden;
}

.featured-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0) 100%);
    z-index: 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

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

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Category Banner */
.category-banner {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-image: url('../photos/background.png');
    color: white;
    padding: 120px 0;
    position: relative;
    margin-bottom: 60px;
    animation: gradientShift 15s ease infinite;
    background-blend-mode: multiply;
}

/* Center banner text horizontally */
.category-banner .container {
    text-align: center;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.category-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.category-banner .container {
    position: relative;
    z-index: 1;
}

.category-banner h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Products Grid */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 30px 0;
    position: relative;
    z-index: 1;
    min-height: 300px; /* Ensure minimum height */
}

/* Make sure product cards are visible */
#products-container {
    opacity: 1 !important;
    visibility: visible !important;
    display: grid !important;
}

/* Ensure product cards have proper styling */
.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    opacity: 1 !important;
    transform: none !important;
}

/* Featured Products Grid */
#featured-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
    position: relative;
    z-index: 1;
}

#featured-products .product-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

#featured-products .product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 2;
}

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

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    transform: translateY(0);
    will-change: transform, box-shadow;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    z-index: 2;
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0) 100%);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
    pointer-events: none;
}

.product-card:hover::before {
    opacity: 1;
}

.product-badge, .featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    color: white;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: var(--shadow-sm);
    animation: pulse 2s infinite;
}

.product-badge {
    background: var(--danger-color);
    right: auto;
    left: 12px;
}

.featured-badge {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0) 100%);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.product-card:hover::before {
    opacity: 1;
}

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

.product-img {
    height: 200px;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.product-info {
    padding: 15px;
}

.product-info h3 {
    margin-bottom: 10px;
    color: var(--dark-color);
    font-size: 1.1rem;
    transition: var(--transition);
}

.product-card:hover .product-info h3 {
    color: var(--primary-color);
}

.product-info p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.6;
    transition: var(--transition);
}

.product-card:hover .product-info p {
    color: var(--text-color);
}

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
}

.price {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.price::before {
    content: '$';
    font-size: 0.9em;
    opacity: 0.8;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    margin-left: 5px;
}

.add-to-cart {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart i {
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    letter-spacing: 1px;
}

.add-to-cart:hover i {
    transform: translateX(3px);
}

.add-to-cart:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(76, 175, 80, 0.3);
}

.add-to-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

.add-to-cart:hover::before {
    left: 100%;
}

.add-to-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--primary-hover);
    transition: var(--transition);
    z-index: -1;
}

.add-to-cart:hover::before {
    width: 100%;
}

.add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.add-to-cart:active {
    transform: translateY(0);
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #3d8b40;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    color: white;
    padding: 70px 0 0;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

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

.footer-column h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.footer-column h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-column p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #ecf0f1;
}

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

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

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

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

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

/* Responsive Adjustments */
@media (max-width: 768px) {
    .category-banner {
        padding: 60px 0;
    }
    
    .category-banner h1 {
        font-size: 2rem;
    }
    
    .products {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .category-banner {
        padding: 40px 0;
    }
    
    .category-banner h1 {
        font-size: 1.8rem;
    }
    
    .products {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}
