/* Global Styles */
:root {
    --primary-color: #4A90E2;
    --secondary-color: #6c757d;
    --dark-color: #2C3E50;
    --light-color: #f8f9fa;
    --success-color: #2ECC71;
    --danger-color: #E74C3C;
    --warning-color: #F1C40F;
    --info-color: #3498DB;
    --accent-color: #9B59B6;
    --gradient-start: #4A90E2;
    --gradient-end: #2C3E50;
    --gradient-accent: #9B59B6;
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

/* Performance Optimizations */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    padding-top: 76px; /* Adjusted for fixed navbar */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Optimize Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Enhanced Mobile Navigation */
.navbar {
    transition: all 0.3s ease;
    background-color: var(--dark-color) !important;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(155, 89, 182, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(74, 144, 226, 0.2) 0%, transparent 50%),
        linear-gradient(45deg, rgba(46, 204, 113, 0.1) 0%, transparent 70%);
    animation: backgroundShift 20s ease-in-out infinite alternate;
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
    color: var(--light-color);
}

.hero-content h1 {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.3s;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-content p {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.6s;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Enhanced Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(1deg);
    }
}

@keyframes backgroundShift {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add decorative elements */
.hero-section::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(155, 89, 182, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
    z-index: 0;
}

/* Enhanced Card Styles */
.category-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform var(--transition-speed);
    height: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card i {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-card h3 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.product-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    background-color: #fff;
    transition: transform var(--transition-speed);
}

.product-image-container:hover .product-image {
    transform: scale(1.05);
}

.product-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 1.5rem;
    text-align: center;
    transition: transform var(--transition-speed);
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.product-card img {
    border-radius: 5px;
    margin-bottom: 1rem;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.product-card h3 {
    color: var(--dark-color);
    font-size: 1.25rem;
    margin: 0;
    min-height: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .description {
    color: var(--secondary-color);
    margin: 0;
    min-height: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .btn {
    margin-top: auto;
    padding: 0.75rem 1.5rem;
}

/* About Section */
#about {
    background-color: var(--light-color);
}

#about h2 {
    color: var(--dark-color);
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    background-color: var(--dark-color);
}

footer h5 {
    color: white;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
    
    .hero-section img {
        margin-top: 2rem;
    }
    
    .category-card, .product-card {
        margin-bottom: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .product-image {
        height: 250px;
    }
    
    .product-card {
        padding: 1rem;
        gap: 0.75rem;
    }

    .product-image-container {
        padding-top: 75%; /* 4:3 Aspect Ratio for mobile */
    }

    .product-info {
        gap: 0.5rem;
    }

    .product-card h3 {
        font-size: 1.1rem;
    }

    .product-card .description {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
    }

    .product-card .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .hero-content {
        animation: float 8s ease-in-out infinite;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }

    .hero-section::after {
        width: 150px;
        height: 150px;
        top: -75px;
        right: -75px;
    }
}

@media (max-width: 576px) {
    .product-image {
        height: 200px;
    }
}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .category-card,
    .product-card {
        padding: 1.75rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .category-card:hover,
    .product-card:hover {
        transform: none;
    }
    
    .btn-primary:hover,
    .btn-outline-primary:hover {
        transform: none;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Print Styles */
@media print {
    .navbar, .hero-section {
        display: none;
    }
    
    body {
        padding-top: 0;
    }
    
    .container {
        width: 100%;
        max-width: none;
    }
}

/* Amazon Button Styles */
.btn-amazon {
    background-color: #FF9900;
    color: #000;
    border: none;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-amazon:hover {
    background-color: #FF8C00;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 153, 0, 0.2);
}

.btn-amazon .fa-amazon {
    font-size: 1.2em;
}

/* Product Card Enhancements */
.product-buttons {
    margin-top: 1rem;
    width: 100%;
}

.product-buttons .btn {
    width: 100%;
    padding: 0.8rem;
    font-size: 1.1rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin: 0 0 0.5rem 0;
    }
}

/* Product Card Button Hover Effect */
.product-card .btn-amazon {
    transform: translateY(0);
    opacity: 0.95;
}

.product-card:hover .btn-amazon {
    transform: translateY(-2px);
    opacity: 1;
}

/* Category Titles */
.category-title {
    color: var(--dark-color);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

/* Product Grid Improvements */
.row.g-4 {
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .category-title {
        text-align: center;
        margin-top: 1.5rem;
    }
    
    .category-title::after {
        left: 50%;
        transform: translateX(-25px);
    }
}

/* Language Selector Styles */
.nav-item.dropdown {
    margin-left: 0.5rem;
}

.nav-item.dropdown .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item.dropdown .nav-link i {
    font-size: 1.1rem;
}

.dropdown-menu {
    background-color: var(--dark-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    min-width: 150px;
}

.dropdown-item {
    color: var(--light-color);
    padding: 0.5rem 1rem;
    transition: all var(--transition-speed) ease;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light-color);
}

.dropdown-item.active {
    background-color: var(--primary-color);
    color: var(--light-color);
}

/* Mobile Responsive Adjustments */
@media (max-width: 991.98px) {
    .nav-item.dropdown {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .nav-item.dropdown .nav-link {
        padding: 0.5rem 1rem;
    }

    .dropdown-menu {
        background-color: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        margin-left: 1rem;
    }

    .dropdown-item {
        color: var(--light-color);
        padding: 0.5rem 1rem;
    }

    .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .dropdown-item.active {
        background-color: var(--primary-color);
    }
}

/* Blog Section Styles */
.blog-header {
    background-color: var(--bs-light);
    border-bottom: 1px solid var(--bs-border-color);
}

.blog-header h1 {
    color: var(--bs-primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.blog-header .lead {
    color: var(--bs-secondary);
    max-width: 800px;
    margin: 0 auto;
}

.blog-posts {
    min-height: 400px;
}

/* Blog Card Styles */
.blog-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.blog-image-container {
    position: relative;
    width: 100%;
    padding-top: 60%; /* 5:3 Aspect Ratio */
    overflow: hidden;
}

.blog-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image {
    transform: scale(1.05);
}

.blog-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
    line-height: 1.4;
}

.blog-excerpt {
    color: var(--secondary-color);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.blog-date, .blog-category {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-date i, .blog-category i {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-header .lead,
    .blog-posts .lead {
        font-size: 1rem;
    }
    
    .blog-title {
        font-size: 1.1rem;
    }
    
    .blog-excerpt {
        font-size: 0.9rem;
    }
    
    .blog-content {
        padding: 1.25rem;
    }
} 