/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #8A2BE2;
    --secondary: #FF69B4;
    --accent: #20B2AA;
    --dark: #2C3E50;
    --light: #F8F9FA;
    --success: #28A745;
    --warning: #FFC107;
    --danger: #DC3545;
    --shadow: 0 4px 12px rgba(0,0,0,0.1);
    --radius: 10px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-login, .btn-signup {
    padding: 8px 20px;
    border-radius: var(--radius);
    transition: all 0.3s;
}

.btn-login {
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-signup {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
}

.btn-signup:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Hero Section */
.hero {
    padding: 150px 0 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    margin-top: 60px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: white;
    color: var(--primary);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s;
    animation: fadeInUp 1.5s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Featured Products */
.featured-products {
    padding: 80px 0;
    background: white;
}

.featured-products h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--dark);
    position: relative;
}

.featured-products h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 2px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.product-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
}

.product-price {
    color: var(--primary);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.product-rating {
    color: #FFD700;
    margin-bottom: 15px;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 40px 0;
    text-align: center;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

  /* Home Page Specific Styles */
.btn-add-cart {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Product Card Improvements */
.product-card .product-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--dark);
}

.about-content p {
    font-size: 18px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 30px;
}

/* Contact Info */
.contact-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 250px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.contact-details h4 {
    margin: 0 0 5px 0;
    color: var(--dark);
}

.contact-details p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Footer Improvements */
footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #bbb;
    font-size: 14px;
}

