/* NAHL SHOP - Main Stylesheet */

:root {
    --primary-color: #FFC107;
    --secondary-color: #FF9800;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --danger-color: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--text-dark);
    background: #fff;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    background: #1a1a1a;
    color: white;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
}

.menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    margin: 5px 0;
    transition: 0.3s;
}

.logo h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
}

.logo h1 span {
    color: white;
}

.header-actions {
    display: flex;
    gap: 15px;
}

.search-btn, .cart-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.back-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
}

/* Search Container */
.search-container {
    background: white;
    padding: 15px 0;
    display: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-container.active {
    display: block;
}

.search-container input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    font-size: 16px;
    outline: none;
}

/* Banner */
.banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 30px 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.banner-content h2 {
    font-size: 24px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.banner-content h1 {
    font-size: 32px;
    color: #fff;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.banner-content p {
    font-size: 16px;
    color: #fff;
}

/* Categories */
.categories {
    padding: 20px 0;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.category-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    cursor: pointer;
    transition: 0.3s;
}

.category-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 8px;
    border: 2px solid transparent;
    transition: 0.3s;
}

.category-item.active .category-icon,
.category-item:hover .category-icon {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.category-item span {
    font-size: 13px;
    color: var(--text-dark);
    text-align: center;
}

/* Products Section */
.products {
    padding: 20px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 24px;
    color: var(--primary-color);
}

.filter-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #06b6d4;
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
}

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

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.add-to-cart-btn {
    width: 100%;
    background: var(--primary-color);
    color: var(--text-dark);
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.add-to-cart-btn:hover {
    background: var(--secondary-color);
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.quantity-controls button {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--text-dark);
    font-size: 18px;
    cursor: pointer;
    transition: 0.3s;
}

.quantity-controls button:hover {
    background: var(--primary-color);
}

.quantity-controls .delete-btn {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.quantity-controls .delete-btn:hover {
    background: var(--danger-color);
    color: white;
}

.quantity-controls span {
    font-size: 18px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

/* Side Menu */
.side-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    z-index: 1000;
    transition: 0.3s;
}

.side-menu.active {
    left: 0;
}

.side-menu-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    z-index: 1001;
}

.side-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.side-menu-header {
    padding: 20px;
    background: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.side-menu-header h3 {
    font-size: 24px;
    color: var(--text-dark);
}

.close-menu {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--text-dark);
}

.side-menu-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-dark);
    transition: 0.3s;
}

.menu-item:hover {
    background: var(--bg-light);
}

.menu-item .icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.side-menu-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    z-index: 1000;
    transition: 0.3s;
}

.cart-sidebar.active {
    right: 0;
}

.cart-sidebar-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    z-index: 1001;
}

.cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.cart-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.cart-tab {
    flex: 1;
    padding: 15px;
    background: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    transition: 0.3s;
}

.cart-tab.active {
    color: var(--text-dark);
    background: var(--primary-color);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart {
    text-align: center;
    color: var(--text-light);
    padding: 40px 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 12px;
    margin-bottom: 15px;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 10px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
}

.total-amount {
    font-size: 24px;
    color: var(--text-dark);
}

.checkout-btn {
    display: block;
    width: 100%;
    background: var(--primary-color);
    color: var(--text-dark);
    text-align: center;
    padding: 15px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: 0.3s;
}

.checkout-btn:hover {
    background: var(--secondary-color);
}

/* Floating Cart */
.floating-cart {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    z-index: 999;
}

.floating-cart-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
}

.floating-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.floating-text {
    font-weight: 600;
    color: var(--text-dark);
}

.floating-price {
    font-weight: bold;
    font-size: 18px;
    color: var(--text-dark);
}

/* Checkout Page */
.checkout-page {
    padding: 20px 0;
    min-height: calc(100vh - 60px);
}

.checkout-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-light);
    font-size: 13px;
}

.delivery-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.delivery-section h3 {
    margin-bottom: 15px;
    color: var(--text-dark);
}

.delivery-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.delivery-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
}

.delivery-option.selected {
    border-color: var(--primary-color);
    background: #fffbeb;
}

.delivery-option input[type="radio"] {
    margin-right: 15px;
}

.delivery-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delivery-time {
    color: var(--text-light);
    font-size: 14px;
}

.delivery-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-dark);
}

.free-delivery-notice {
    background: #fef3c7;
    color: #92400e;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.order-summary {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-row.total {
    border-bottom: none;
    font-size: 20px;
    font-weight: bold;
    margin-top: 10px;
}

.final-total {
    font-size: 28px;
    color: var(--primary-color);
}

.place-order-btn {
    width: 100%;
    background: var(--primary-color);
    color: var(--text-dark);
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.3s;
}

.place-order-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.place-order-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success Page */
.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-light);
}

.success-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.success-icon {
    margin-bottom: 20px;
}

.success-card h1 {
    font-size: 28px;
    color: var(--success-color);
    margin-bottom: 10px;
}

.success-message {
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.8;
}

.order-info {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.order-number {
    font-size: 18px;
}

.order-number strong {
    color: var(--primary-color);
    font-size: 24px;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-primary,
.btn-secondary {
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    display: block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-dark);
    border: none;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
}

/* Admin Styles */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.admin-dashboard {
    background: var(--bg-light);
    min-height: 100vh;
}

.admin-header {
    background: #1a1a1a;
    color: white;
    padding: 15px 0;
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.admin-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: 0.3s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--primary-color);
    color: var(--text-dark);
}

.logout-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--text-dark);
}

.admin-table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--bg-light);
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-paid {
    background: #dbeafe;
    color: #1e40af;
}

.status-shipped {
    background: #e0e7ff;
    color: #4338ca;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    margin: 0 4px;
    transition: 0.3s;
}

.btn-edit {
    background: #3b82f6;
    color: white;
}

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

.add-product-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .banner-content h2 {
        font-size: 20px;
    }
    
    .banner-content h1 {
        font-size: 28px;
    }
    
    .admin-nav {
        flex-wrap: wrap;
    }
    
    .admin-table {
        overflow-x: auto;
    }
}
