/* Nidzon - Responsive CSS */
:root {
    --primary-green: #39FF14;
    --primary-hover: #2DE00D;
    --secondary-color: #FF4742;
    --text-color: #111111;
    --text-secondary: #666666;
    --bg-color: #FFFFFF;
    --bg-light: #F5F5F5;
    --border-color: #E8E8E8;
    --border-radius: 12px;
    --box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    --header-height: 70px;
    --mobile-header-height: 60px;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header - Mobile First */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--mobile-header-height);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 15px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-icon {
    width: 35px;
    height: 35px;
    background: var(--primary-green);
    border-radius: 8px;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-weight: bold;
    font-size: 16px;
}

.logo-text {
    color: var(--text-color);
    font-size: 18px;
    font-weight: bold;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-color);
    padding: 8px;
}

/* Search Bar - Mobile */
.search-container {
    position: fixed;
    top: var(--mobile-header-height);
    left: 0;
    right: 0;
    background: white;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: none;
    z-index: 999;
}

.search-box {
    display: flex;
    background: white;
    border-radius: 25px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 2px solid var(--primary-green);
}

.search-input {
    flex: 1;
    border: none;
    padding: 12px 15px;
    border-radius: 25px;
    outline: none;
    font-size: 16px;
    background: transparent;
}

.search-button {
    background: var(--primary-green);
    color: var(--text-color);
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    white-space: nowrap;
}

/* Navigation */
.nav {
    position: fixed;
    top: var(--mobile-header-height);
    left: -100%;
    width: 280px;
    height: calc(100vh - var(--mobile-header-height));
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    z-index: 998;
    overflow-y: auto;
}

.nav.active {
    left: 0;
}

.nav-list {
    list-style: none;
    padding: 20px 0;
}

.nav-item {
    border-bottom: 1px solid var(--border-color);
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--bg-light);
    color: var(--primary-green);
}

.nav-link.active {
    color: var(--primary-green);
    background: var(--bg-light);
}

/* Cart Badge */
.cart-badge {
    background: var(--primary-green);
    color: var(--text-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 8px;
}

/* Main Content */
.main {
    margin-top: var(--mobile-header-height);
    min-height: calc(100vh - var(--mobile-header-height));
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-hover));
    padding: 40px 0;
    margin-bottom: 20px;
}

.hero-content {
    text-align: center;
    color: white;
    padding: 0 15px;
}

.hero-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 15px 20px;
}

.category-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 15px 10px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.category-icon {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.category-name {
    font-size: 12px;
    font-weight: 500;
}

/* Products Grid */
.products-section {
    padding: 20px 15px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.3rem;
    color: var(--text-color);
    font-weight: bold;
}

.view-all {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

.product-image {
    position: relative;
    padding-top: 75%;
    background: var(--bg-light);
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--secondary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

.product-info {
    padding: 12px;
}

.product-title {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 8px;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-title a {
    color: var(--text-color);
    text-decoration: none;
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.rating-stars {
    color: #FFD700;
    font-size: 12px;
    margin-left: 5px;
}

.rating-count {
    color: var(--text-secondary);
    font-size: 11px;
}

.product-price {
    margin-bottom: 10px;
}

.current-price {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-green);
    display: block;
}

.original-price {
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.product-shipping {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.add-to-cart-btn {
    width: 100%;
    background: var(--primary-green);
    color: var(--text-color);
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    transition: background 0.3s ease;
}

.add-to-cart-btn:hover {
    background: var(--primary-hover);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background: var(--primary-green);
    color: var(--text-color);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.btn-secondary:hover {
    background: var(--primary-green);
    color: var(--text-color);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-green);
}

/* Flash Messages */
.flash-messages {
    padding: 15px;
}

.flash-message {
    padding: 12px 16px;
    margin: 10px 0;
    border: 2px solid var(--primary-green);
    border-radius: var(--border-radius);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flash-success {
    background: #d4ffd4;
}

.flash-error {
    background: #ffd4d4;
}

.flash-warning {
    background: #fff3cd;
}

.flash-info {
    background: #d4edff;
}

/* Footer */
.footer {
    background: var(--bg-light);
    padding: 40px 0 20px;
    border-top: 3px solid var(--primary-green);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0 15px;
}

.footer-section h3 {
    color: var(--primary-green);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-section h4 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-green);
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Product Detail Page */
.product-detail {
    padding: 20px 15px;
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--primary-green);
    text-decoration: none;
}

.product-gallery-mobile {
    margin-bottom: 20px;
}

.main-image {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
}

.main-image img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    overflow-x: auto;
}

.thumbnail {
    width: 60px;
    height: 60px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
}

.thumbnail.active {
    border-color: var(--primary-green);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Cart Page */
.cart-page {
    padding: 20px 15px;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-size: 14px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.cart-item-price {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-green);
    margin-bottom: 8px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-input {
    width: 40px;
    text-align: center;
    font-weight: 500;
    border: none;
    background: transparent;
}

.cart-item-total {
    text-align: center;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 14px;
    margin-top: 5px;
}

/* Checkout Page */
.checkout-page {
    padding: 20px 15px;
}

.checkout-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.checkout-section h2 {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 1.2rem;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-option.selected {
    border-color: var(--primary-green);
    background: var(--bg-light);
}

.payment-option input {
    transform: scale(1.2);
}

/* Success Page */
.success-page {
    padding: 40px 20px;
    text-align: center;
}

.success-icon {
    font-size: 80px;
    color: var(--primary-green);
    margin-bottom: 20px;
}

/* Responsive Design */
@media (min-width: 768px) {
    .header {
        height: var(--header-height);
    }
    
    .header-inner {
        padding: 0 20px;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .search-container {
        position: static;
        display: block !important;
        background: transparent;
        padding: 0;
        box-shadow: none;
        flex: 1;
        max-width: 500px;
        margin: 0 20px;
    }
    
    .nav {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        box-shadow: none;
        display: block;
    }
    
    .nav-list {
        display: flex;
        align-items: center;
        gap: 20px;
        padding: 0;
    }
    
    .nav-item {
        border-bottom: none;
    }
    
    .nav-link {
        padding: 8px 12px;
        border-radius: var(--border-radius);
    }
    
    .main {
        margin-top: var(--header-height);
    }
    
    .categories-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 15px;
        padding: 0 20px 30px;
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
        padding: 0 20px;
    }
    
    .product-detail-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .checkout-content {
        display: grid;
        grid-template-columns: 1fr 400px;
        gap: 30px;
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .categories-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (max-width: 767px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .checkout-content {
        display: block;
    }
    
    .order-summary {
        margin-top: 30px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.mt-0 { margin-top: 0; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

.p-0 { padding: 0; }
.p-10 { padding: 10px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-green);
    color: var(--text-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    box-shadow: var(--box-shadow);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 999;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 10px;
    flex: 1;
}

.mobile-nav-item.active {
    color: var(--primary-green);
}

.mobile-nav-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

/* Hide mobile bottom nav on desktop */
@media (min-width: 768px) {
    .mobile-bottom-nav {
        display: none;
    }
    
    .back-to-top {
        bottom: 30px;
        right: 30px;
    }
}