/* Responsive Design Improvements */
@media (max-width: 768px) {
    .contact-info {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-item {
        width: 100%;
        max-width: 300px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--secondary);
    transform: translateY(-5px);
}

 /* ===== HOME PAGE PRODUCT CARD STYLES ===== */

.product-card-home {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card-home:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-image-home {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image-home img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stock-badge-home {
    position: absolute;
    bottom: 15px;
    left: 15px;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.in-stock {
    background: #28a745;
}

.low-stock {
    background: #ffc107;
    color: #333;
}

.out-of-stock-badge {
    background: #dc3545;
}

.product-info-home {
    padding: 20px;
}

.product-info-home h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--dark);
}

.product-meta-home {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.product-category-home,
.product-length-home {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.product-category-home {
    background: #e3f2fd;
    color: #1976d2;
}

.product-length-home {
    background: #f3e5f5;
    color: #7b1fa2;
}

.product-price-home {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin: 10px 0;
}

.product-action-home {
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.product-action-home:hover {
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    transform: translateY(-2px);
}

.product-action-home.out-of-stock {
    background: #6c757d;
    cursor: not-allowed;
}

.product-action-home.out-of-stock:hover {
    transform: none;
    background: #6c757d;
}

/* Empty state for home page */
.empty-state-home {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 20px;
}

.empty-state-home i {
    font-size: 60px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state-home h3 {
    margin-bottom: 10px;
    color: #333;
}

.empty-state-home p {
    margin-bottom: 20px;
    color: #666;
}

/* Responsive adjustments for home products */
@media (max-width: 768px) {
    .search-filter-home {
        flex-direction: column;
    }
    
    #homeCategoryFilter {
        width: 100%;
    }
/* ============================================
   MOBILE RESPONSIVE STYLES (Phone browsers only) - 3 COLUMNS VERSION
   ============================================ */

/* Mobile Responsive Design - NAVIGATION STAYS VISIBLE */
@media screen and (max-width: 768px) {
    /* General mobile adjustments */
    body {
        font-size: 14px;
        width: 100%;
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    .container {
        padding: 0 10px;
        max-width: 100%;
        width: 100%;
    }
    
    /* NAVIGATION BAR - KEPT VISIBLE, NOT COLLAPSIBLE */
    .navbar .container {
        display: flex !important; /* Keep flex layout */
        justify-content: space-between !important; /* Keep spacing */
        align-items: center !important; /* Keep alignment */
        padding: 12px 15px !important; /* Slightly smaller padding */
        flex-wrap: wrap; /* Allow wrapping if needed */
    }
    
    .logo {
        font-size: 24px !important; /* Slightly smaller logo */
    }
    
    /* NAV LINKS - KEPT VISIBLE, SCROLLABLE IF NEEDED */
    .nav-links {
        display: flex !important; /* Keep it visible */
        flex-wrap: wrap; /* Allow wrapping */
        gap: 12px !important; /* Smaller gap */
        align-items: center;
        justify-content: flex-end;
        width: auto; /* Don't take full width */
        overflow-x: auto; /* Allow horizontal scroll if needed */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        padding-bottom: 5px; /* Space for scroll */
    }
    
    .nav-links a {
        font-size: 13px !important; /* Slightly smaller text */
        padding: 6px 10px !important; /* Smaller padding */
        white-space: nowrap; /* Prevent line breaks */
    }
    
    .btn-login, .btn-signup {
        padding: 6px 12px !important; /* Smaller buttons */
        font-size: 12px !important; /* Smaller text */
    }
    
    /* Hero section adjustments */
    .hero {
        padding: 120px 0 60px; /* Adjusted padding for smaller navbar */
        margin-top: 60px; /* Adjusted margin */
    }
    
    .hero h1 {
        font-size: 26px !important;
        line-height: 1.3;
        padding: 0 5px;
    }
    
    .hero p {
        font-size: 16px !important;
        padding: 0 10px;
        margin-bottom: 20px;
    }
    
    .cta-button {
        padding: 12px 28px;
        font-size: 15px;
    }
    
    /* Featured products - 3 COLUMNS LAYOUT */
    .featured-products {
        padding: 40px 0;
    }
    
    .featured-products h2 {
        font-size: 24px !important;
        margin-bottom: 25px;
    }
    
    /* Search and filter - make compact */
    .search-filter-home {
        flex-direction: row !important;
        gap: 10px !important;
        margin-bottom: 25px !important;
        flex-wrap: wrap;
    }
    
    #homeCategoryFilter {
        width: auto !important;
        min-width: 160px !important;
        font-size: 14px !important;
        padding: 10px 12px !important;
    }
    
    .search-box-home {
        flex: 1;
        min-width: 160px;
    }
    
    .search-box-home input {
        padding: 10px 12px 10px 40px !important;
        font-size: 14px !important;
    }
    
    .search-box-home i {
        left: 12px;
        font-size: 16px;
    }
    
    /* Products grid - 3 COLUMNS on mobile */
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important; /* 3 COLUMNS */
        gap: 8px !important;
    }
    
    .product-card, .product-card-home {
        margin: 0;
        max-width: 100%;
    }
    
    .product-img, .product-image-home {
        height: 140px !important; /* Better image size for 3 columns */
    }
    
    .product-title, .product-info-home h3 {
        font-size: 10px !important; /* Better readability */
        margin-bottom: 6px;
        line-height: 1.3;
        text-overflow: ellipsis;
    }
    
    .product-price, .product-price-home {
        font-size: 12px !important; /* Better visibility */
        margin: 6px 0;
        font-weight: 600;
    }
    
    .product-meta-home {
        gap: 3px;
        margin-bottom: 4px;
    }
    
    .product-category-home, .product-length-home {
        padding: 4px 10px;
        font-size: 8px !important;
        border-radius: 10px;
    }
    
    .product-action-home {
        padding: 8px 10px;
        font-size: 12px !important;
        margin-top: 10px;
        border-radius: 6px;
    }
    
    .product-action-home i {
        font-size: 11px;
    }
    
    /* Stock badge */
    .stock-badge-home {
        padding: 2px 6px;
        font-size: 8px !important;
        bottom: 5px;
        left: 5px;
        border-radius: 14px;
    }
    
    /* About section */
    .about-section {
        padding: 40px 0;
    }
    
    .about-content h2 {
        font-size: 24px !important;
        margin-bottom: 20px;
    }
    
    .about-content p {
        font-size: 16px !important;
        margin-bottom: 25px;
        line-height: 1.6;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 18px;
        margin-top: 25px;
    }
    
    .contact-item {
        width: 100%;
        max-width: 100%;
        min-width: auto;
        padding: 18px;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .contact-details h4 {
        font-size: 16px;
        margin-bottom: 5px;
    }
    
    .contact-details p {
        font-size: 14px;
    }
    
    /* Footer adjustments */
    footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }
    
    .footer-section h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .footer-section ul li {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .social-links {
        justify-content: center;
        gap: 12px;
    }
    
    .social-links a {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    /* Scroll to top button */
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    /* General text adjustments */
    h1 {
        font-size: 26px !important;
    }
    
    h2 {
        font-size: 22px !important;
    }
    
    h3 {
        font-size: 18px !important;
    }
    
    p, li, a, span, input, select, button {
        font-size: 14px !important;
    }
}

/* For very small phones */
@media screen and (max-width: 480px) {
    /* Navigation adjustments for very small screens */
    .nav-links {
        gap: 8px !important; /* Smaller gap */
    }
    
    .nav-links a {
        font-size: 12px !important;
        padding: 5px 8px !important;
    }
    
    .logo {
        font-size: 22px !important;
    }
    
    .btn-login, .btn-signup {
        padding: 5px 10px !important;
        font-size: 11px !important;
    }
    
    /* Keep 3 columns */
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }
    
    .hero h1 {
        font-size: 24px !important;
    }
    
    .hero p {
        font-size: 14px !important;
    }
    
    .search-filter-home {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    #homeCategoryFilter {
        width: 100% !important;
        min-width: auto !important;
    }
    
    .search-box-home {
        width: 100%;
    }
    
    /* Slightly smaller product cards */
    .product-img, .product-image-home {
        height: 120px !important;
    }
    
    .product-title, .product-info-home h3 {
        font-size: 13px !important;
    }
    
    .product-price, .product-price-home {
        font-size: 12px !important;
    }
}

/* For larger phones */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 18px !important;
    }
    
    .product-img, .product-image-home {
        height: 150px !important;
    }
    
    .hero h1 {
        font-size: 28px !important;
    }
    
    .product-title, .product-info-home h3 {
        font-size: 15px !important;
    }
}

/* Tablet adjustments */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px;
    }
    
    .product-img, .product-image-home {
        height: 180px !important;
    }
    
    .product-title, .product-info-home h3 {
        font-size: 16px !important;
    }
}

