* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 480px; /* Mobile width constraint */
    background-color: #fff;
    min-height: 100vh;
    padding-bottom: 60px; /* Space for bottom nav */
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* Header */
.main-header {
    padding: 15px;
    background-image: url('/images/headerbg.jpg');
    text-align: center;
    /* background: #fff; */
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.logo-icon {
    font-size: 1.5rem;
    color: #ff5000;
}

.logo-text {
    display: inline-block;
}

.logo-text p {
    margin: 0;
    display: inline;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f5f5f5;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.3s;
}

.language-btn:hover {
    background: #e8e8e8;
}

.language-btn i {
    color: #1890ff;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 120px;
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.language-dropdown.show {
    display: block;
}

.language-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.language-option:hover {
    background: #f5f5f5;
}

.language-option.active {
    background: #e6f7ff;
    color: #1890ff;
}

/* Banner Carousel */
.banner-carousel {
    margin: 10px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    height: 180px;
}

.banner-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    border-radius: 10px;
}

.banner-slide.active {
    opacity: 1;
}

.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.banner-dot.active {
    background: white;
    transform: scale(1.2);
}

.banner-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s;
    opacity: 0;
}

.banner-carousel:hover .banner-arrow {
    opacity: 1;
}

.banner-arrow:hover {
    background: rgba(0, 0, 0, 0.5);
}

.banner-prev {
    left: 10px;
}

.banner-next {
    right: 10px;
}

/* Icon Nav */
.icon-nav {
    display: flex;
    justify-content: space-between;
    padding: 20px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #666;
}

