/**
 * SwissApp Shops - Public Storefront Styles
 */

:root {
    --primary: #F97316;
    --primary-dark: #EA580C;
    --primary-light: #FDBA74;
    --secondary: #1f2937;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --bg-primary: #f9fafb;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   LOADING STATE
   ======================================== */

.loading-screen {
    position: fixed;
    inset: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid #E5E7EB;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   ERROR STATE
   ======================================== */

.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.error-content {
    max-width: 400px;
}

.error-icon {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.5rem;
    background: #FEE2E2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #EF4444;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ========================================
   HEADER
   ======================================== */

.shop-header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-banner {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--primary);
    position: relative;
}

.header-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.3));
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.shop-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.shop-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.shop-logo img {
    max-height: 50px;
    width: auto;
    object-fit: contain;
}

.shop-logo:not(:has(img)) {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-lg);
    background: var(--primary);
}

.shop-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.shop-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.shop-status.open {
    color: var(--success);
}

.shop-status.closed {
    color: var(--danger);
}

.shop-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* View Mode Toggle */
.view-mode-toggle {
    display: flex;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 4px;
    gap: 2px;
}

.view-mode-btn {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.view-mode-btn:hover {
    color: var(--text-primary);
    background: white;
}

.view-mode-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   CART BUTTON
   ======================================== */

.cart-button {
    position: relative;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

.cart-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.shop-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ========================================
   CATEGORIES NAV
   ======================================== */

.categories-nav {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 1rem 0;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categories-nav::-webkit-scrollbar {
    display: none;
}

.category-chip {
    background: white;
    border: 2px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.category-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ========================================
   PRODUCTS GRID
   ======================================== */

.products-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ========================================
   PRODUCT CARD
   ======================================== */

.product-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.product-image {
    height: 180px;
    background: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image .placeholder {
    font-size: 3rem;
    color: var(--text-muted);
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-card-body {
    padding: 1rem;
}

.product-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.product-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

.product-price .old-price {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 0.5rem;
    font-weight: 400;
}

.add-to-cart-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.add-to-cart-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* ========================================
   LIST VIEW
   ======================================== */

.products-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.product-list-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.product-list-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: var(--bg-primary);
}

.product-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-list-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.product-badge-small {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--primary);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-list-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
}

.product-list-info {
    flex: 1;
    min-width: 0;
}

.product-list-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-list-description {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-list-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.product-list-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
    white-space: nowrap;
}

.add-to-cart-btn-small {
    background: var(--primary);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.add-to-cart-btn-small:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* ========================================
   LINES VIEW
   ======================================== */

.products-lines {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.product-line-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s;
}

.product-line-item:last-child {
    border-bottom: none;
}

.product-line-item:hover {
    background: var(--bg-primary);
}

.product-line-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    flex-shrink: 0;
    max-width: 60%;
}

.product-line-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-line-star {
    color: #F59E0B;
    font-size: 0.75rem;
}

.product-line-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-line-dots {
    flex: 1;
    border-bottom: 1px dotted var(--border-color);
    margin: 0 0.5rem;
    min-width: 20px;
}

.product-line-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.product-line-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9375rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.old-price-line {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 400;
}

.add-to-cart-btn-line {
    background: var(--bg-primary);
    color: var(--primary);
    border: 1px solid var(--border-color);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.add-to-cart-btn-line:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ========================================
   PRODUCT MODAL
   ======================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: white;
    border-radius: var(--radius-2xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-image {
    height: 250px;
    background: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-secondary);
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-product-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.modal-product-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* Product Options */
.product-options {
    margin-bottom: 1.5rem;
}

.option-group {
    margin-bottom: 1rem;
}

.option-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.option-label .required {
    color: var(--danger);
    font-size: 0.75rem;
}

.option-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.option-choice {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.option-choice:hover {
    border-color: var(--primary);
}

.option-choice.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.option-choice .price-modifier {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.option-choice.selected .price-modifier {
    color: rgba(255,255,255,0.8);
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quantity-label {
    font-weight: 600;
    color: var(--text-primary);
}

.quantity-controls {
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.quantity-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.quantity-value {
    width: 50px;
    text-align: center;
    font-weight: 600;
    font-size: 1.125rem;
}

/* Special Instructions */
.special-instructions {
    margin-bottom: 1.5rem;
}

.special-instructions label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.special-instructions textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 80px;
}

.special-instructions textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Add to Cart Button */
.modal-add-to-cart {
    background: var(--primary);
    color: white;
    border: none;
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

.modal-add-to-cart:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.modal-add-to-cart:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   CART DRAWER
   ======================================== */

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 300;
    animation: fadeIn 0.2s ease-out;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    background: white;
    z-index: 301;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.cart-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

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

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.cart-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin-bottom: 0.75rem;
}

.cart-item-image {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.cart-item-options {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.cart-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-item-price {
    font-weight: 600;
    color: var(--primary);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-qty-btn {
    background: white;
    border: 1px solid var(--border-color);
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.cart-item-qty-btn:hover {
    background: var(--border-color);
}

.cart-item-qty-value {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.25rem;
}

/* Cart Footer */
.cart-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    background: white;
}

.cart-summary {
    margin-bottom: 1rem;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.cart-summary-row.total {
    font-size: 1.125rem;
    font-weight: 700;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.75rem;
}

.checkout-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

.checkout-btn:hover {
    background: var(--primary-dark);
}

.checkout-btn:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
    box-shadow: none;
}

/* ========================================
   CHECKOUT PAGE
   ======================================== */

.checkout-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.checkout-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.back-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
}

.checkout-title {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Two-column layout for desktop */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 900px) {
    .checkout-layout {
        grid-template-columns: 1fr 400px;
        align-items: start;
    }
}

.checkout-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkout-right {
    display: flex;
    flex-direction: column;
}

@media (min-width: 900px) {
    .checkout-right {
        position: sticky;
        top: 2rem;
    }
}

.checkout-summary-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.checkout-promo-section {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.checkout-summary-section {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.checkout-section {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.checkout-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Order Type Selection */
.order-type-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.order-type-option {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.order-type-option:hover {
    border-color: var(--primary);
}

.order-type-option.selected {
    border-color: var(--primary);
    background: rgba(249, 115, 22, 0.05);
}

.order-type-option i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: block;
}

.order-type-option span {
    font-weight: 500;
}

/* Payment Methods */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
}

.payment-option:hover {
    border-color: var(--primary);
}

.payment-option.selected {
    border-color: var(--primary);
    background: rgba(249, 115, 22, 0.05);
}

.payment-option i {
    font-size: 1.25rem;
    color: var(--primary);
    width: 30px;
}

.payment-option span {
    font-weight: 500;
}

/* Order Summary */
.order-summary-items {
    margin-bottom: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.order-summary-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.order-summary-item:last-child {
    border-bottom: none;
}

.order-summary-item-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.order-summary-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-summary-item-image i {
    color: #9ca3af;
    font-size: 1rem;
}

.order-summary-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.order-summary-item-name {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-summary-item-options {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.order-summary-item-qty {
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    background: #f3f4f6;
    border-radius: 4px;
    flex-shrink: 0;
}

.order-summary-item-price {
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
}

.place-order-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 100%;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
    margin-top: 1rem;
}

.place-order-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.place-order-btn:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   ORDER CONFIRMATION
   ======================================== */

.order-confirmation {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.confirmation-content {
    max-width: 400px;
}

.confirmation-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--success), #16A34A);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.confirmation-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.confirmation-message {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.order-number {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.order-number-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.order-number-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.back-to-shop-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.back-to-shop-btn:hover {
    background: var(--primary-dark);
}

/* ========================================
   SHOP CLOSED OVERLAY
   ======================================== */

.shop-closed-banner {
    background: var(--danger);
    color: white;
    text-align: center;
    padding: 0.75rem;
    font-weight: 500;
}

/* ========================================
   FOOTER
   ======================================== */

.shop-footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 2rem 1rem;
    margin-top: 3rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-shop-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.footer-contact {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.footer-contact a {
    color: var(--primary);
}

.footer-powered {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-powered a {
    color: var(--primary);
    font-weight: 500;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* ========================================
   MOBILE CATEGORY BAR
   ======================================== */

.mobile-category-bar {
    position: sticky;
    top: 60px; /* Below header */
    z-index: 99;
    background: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.mobile-category-scroll {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

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

.mobile-category-chip {
    flex-shrink: 0;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.mobile-category-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.mobile-category-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.mobile-category-chip i {
    font-size: 0.75rem;
}

.hidden-mobile {
    display: none !important;
}

@media (max-width: 768px) {
    .header-banner {
        height: 120px;
    }
    
    .header-content {
        height: 60px;
    }
    
    .shop-logo img {
        max-height: 40px;
    }
    
    .shop-logo:not(:has(img)) {
        width: 40px;
        height: 40px;
    }
    
    .shop-name {
        font-size: 1rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .product-image {
        height: 140px;
    }
    
    .product-card-body {
        padding: 0.75rem;
    }
    
    .product-name {
        font-size: 0.875rem;
    }
    
    .product-description {
        display: none;
    }
    
    .modal-content {
        max-height: 95vh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Hide desktop categories on mobile */
    .categories-nav {
        display: none;
    }
    
    /* Adjust main content padding for sticky bar */
    .shop-main {
        padding-top: 1rem;
    }
    
    /* View mode toggle on mobile */
    .view-mode-toggle {
        padding: 2px;
    }
    
    .view-mode-btn {
        width: 32px;
        height: 32px;
    }
    
    /* List view on mobile */
    .product-list-image {
        width: 60px;
        height: 60px;
    }
    
    .product-list-name {
        font-size: 0.875rem;
    }
    
    .product-list-description {
        display: none;
    }
    
    .product-list-price {
        font-size: 0.875rem;
    }
    
    /* Lines view on mobile */
    .product-line-info {
        max-width: 50%;
    }
    
    .product-line-name {
        font-size: 0.875rem;
    }
    
    .product-line-price {
        font-size: 0.875rem;
    }
    
    .add-to-cart-btn-line {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-drawer {
        max-width: 100%;
    }
}

/* ========================================
   SIDEBAR LAYOUT (Food Template)
   ======================================== */

.shop-layout-sidebar {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
}

.shop-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: white;
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 0;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.shop-main-content {
    flex: 1;
    padding: 2rem;
    background: var(--bg-primary);
}

/* Sidebar Categories */
.sidebar-categories {
    padding: 0 1rem;
}

.sidebar-category-group {
    margin-bottom: 0.5rem;
}

.sidebar-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.sidebar-category-header:hover {
    background: var(--bg-primary);
}

.sidebar-category-header i {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.sidebar-category-header.collapsed i {
    transform: rotate(-90deg);
}

.sidebar-category-children {
    padding-left: 0.5rem;
}

.sidebar-category-item {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    text-decoration: none;
}

.sidebar-category-item:hover {
    color: var(--text-primary);
    background: var(--bg-primary);
}

.sidebar-category-item.active {
    color: var(--primary);
    font-weight: 500;
}

/* ========================================
   FOOD TEMPLATE STYLES
   ======================================== */

.template-food .shop-header {
    background: var(--secondary);
}

.template-food .header-content {
    max-width: 1400px;
}

.template-food .shop-name {
    color: white;
}

.template-food .shop-status {
    color: rgba(255,255,255,0.7);
}

.template-food .shop-status.open {
    color: var(--accent);
}

.template-food .shop-logo:not(:has(img)) {
    border: 2px solid rgba(255,255,255,0.2);
}

.template-food .cart-button {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: none;
}

.template-food .cart-button:hover {
    background: rgba(255,255,255,0.1);
}

.template-food .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

/* Food Template - List Layout */
.template-food.layout-list .products-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.template-food.layout-list .product-card {
    flex-direction: row;
    border-radius: var(--radius-lg);
}

.template-food.layout-list .product-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.template-food.layout-list .product-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.template-food.layout-list .product-footer {
    margin-top: auto;
}

.template-food.layout-list .add-to-cart-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.template-food.layout-list .product-card {
    position: relative;
}

/* ========================================
   RETAIL TEMPLATE STYLES
   ======================================== */

.template-retail .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.template-retail .product-card {
    border-radius: var(--radius-lg);
}

.template-retail .product-image {
    height: 200px;
}

/* ========================================
   SERVICE TEMPLATE STYLES
   ======================================== */

.template-service .product-card {
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.template-service .product-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.template-service .product-image {
    height: 160px;
}

.template-service .add-to-cart-btn {
    width: 100%;
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
    padding: 0.75rem;
}

.template-service .product-footer {
    flex-direction: column;
    align-items: stretch;
}

/* ========================================
   SIDEBAR RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .shop-sidebar {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .shop-layout-sidebar {
        flex-direction: column;
    }
    
    .shop-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 0;
    }
    
    .sidebar-categories {
        display: flex;
        overflow-x: auto;
        gap: 0.5rem;
        padding: 0 1rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .sidebar-category-group {
        flex-shrink: 0;
        margin-bottom: 0;
    }
    
    .sidebar-category-header {
        padding: 0.5rem 1rem;
        background: var(--bg-primary);
        border-radius: 9999px;
        font-size: 0.875rem;
    }
    
    .sidebar-category-header i {
        display: none;
    }
    
    .sidebar-category-children {
        display: none;
    }
    
    .sidebar-category-item {
        padding: 0.5rem 1rem;
        background: var(--bg-primary);
        border-radius: 9999px;
        font-size: 0.875rem;
        white-space: nowrap;
    }
    
    .shop-main-content {
        padding: 1rem;
    }
    
    .template-food.layout-list .product-image {
        width: 80px;
        height: 80px;
    }
    
    .template-food.layout-list .add-to-cart-btn {
        position: static;
        transform: none;
        margin-top: 0.5rem;
    }
}

/* ========================================
   AUTH MODAL
   ======================================== */

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.auth-modal {
    background: white;
    border-radius: 1rem;
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s;
}

.auth-modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.auth-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-modal-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.auth-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-modal-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-tab:hover {
    background: var(--bg-tertiary);
}

.auth-tab.active {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb, 249, 115, 22), 0.1);
    color: var(--primary);
}

.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-input-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.auth-input-group input {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
}

.auth-input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 249, 115, 22), 0.1);
}

.auth-code-input {
    text-align: center;
    font-size: 1.5rem !important;
    letter-spacing: 0.5rem;
    font-weight: 600;
}

.auth-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.auth-submit-btn {
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-submit-btn:hover:not(:disabled) {
    background: var(--primary-dark);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-back-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s;
}

.auth-back-btn:hover {
    color: var(--primary);
}

/* Account Button */
.account-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.account-button:hover {
    background: var(--bg-tertiary);
}

.account-button i {
    font-size: 1rem;
}

.hide-mobile {
    display: inline;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
    
    .account-button {
        padding: 0.5rem;
    }
}

/* User Menu Dropdown */
.user-menu-container {
    position: relative;
}

.user-menu-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.user-menu-button:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

.user-menu-button .fa-chevron-down {
    font-size: 0.65rem;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
}

.user-menu-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.user-menu-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-menu-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-email {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-divider {
    height: 1px;
    background: var(--border-color);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}

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

.user-menu-item i {
    width: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.user-menu-item.danger {
    color: #ef4444;
}

.user-menu-item.danger i {
    color: #ef4444;
}

.user-menu-item.danger:hover {
    background: #fef2f2;
}

@media (max-width: 768px) {
    .user-menu-button {
        padding: 0.25rem;
        border-radius: 50%;
        border: none;
        background: transparent;
    }
    
    .user-menu-button span,
    .user-menu-button .fa-chevron-down {
        display: none;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
    }
    
    .user-menu-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 1rem 1rem 0 0;
        transform: translateY(100%);
    }
    
    .user-menu-dropdown.show {
        transform: translateY(0);
    }
}

/* ========================================
   ACCOUNT VIEW
   ======================================== */

.account-container {
    min-height: 100vh;
    background: var(--bg-secondary);
}

.account-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.account-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
}

.back-btn,
.logout-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s;
}

.back-btn:hover,
.logout-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.logout-btn {
    color: #dc2626;
}

.logout-btn:hover {
    background: #fef2f2;
    color: #dc2626;
}

.account-content {
    padding: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.account-section {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.account-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.account-section h2 i {
    color: var(--primary);
}

/* Profile Card */
.profile-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-contact {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-contact i {
    width: 16px;
    text-align: center;
}

/* Orders List */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-card {
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.order-number {
    font-weight: 600;
    color: var(--text-primary);
}

.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.order-status.status-pending { background: #fef3c7; color: #92400e; }
.order-status.status-confirmed { background: #dbeafe; color: #1e40af; }
.order-status.status-preparing { background: #e0e7ff; color: #3730a3; }
.order-status.status-ready { background: #d1fae5; color: #065f46; }
.order-status.status-out_for_delivery { background: #fce7f3; color: #9d174d; }
.order-status.status-delivered,
.order-status.status-completed { background: #d1fae5; color: #065f46; }
.order-status.status-cancelled { background: #fee2e2; color: #dc2626; }

.order-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.order-total {
    font-weight: 600;
    color: var(--text-primary);
}

.order-items-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.order-item-preview {
    font-size: 0.75rem;
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    color: var(--text-secondary);
}

.order-item-more {
    font-size: 0.75rem;
    color: var(--primary);
    padding: 0.25rem;
}

/* Addresses List */
.addresses-list {
    display: grid;
    gap: 1rem;
}

.address-card {
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    position: relative;
}

.address-card.default {
    border-color: var(--primary);
}

.default-badge {
    position: absolute;
    top: -0.5rem;
    right: 1rem;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.address-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.address-label i {
    color: var(--primary);
}

.address-line {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.address-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.btn-small {
    padding: 0.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.btn-small:hover:not(:disabled) {
    background: var(--bg-tertiary);
    color: var(--primary);
}

.btn-small:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-small.btn-danger:hover:not(:disabled) {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.add-address-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border: 2px dashed var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.9rem;
}

/* =====================================
   ADDRESS AUTOCOMPLETE
===================================== */

.address-autocomplete-container {
    position: relative;
    margin-bottom: 1rem;
}

.address-search-wrapper {
    position: relative;
}

.address-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    z-index: 1;
}

.address-search-input {
    padding-left: 2.5rem !important;
    background: #f8fafc;
    border: 2px dashed var(--border-color);
}

.address-search-input:focus {
    background: white;
    border-style: solid;
    border-color: var(--primary);
}

.address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 100;
    max-height: 280px;
    overflow-y: auto;
    margin-top: 0.5rem;
}

.address-suggestion {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border-color);
}

.address-suggestion:last-child {
    border-bottom: none;
}

.address-suggestion:hover {
    background: #f8fafc;
}

.address-suggestion i {
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.address-suggestion-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.address-main {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.address-secondary {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* =====================================
   ORDER TYPE IMPROVEMENTS
===================================== */

.order-type-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.order-type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.order-type-option i {
    font-size: 2rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.order-type-option span {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.order-type-option:hover {
    border-color: var(--primary);
    background: #fff7ed;
}

.order-type-option:hover i,
.order-type-option:hover span {
    color: var(--primary);
}

.order-type-option.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, #fff7ed, #fed7aa);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

.order-type-option.selected i {
    color: var(--primary);
}

.order-type-option.selected span {
    color: var(--primary);
}

/* =====================================
   WELCOME PROMO MODAL
===================================== */

.welcome-promo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.welcome-promo-modal {
    background: white;
    border-radius: 1.5rem;
    max-width: 400px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
    position: relative;
}

.welcome-promo-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: #6b7280;
    font-size: 0.9rem;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.welcome-promo-close:hover {
    background: white;
    color: #1f2937;
    transform: scale(1.1);
}

.welcome-promo-image {
    width: 100%;
    height: auto;
    overflow: hidden;
}

.welcome-promo-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.welcome-promo-content {
    padding: 1.5rem;
    text-align: center;
}

.welcome-promo-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.welcome-promo-desc {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.welcome-promo-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.welcome-promo-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.welcome-promo-input-wrapper i {
    position: absolute;
    left: 1rem;
    color: #9ca3af;
    font-size: 1rem;
}

.welcome-promo-input-wrapper input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 1rem;
    color: #1f2937;
    transition: all 0.2s;
}

.welcome-promo-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.welcome-promo-input-wrapper input::placeholder {
    color: #9ca3af;
}

.welcome-promo-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary, #F97316);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.welcome-promo-btn:hover:not(:disabled) {
    background: var(--primary-hover, #ea580c);
    transform: translateY(-1px);
}

.welcome-promo-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.welcome-promo-legal {
    font-size: 0.75rem;
    color: #9ca3af;
    line-height: 1.4;
    margin-top: 1rem;
}

.welcome-promo-success {
    padding: 2rem;
    text-align: center;
}

.welcome-promo-success-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.welcome-promo-success-icon i {
    font-size: 2rem;
    color: white;
}

.welcome-promo-success h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.welcome-promo-success p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   ACCOUNT VIEW - ENHANCED
   ======================================== */

.loading-state {
    text-align: center;
    padding: 3rem;
    color: #9ca3af;
}

.loading-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.loading-state p {
    font-size: 0.875rem;
}

/* Order Actions */
.order-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.btn-reorder,
.btn-receipt {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reorder {
    background: var(--primary, #F97316);
    color: white;
}

.btn-reorder:hover {
    background: var(--primary-dark, #ea580c);
    transform: translateY(-1px);
}

.btn-receipt {
    background: #f3f4f6;
    color: #374151;
}

.btn-receipt:hover {
    background: #e5e7eb;
}

/* Address Form Modal */
.address-form-modal {
    background: white;
    border-radius: 1rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.address-form-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.address-form-modal .modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.address-form-modal .modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.address-form-modal .modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.address-form-modal form {
    padding: 1.5rem;
}

.address-form-modal .form-group {
    margin-bottom: 1rem;
}

.address-form-modal .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.address-form-modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary);
}

.checkbox-group label {
    margin-bottom: 0 !important;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.form-actions .btn-secondary {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.form-actions .btn-secondary:hover {
    background: #e5e7eb;
}

.form-actions .btn-primary {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--primary, #F97316);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.form-actions .btn-primary:hover {
    background: var(--primary-dark, #ea580c);
}

/* Address Card Enhancements */
.address-card .address-name {
    font-weight: 500;
    color: #1f2937;
    margin: 0.5rem 0;
}

.address-card .address-actions button[title="Modifier"] {
    background: #dbeafe;
    color: #2563eb;
}

.address-card .address-actions button[title="Modifier"]:hover {
    background: #bfdbfe;
}

@media (max-width: 480px) {
    .address-form-modal .form-row {
        grid-template-columns: 1fr;
    }
    
    .order-actions {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn-secondary,
    .form-actions .btn-primary {
        flex: none;
    }
}

/* ========================================
   SAVED ADDRESSES SELECTOR (Checkout)
   ======================================== */

.saved-addresses-selector {
    margin-bottom: 1.5rem;
}

.saved-addresses-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.saved-address-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.saved-address-card:hover {
    border-color: var(--primary);
    background: #fef3eb;
}

.saved-address-card.selected {
    border-color: var(--primary);
    background: #fef3eb;
}

.saved-address-card.add-new {
    border-style: dashed;
    background: transparent;
}

.saved-address-card.add-new:hover {
    background: #f3f4f6;
}

.saved-address-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.saved-address-icon.add {
    background: var(--primary);
    color: white;
}

.saved-address-info {
    flex: 1;
    min-width: 0;
}

.saved-address-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.saved-address-line,
.saved-address-city {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saved-address-check {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    color: var(--primary);
    font-size: 1rem;
}

/* Delivery Distance Info */
.delivery-distance-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-radius: 0.75rem;
    margin: 1rem 0;
}

.distance-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #10b981;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.distance-details {
    display: flex;
    flex-direction: column;
}

.distance-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #065f46;
}

.distance-duration {
    font-size: 0.875rem;
    color: #047857;
}

@media (max-width: 480px) {
    .saved-addresses-list {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   DELIVERY MODE BUTTON (Header)
   ======================================== */

.delivery-mode-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.delivery-mode-button:hover {
    background: var(--primary-dark, #ea580c);
    transform: translateY(-1px);
}

.delivery-mode-button .fa-chevron-down {
    font-size: 0.65rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .delivery-mode-button {
        padding: 0.5rem 0.75rem;
    }
    
    .delivery-mode-button .fa-chevron-down {
        display: none;
    }
}

/* ========================================
   DELIVERY MODE MODAL (Slide Drawer)
   ======================================== */

.delivery-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.delivery-modal-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 100%;
    height: 100vh;
    background: white;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.delivery-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.delivery-modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.delivery-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.delivery-modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.delivery-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.delivery-mode-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.delivery-mode-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    color: var(--text-secondary);
}

.delivery-mode-tab i {
    font-size: 1.5rem;
}

.delivery-mode-tab:hover {
    border-color: var(--primary);
    background: #fef3eb;
}

.delivery-mode-tab.active {
    background: #fef3eb;
    border-color: var(--primary);
    color: var(--primary);
}

.delivery-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.delivery-section-title i {
    color: var(--primary);
}

.delivery-addresses-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.delivery-address-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.delivery-address-card:hover {
    border-color: var(--primary);
}

.delivery-address-card.selected {
    background: #fef3eb;
    border-color: var(--primary);
}

.delivery-address-radio {
    padding-top: 0.25rem;
}

.radio-outer {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.delivery-address-card.selected .radio-outer {
    border-color: var(--primary);
}

.radio-inner {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

.delivery-address-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.delivery-address-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.delivery-address-label {
    font-weight: 600;
    color: var(--text-primary);
}

.delivery-address-line,
.delivery-address-city {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.add-address-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem;
    background: transparent;
    border: 2px dashed var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.add-address-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #fef3eb;
}

.no-addresses-message,
.login-prompt {
    text-align: center;
    padding: 2rem 1rem;
}

.no-addresses-message i,
.login-prompt i {
    font-size: 2.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.no-addresses-message p,
.login-prompt p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.login-btn:hover {
    background: var(--primary-dark, #ea580c);
}

.login-hint {
    font-size: 0.8rem;
    margin-top: 1rem;
    color: var(--text-secondary);
}

.delivery-distance-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-radius: 0.5rem;
    color: #065f46;
    font-weight: 500;
    margin-top: 1rem;
}

.delivery-distance-badge i {
    color: #10b981;
}

.pickup-info-section {
    margin-top: 1rem;
}

.pickup-address-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
}

.pickup-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.pickup-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.pickup-name {
    font-weight: 600;
    color: var(--text-primary);
}

.pickup-address,
.pickup-city {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.delivery-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: white;
}

.confirm-delivery-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-delivery-btn:hover {
    background: var(--primary-dark, #ea580c);
}

@media (max-width: 480px) {
    .delivery-modal-drawer {
        width: 100%;
    }
    
    .delivery-mode-tabs {
        flex-direction: row;
    }
    
    .delivery-mode-tab {
        padding: 1rem 0.75rem;
    }
}

/* ========================================
   PICKUP TIME SELECTOR
   ======================================== */

.pickup-time-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.pickup-time-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pickup-time-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: var(--text-secondary);
}

.pickup-time-option i {
    font-size: 1.25rem;
}

.pickup-time-option:hover {
    border-color: var(--primary);
}

.pickup-time-option.active {
    background: #fef3eb;
    border-color: var(--primary);
    color: var(--primary);
}

.pickup-time-input-wrapper {
    display: none;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
}

.pickup-time-input-wrapper.show {
    display: block;
}

.pickup-time-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1.25rem;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
    color: var(--text-primary);
    font-weight: 600;
}

.pickup-time-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ========================================
   CHECKOUT SELECTED INFO
   ======================================== */

.checkout-selected-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #fef3eb, #fed7aa);
    border-radius: 0.75rem;
    margin-top: 1rem;
    color: var(--primary-dark, #c2410c);
}

.checkout-selected-info i {
    font-size: 1.1rem;
}

.checkout-selected-info span {
    flex: 1;
}

.checkout-selected-info .change-btn {
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.checkout-selected-info .change-btn:hover {
    background: var(--primary);
    color: white;
}

.checkout-pickup-address {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    margin-top: 1rem;
}

.pickup-icon-small {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pickup-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

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

.pickup-addr {
    font-weight: 500;
    color: var(--text-primary);
}

/* ========================================
   LOYALTY CARD SECTION
   ======================================== */

.loyalty-section {
    padding-bottom: 1.5rem;
}

.loyalty-card-display {
    margin-bottom: 1rem;
}

.loyalty-card-visual {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark, #ea580c));
    border-radius: 1rem;
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(234, 88, 12, 0.3);
}

.loyalty-card-visual::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.loyalty-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.loyalty-card-label {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.loyalty-card-header i {
    font-size: 1.5rem;
    opacity: 0.8;
}

.loyalty-card-points {
    text-align: center;
    margin-bottom: 1.5rem;
}

.loyalty-card-points .points-value {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.loyalty-card-points .points-label {
    font-size: 0.875rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.loyalty-card-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 1rem;
}

.loyalty-stat {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.loyalty-stat .stat-label {
    font-size: 0.7rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.loyalty-stat .stat-value {
    font-size: 1.125rem;
    font-weight: 600;
}

.loyalty-card-qr {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.loyalty-card-qr img {
    width: 80px;
    height: 80px;
    background: white;
    padding: 0.25rem;
    border-radius: 0.5rem;
}

.loyalty-info {
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.loyalty-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.loyalty-info i {
    color: var(--primary);
    margin-right: 0.375rem;
}

.loyalty-history h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.loyalty-transactions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.loyalty-transaction {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
}

.loyalty-transaction .transaction-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.75rem;
}

.loyalty-transaction.earn .transaction-icon {
    background: #dcfce7;
    color: #16a34a;
}

.loyalty-transaction.spend .transaction-icon {
    background: #fee2e2;
    color: #dc2626;
}

.loyalty-transaction .transaction-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.loyalty-transaction .transaction-desc {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loyalty-transaction .transaction-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.loyalty-transaction .transaction-points {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
}

.loyalty-transaction.earn .transaction-points {
    color: #16a34a;
}

.loyalty-transaction.spend .transaction-points {
    color: #dc2626;
}
