/* Base Design Tokens */
:root {
    --bg-primary: #0a0d14;
    --bg-secondary: #11141d;
    --bg-card: #181d28;
    --accent-red: #e63946;
    --accent-gold: #d4af37;
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --border-color: rgba(255, 255, 255, 0.06);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-primary);
    position: relative;
    padding-bottom: 90px; /* Space for sticky footer button */
}

/* App Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(10, 13, 20, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 16px 12px 16px;
}

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

.logo-area {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ffffff 30%, #e63946 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-subtitle {
    font-size: 10px;
    font-weight: 600;
    color: var(--accent-gold);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 18px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.lang-btn.active {
    background-color: var(--accent-red);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

/* Search Container */
.search-container {
    position: relative;
    width: 100%;
    margin-bottom: 16px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 15px;
}

#search-input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 14px 12px 42px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

#search-input:focus {
    border-color: var(--accent-red);
    background-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 12px rgba(230, 57, 70, 0.15);
}

/* Categories Horizontal Scroll */
.categories-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.categories-nav::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 16px;
    border-radius: 25px;
    white-space: nowrap;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.category-tab i {
    font-size: 13px;
}

.category-tab.active {
    background-color: rgba(230, 57, 70, 0.12);
    border-color: var(--accent-red);
    color: #ffffff;
    font-weight: 600;
}

/* Products Section */
.products-section {
    padding: 16px;
    flex-grow: 1;
}

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

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
}

.product-count {
    font-size: 12px;
    color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.04);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

/* Products Grid */
.products-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.product-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-md);
}

.product-image-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    background-color: rgba(0, 0, 0, 0.2);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.product-card:hover .product-image {
    transform: scale(1.03);
}

.product-info {
    padding: 16px;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #ffffff;
}

.product-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.4;
}

.product-meta {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meta-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.meta-value {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
}

.price-item {
    text-align: right;
}

.price-value {
    color: var(--accent-gold);
    font-size: 15px;
    font-weight: 700;
}

/* No Results State */
.no-results {
    text-align: center;
    padding: 48px 16px;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 40px;
    margin-bottom: 12px;
    color: var(--accent-red);
    opacity: 0.8;
}

/* Terms Banner Alert */
.terms-banner {
    margin: 16px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0.02) 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.terms-icon {
    font-size: 20px;
    color: var(--accent-gold);
}

.terms-content {
    flex-grow: 1;
}

.terms-content h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 2px;
}

.terms-content p {
    font-size: 11px;
    color: var(--text-secondary);
}

.terms-detail-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}

/* Footer & Buttons */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(10, 13, 20, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    padding: 14px 16px;
    display: flex;
    justify-content: center;
    z-index: 99;
}

.order-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #e63946 0%, #b21e29 100%);
    color: #ffffff;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
    width: 100%;
    max-width: 468px;
    padding: 14px;
    border-radius: 14px;
    border: none;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.order-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

.order-btn:active {
    transform: translateY(1px);
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: var(--transition-smooth);
}

.modal.active {
    visibility: visible;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px 20px;
    transform: translateY(100%);
    transition: var(--transition-smooth);
    max-width: 500px;
    margin: 0 auto;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-gold);
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 22px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.close-modal-btn:hover {
    color: #ffffff;
}

.terms-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.terms-list li {
    position: relative;
    padding-left: 24px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.terms-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-gold);
    font-weight: bold;
    font-size: 14px;
}