.icon-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.bg-blue { background-color: #5d9cec; }
.bg-cyan { background-color: #4fc1e9; }
.bg-orange { background-color: #ffce54; }
.bg-teal { background-color: #48cfad; }
.bg-red { background-color: #ed5565; }

/* Search Bar */
.search-bar {
    margin: 0 15px 15px;
    display: flex;
    border: 1px solid #eee;
    background: #fff;
}

.search-bar input {
    flex: 1;
    padding: 10px;
    border: none;
    outline: none;
    font-size: 0.9rem;
}

.search-bar button {
    background: #ff5000;
    color: white;
    border: none;
    padding: 0 20px;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f9f9f9;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 5px;
}

.section-title .bar {
    color: #ff5000;
    font-weight: bold;
    font-size: 1.2rem;
}

.section-title h2 {
    font-size: 1rem;
    color: #333;
    font-weight: normal;
}

.more {
    color: #999;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px;
    background: #f5f5f5;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    padding-bottom: 10px;
}

.product-image {
    height: 180px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.img-placeholder {
    width: 100%;
    height: 100%;
}

.bg-blue-grad { background: linear-gradient(to top, #00c6fb 0%, #005bea 100%); }
.bg-white-grad { background: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%); }
.bg-dark-grad { background: linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%); }

.product-info {
    padding: 0 10px;
}

.product-info h3 {
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: bold;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    color: #ff5000;
    font-weight: bold;
}

.sold {
    color: #999;
    font-size: 0.7rem;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid #eee;
    z-index: 100;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 0.8rem;
    gap: 4px;
}

.nav-link.active {
    color: #ff5000;
}

.nav-link i {
    font-size: 1.2rem;
}

/* Category Page Styles */
.category-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding-bottom: 0; /* Override default */
}

.search-header {
    background: #fff;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.search-bar.simple {
    margin: 0;
    border: none;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 0 15px;
    align-items: center;
}

.search-bar.simple input {
    background: transparent;
    padding: 8px;
    font-size: 0.9rem;
    color: #333;
}

.search-icon {
    color: #999;
    font-size: 1rem;
}

.category-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    margin-bottom: 60px; /* Space for bottom nav */
}

.category-sidebar {
    width: 100px;
    background: #f5f5f5;
    overflow-y: auto;
}

.sidebar-item {
    padding: 15px 10px;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
}

.sidebar-item.active {
    background: #fff;
    color: #ff5000;
    font-weight: bold;
    border-left: 3px solid #ff5000;
}

.category-content {
    flex: 1;
    background: #fff;
    padding: 15px;
    overflow-y: auto;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.category-header h3 {
    font-size: 1rem;
    color: #ff5000;
    font-weight: normal;
}

.view-all {
    font-size: 0.8rem;
    color: #999;
    text-decoration: none;
}

.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.subcategory-item {
    background: #f9f9f9;
    padding: 15px 5px;
    text-align: center;
    font-size: 0.8rem;
    color: #333;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Product Detail Page Styles */
.detail-page {
    background: #f5f5f5;
    padding-bottom: 60px;
}

.detail-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    z-index: 100;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.back-btn, .header-actions {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    text-decoration: none;
    font-size: 1.1rem;
}

.header-title {
    font-size: 1rem;
    font-weight: bold;
}

/* Carousel */
.carousel {
    margin-top: 50px;
    position: relative;
    background: #fff;
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
}

.carousel-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.carousel-slide {
    min-width: 100%;
    height: 300px;
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eee;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: background 0.3s;
}

.dot.active {
    background: #fff;
}

/* Product Info */
.product-basic-info {
    background: #fff;
    padding: 15px;
    margin-bottom: 10px;
}

.price-section {
    color: #ff5000;
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.currency {
    font-size: 0.9rem;
    font-weight: bold;
}

.current-price {
    font-size: 1.5rem;
    font-weight: bold;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.8rem;
}

.product-title {
    font-size: 1rem;
    line-height: 1.4;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 0.8rem;
}

/* Detail Content */
.detail-content {
    background: #fff;
    padding: 15px 0;
    text-align: center;
}

.detail-title {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.detail-images img {
    width: 100%;
    display: block;
    margin-bottom: -1px; /* Avoid gaps */
}

/* Bottom Action Bar */
.detail-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 50px;
    background: #fff;
    display: flex;
    border-top: 1px solid #eee;
    z-index: 100;
}

.action-icon {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #666;
    gap: 3px;
    cursor: pointer;
}

.action-icon i {
    font-size: 1.1rem;
}

.action-btn-group {
    flex: 3;
    display: flex;
}

.add-cart, .buy-now {
    flex: 1;
    border: none;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
}

.add-cart {
    background: linear-gradient(to right, #ffc500, #ff9402);
}

.buy-now {
    background: linear-gradient(to right, #ff7a00, #fe050b);
}

/* Contact Float Buttons Container */
.contact-float-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 1000;
}

/* Email Float Button */
.email-float {
    width: 50px;
    height: 50px;
    background-color: #1890ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.email-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(24, 144, 255, 0.5);
}

.email-float i {
    color: white;
    font-size: 1.3rem;
}

/* WhatsApp Float Button */
.whatsapp-float {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.whatsapp-float a {
    width: 50px;
    height: 50px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    animation: whatsapp-shake 2s ease-in-out infinite;
}

.whatsapp-float a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid #25D366;
    animation: whatsapp-ring 1.5s ease-out infinite;
    pointer-events: none;
}

.whatsapp-float a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: whatsapp-ring 1.5s ease-out infinite 0.5s;
    pointer-events: none;
}

@keyframes whatsapp-ring {
    0% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }
    100% {
        width: 180%;
        height: 180%;
        opacity: 0;
    }
}

@keyframes whatsapp-shake {
    0%, 100% {
        transform: rotate(0deg);
    }
    10% {
        transform: rotate(-10deg);
    }
    20% {
        transform: rotate(10deg);
    }
    30% {
        transform: rotate(-10deg);
    }
    40% {
        transform: rotate(10deg);
    }
    50%, 100% {
        transform: rotate(0deg);
    }
}

.whatsapp-float a:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.5);
    animation: none;
}

.whatsapp-float a:hover::before,
.whatsapp-float a:hover::after {
    animation: none;
    opacity: 0;
}

.whatsapp-float img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.float-label {
    font-size: 0.7rem;
    color: #666;
    text-align: center;
    white-space: nowrap;
}

/* Email Modal */
.email-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.email-modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    max-width: 350px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.email-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.email-modal-close:hover {
    color: #333;
}

.email-modal-content h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.1rem;
}

.email-modal-content h3 i {
    color: #1890ff;
    margin-right: 8px;
}

.email-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f5f5f5;
    padding: 12px 15px;
    border-radius: 8px;
}

.email-display span {
    color: #333;
    font-size: 0.95rem;
    word-break: break-all;
}

.copy-btn {
    background: #1890ff;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #40a9ff;
}

/* Language Selector */
.language-selector {
    position: relative;
    display: inline-block;
}

.language-btn {
    background: transparent;
    color: white;

    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.language-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #eee;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1001;
    min-width: 120px;
}

.language-dropdown.show {
    display: block;
}

.language-option {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.language-option:hover {
    background: #f5f5f5;
}

.language-option.active {
    color: #ff5000;
    font-weight: bold;
}
