/* M3R2 Online Store Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    color: #1e40af;
    line-height: 1.6;
}

/* Header */
.header {
    background: #ffffff;
    border-bottom: 2px solid #e5e7eb;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #1e40af;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: #1e40af;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-links a:hover {
    background: #dbeafe;
}

.cart-link {
    background: #3b82f6;
    color: white !important;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Hero Banner Slideshow */
.hero-banner {
    width: 100%;
    overflow: hidden;
    position: relative;
    background: #f0f4ff;
}

.hero-slideshow {
    position: relative;
    width: 100%;
    height: 300px;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    overflow: hidden;
}

/* Background Image */
.hero-bg-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    z-index: 1;
    display: block;
    opacity: 1;
}


.hero-slide.active {
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: white;
    text-align: center;
    max-width: 800px;
    padding: 40px;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    animation: slideInLeft 0.8s ease-out;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

.hero-btn {
    display: inline-block;
    padding: 15px 40px;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideInLeft 0.8s ease-out 0.4s both;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.hero-image {
    flex: 1;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    animation: fadeIn 1s ease-out;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

/* Navigation Dots */
.hero-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid white;
}

.hero-dot.active {
    background: white;
    transform: scale(1.3);
}

.hero-dot:hover {
    background: white;
    transform: scale(1.2);
}

/* Navigation Arrows */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-arrow:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-slideshow {
        height: 250px;
    }
    
    .hero-slide {
        padding: 0;
    }
    
    .hero-bg-image {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 90%;
        max-height: 90%;
        width: auto;
        height: auto;
        object-fit: contain;
        display: block;
        opacity: 1;
    }
    
    .hero-content {
        padding: 20px;
        max-width: 100%;
    }
    
    .hero-content h1 {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .hero-content p {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .hero-btn {
        padding: 10px 25px;
        font-size: 14px;
    }
    
    .hero-arrow {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .hero-prev {
        left: 10px;
    }
    
    .hero-next {
        right: 10px;
    }
    
    .hero-dots {
        bottom: 10px;
    }
    
    .hero-dot {
        width: 8px;
        height: 8px;
    }
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #1e40af;
}

.btn-secondary {
    background: white;
    color: #1e40af;
    border: 2px solid #1e40af;
}

.btn-secondary:hover {
    background: #dbeafe;
}

/* Products Section */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 10px;
}

.section-title {
    font-size: 18px;
    color: #1e40af;
    margin-bottom: 5px;
    text-align: left;
    padding-left: 5px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: #f3f4f6;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 8px;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: #3b82f6;
    margin-bottom: 10px;
}

.original-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 14px;
    margin-right: 10px;
}

.badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.badge {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.badge-sale {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

.badge-offer {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
}

.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.add-to-cart-btn:hover {
    background: #1e40af;
}

/* Categories */
.categories-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 #f3f4f6;
    padding: 10px 0;
}

.categories-wrapper::-webkit-scrollbar {
    height: 6px;
}

.categories-wrapper::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 10px;
}

.categories-wrapper::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 10px;
}

.scroll-hint {
    text-align: center;
    color: #6b7280;
    font-size: 11px;
    margin-bottom: 5px;
    display: none;
}

@media (max-width: 768px) {
    .scroll-hint {
        display: block;
    }
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

/* Horizontal scroll for products - ALL SCREENS */
.products-scroll {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 8px;
    padding: 10px 3px;
    margin-top: 10px;
    scrollbar-width: none;
}

.products-scroll::-webkit-scrollbar {
    display: none;
}

/* Category icons horizontal scroll - ALL SCREENS */
.categories-scroll {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 8px;
    padding: 10px 3px;
    margin-top: 10px;
    scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-card-compact {
    flex: 0 0 auto;
    width: 100px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    text-decoration: none;
    scroll-snap-align: start;
    transition: transform 0.2s;
}

.category-card-compact:hover {
    transform: scale(1.05);
}

.category-card-compact:active {
    transform: scale(0.95);
}

.category-icon-compact {
    font-size: 32px;
    margin-bottom: 6px;
}

.category-name-compact {
    font-size: 11px;
    color: #1e40af;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card-small {
    flex: 0 0 calc(25% - 8px);
    min-width: 140px;
    max-width: 160px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

.product-card-small:active {
    transform: scale(0.98);
}

.product-card-small .badges {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.badge-small {
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: bold;
}

.badge-sale {
    background: #ef4444;
    color: white;
}

.badge-offer {
    background: #f59e0b;
    color: white;
}

.product-image-small {
    width: 100%;
    height: 100px;
    object-fit: cover;
    background: #f9fafb;
}

.no-image-small {
    width: 100%;
    height: 100px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 11px;
}

.product-info-small {
    padding: 8px;
}

.product-name-small {
    font-size: 12px;
    color: #1e40af;
    margin-bottom: 5px;
    height: 28px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

.product-price-small {
    font-size: 14px;
    font-weight: bold;
    color: #3b82f6;
    margin-bottom: 6px;
}

.original-price-small {
    font-size: 11px;
    color: #9ca3af;
    text-decoration: line-through;
    margin-right: 5px;
}

.add-to-cart-btn-small {
    width: 100%;
    padding: 6px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.add-to-cart-btn-small:active {
    background: #1e40af;
}

.view-all-link {
    text-align: center;
    margin-top: 5px;
    padding: 5px 0;
}

.view-all-btn {
    display: inline-block;
    padding: 8px 20px;
    background: white;
    color: #3b82f6;
    border: 1px solid #3b82f6;
    border-radius: 20px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s;
}

.view-all-btn:active {
    background: #3b82f6;
    color: white;
}

/* Mobile horizontal scroll for categories */
@media (max-width: 768px) {
    .categories-grid {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 12px;
        padding: 10px 5px;
        margin-top: 20px;
        scrollbar-width: none;
    }
    
    .categories-grid::-webkit-scrollbar {
        display: none;
    }
    
    .category-card {
        flex: 0 0 auto;
        width: 140px;
        scroll-snap-align: start;
    }
}

.category-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: #1e40af;
}

.category-card:hover {
    border-color: #3b82f6;
    background: #dbeafe;
}

.category-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.category-name {
    font-size: 16px;
    font-weight: 600;
}

/* Footer */
.footer {
    background: #1e40af;
    color: white;
    padding: 40px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-section p,
.footer-section a {
    color: #dbeafe;
    text-decoration: none;
    line-height: 2;
}

.footer-section a:hover {
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header {
        padding: 10px 0;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
        padding: 0 15px;
    }
    
    .logo {
        font-size: 20px;
        text-align: center;
    }
    
    .nav-links {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    .nav-links a {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .hero {
        padding: 40px 15px;
    }
    
    .hero h1 {
        font-size: 24px;
        line-height: 1.3;
        margin-bottom: 10px;
    }
    
    .hero p {
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .btn {
        padding: 10px 24px;
        font-size: 14px;
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
    
    .container {
        padding: 30px 15px;
    }
    
    .section-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-card {
        border-radius: 8px;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-name {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .product-price {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .badges {
        top: 5px;
        left: 5px;
    }
    
    .badge {
        padding: 3px 6px;
        font-size: 10px;
    }
    
    .add-to-cart-btn {
        padding: 8px;
        font-size: 13px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .category-card {
        padding: 15px 10px;
    }
    
    .category-icon {
        font-size: 36px;
        margin-bottom: 8px;
    }
    
    .category-name {
        font-size: 14px;
    }
    
    .footer {
        padding: 30px 15px;
        margin-top: 40px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .popup-content {
        padding: 20px;
        width: 95%;
    }
    
    .popup-header h2 {
        font-size: 20px;
    }
}
