/* CSS Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg-color: #fff;
    --bg-light: #f8f9fa;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-display: swap;
}

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

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

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.store-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
    margin-bottom: 2px;
}

.store-tagline {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 400;
    letter-spacing: 0.3px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.logo p {
    font-size: 0.9rem;
    color: var(--text-light);
}

.search-bar {
    display: flex;
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.search-bar button {
    padding: 0.75rem 1rem;
    background: var(--secondary-color);
    color: white;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    transition: var(--transition);
}

.search-bar button:hover {
    background: #2980b9;
}

.nav ul {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0;
}

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

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-color);
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background: var(--bg-light);
    color: var(--secondary-color);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.6), rgba(52, 152, 219, 0.6)), 
                url('https://beeka.in/wp-content/uploads/2024/07/ecommerce-website-services-in-kochi.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.7), rgba(52, 152, 219, 0.7));
    z-index: 1;
}

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

.hero-content h2 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    background: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

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

/* Products Section */
.featured-products, .categories-showcase {
    padding: 4rem 0;
}

.featured-products h2, .categories-showcase h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

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

.product-card {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

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

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--bg-light);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

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

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

.rating-text {
    color: var(--text-light);
    font-size: 0.9rem;
}

.product-description {
    color: var(--text-light);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.category-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.category-card:hover {
    background: var(--bg-color);
    border-color: var(--secondary-color);
    transform: translateY(-3px);
}

.category-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

.loading i {
    margin-right: 0.5rem;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.1rem;
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.social-links a.social-placeholder {
    opacity: 0.5;
    cursor: not-allowed;
}

.social-links a.social-placeholder:hover {
    background: rgba(255,255,255,0.1);
    transform: none;
    box-shadow: none;
}

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

.footer-section h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 1rem;
}

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

.footer-section a {
    color: rgba(255,255,255,0.8);
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

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

.social-links a {
    display: inline-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);
    transform: translateY(-2px);
}

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

/* Utility Classes */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: #2980b9;
}

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

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: var(--accent-color);
    color: white;
}

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

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

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Mobile Navigation Styles */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
}

.mobile-nav-content {
    position: absolute;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--bg-color);
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-nav.active .mobile-nav-content {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-menu li {
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-menu a {
    display: block;
    padding: 1rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.mobile-nav-menu a:hover {
    background: var(--bg-light);
    color: var(--secondary-color);
}

.mobile-categories {
    padding: 0;
    margin: 0;
    list-style: none;
}

.mobile-categories li {
    border-bottom: 1px solid var(--border-color);
}

.mobile-categories a {
    display: block;
    padding: 0.75rem 2rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
}

.mobile-categories a:hover {
    background: var(--bg-light);
    color: var(--secondary-color);
}

/* Search Clear Button */
.search-bar {
    position: relative;
}

.search-clear {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    display: none;
}

.search-clear:hover {
    color: var(--text-color);
}

.search-clear.visible {
    display: block;
}

/* Additional Responsive Improvements */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
}

/* Tablet Responsive Design */
@media (max-width: 768px) and (min-width: 481px) {
    .logo-text {
        display: flex;
        flex-direction: column;
    }
    
    .store-name {
        font-size: 1.6rem;
    }
    
    .store-tagline {
        font-size: 0.8rem;
    }
    
    .search-bar {
        margin: 0 1rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }
    
    .logo {
        flex: 1;
    }
    
    .search-bar {
        order: 3;
        width: 100%;
        margin-top: 1rem;
        max-width: 100%;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
        order: 2;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom {
        text-align: center;
    }
    
    /* Product Card Mobile Fixes */
    .product-card {
        max-width: 100%;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-info h3 {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .product-info p {
        font-size: 0.85rem;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
        background-attachment: scroll; /* Fix for mobile */
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .featured-products, .categories-showcase {
        padding: 2rem 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-card {
        margin: 0 auto;
        max-width: 350px;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 1.1rem;
    }
    
    .product-price {
        font-size: 1.2rem;
    }
    
    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Better touch targets */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    /* Improved form inputs */
    input, textarea, select {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Logo adjustments for small screens */
    .logo-img {
        height: 50px;
    }
    
    .store-name {
        font-size: 1.4rem;
    }
    
    .store-tagline {
        font-size: 0.75rem;
    }
    
    /* Better spacing for legal pages */
    .legal-content {
        padding: 2rem 0;
    }
    
    .legal-sections {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .legal-section h2 {
        font-size: 1.4rem;
    }
    
    .legal-section p {
        font-size: 0.9rem;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }
    
    .logo-img {
        height: 45px;
    }
    
    .store-name {
        font-size: 1.2rem;
    }
    
    .store-tagline {
        font-size: 0.7rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .product-card {
        max-width: 100%;
    }
}
