/* ============================================
   SWAAD INDIA LOCAL DELIVERY APP - STYLES
   Mobile-first, delivery app design
   Brand: Green (#1B8057) & White (#FFFFFF)
   ============================================ */

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

:root {
    --primary-green: #2d8653;
    --dark-green: #246e44;
    --light-green: #e8f5ee;
    --orange: #f57c00;
    --light-bg: #f8f8f8;
    --border-color: #e0e0e0;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
    padding-bottom: 70px;
}

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

/* ============================================
   HEADER
   ============================================ */
.header {
    background: var(--primary-green);
    padding: 12px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-top {
    justify-content: space-between;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 0 0 auto;
}

.logo-img {
    height: 36px;
    width: auto;
    display: block;
}

.search-wrapper {
    position: relative;
    order: 3;
    flex: 0 0 100%;
    margin-top: 8px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    pointer-events: none;
}

.search-bar {
    flex: 1;
    padding: 10px 14px 10px 38px;
    border: 1px solid transparent;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
    width: 100%;
    background: white;
}

.search-bar:focus {
    border-color: var(--dark-green);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.icon-button {
    position: relative;
    background: white;
    color: var(--primary-green);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.icon-button:hover {
    background: var(--light-bg);
}

.icon-button.logged-in {
    background: white;
    color: var(--primary-green);
}

.icon-button.logged-in:hover {
    background: var(--light-bg);
}

.icon-button.logged-in::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-green);
    border: 2px solid white;
}

.account-menu {
    position: absolute;
    z-index: 1000;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    overflow: hidden;
    font-size: 14px;
}

.account-menu-header {
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}

.account-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    color: var(--text-dark);
    transition: background 0.2s;
}

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

.cart-button {
    position: relative;
    background: white;
    color: var(--primary-green);
    border: none;
    padding: 10px 14px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.3s;
    flex: 0 0 auto;
}

.cart-button:hover {
    background: var(--light-bg);
}

.cart-count {
    display: inline-block;
    background: #FF6B6B;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    line-height: 20px;
}

/* ============================================
   SECTIONS
   ============================================ */
section {
    background: white;
    margin: 16px 0;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

section h2 {
    margin-bottom: 16px;
    color: var(--text-dark);
    font-size: 18px;
}

/* ============================================
   CATEGORIES SCROLL STRIP
   ============================================ */
.categories-section {
    padding: 12px 0;
    background: transparent;
    box-shadow: none;
    margin: 8px 0;
}

.categories-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 16px;
    scrollbar-width: none;
}

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

.category-item {
    flex: 0 0 auto;
    width: 78px;
    text-align: center;
    cursor: pointer;
}

.category-item .icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 6px;
    border-radius: 12px;
    background: white;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.category-item .icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.category-item .name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.category-item.active .icon {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
}

.category-item.active .name {
    color: var(--primary-green);
}

/* ============================================
   PRODUCTS GRID
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 12px;
}

/* ============================================
   STICKY BOTTOM CART BAR
   ============================================ */
.cart-bar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 180;
    background: var(--primary-green);
    color: white;
    padding: 14px 20px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.cart-bar.visible {
    display: flex;
}

.cart-bar-info {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    font-weight: 600;
}

.cart-bar-total {
    font-size: 16px;
    font-weight: 700;
}

.cart-bar-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.product-image {
    position: relative;
    width: 100%;
    height: 120px;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

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

.discount-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: #FF8F1F;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 8px 0 6px 0;
}

.favourite-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #999;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    z-index: 2;
    transition: color 0.2s, transform 0.15s;
}

.favourite-btn:active {
    transform: scale(0.9);
}

.favourite-btn.active {
    color: #E53935;
}

.product-info {
    padding: 12px;
}

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

.product-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}

.product-prices {
    margin-bottom: 0;
}

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

/* ============================================
   ADD BUTTON / QUANTITY STEPPER (Blinkit-style)
   ============================================ */
.add-btn {
    width: 64px;
    height: 32px;
    background: white;
    color: var(--primary-green);
    border: 1px solid var(--primary-green);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.add-btn:hover {
    background: var(--primary-green);
    color: white;
}

.add-btn:active {
    transform: scale(0.96);
}

.qty-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 64px;
    height: 32px;
    background: var(--primary-green);
    color: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.qty-stepper button {
    flex: 0 0 20px;
    height: 100%;
    background: transparent;
    border: none;
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.qty-stepper .qty-value {
    flex: 1;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
}

/* ============================================
   CART SIDEBAR
   ============================================ */
.cart-sidebar {
    position: fixed;
    right: -100%;
    top: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: white;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    z-index: 200;
    overflow: hidden;
}

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

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

.cart-header h3 {
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
}

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

.cart-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.cart-item-image {
    width: 50px;
    height: 50px;
    background: var(--light-bg);
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    overflow: hidden;
}

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

.cart-item-details {
    flex: 1;
    font-size: 13px;
}

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

.cart-item-variation {
    color: var(--text-light);
    font-size: 12px;
    margin-bottom: 6px;
}

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

.cart-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 76px;
    height: 28px;
    background: white;
    border: 1px solid var(--primary-green);
    border-radius: 6px;
    overflow: hidden;
}

.cart-item-controls button {
    flex: 0 0 24px;
    height: 100%;
    border: none;
    background: transparent;
    color: var(--primary-green);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.cart-item-controls .qty-value {
    flex: 1;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
}

.remove-item-btn {
    background: none;
    border: none;
    color: #e53935;
    font-size: 18px;
    cursor: pointer;
    margin-left: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

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

.cart-empty .cart-empty-icon {
    font-size: 56px;
    margin-bottom: 12px;
}

.cart-summary {
    padding: 16px;
    border-top: 2px solid var(--border-color);
    background: var(--light-bg);
    flex-shrink: 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.summary-row.total {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-green);
}

.checkout-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 8px;
    transition: background 0.3s;
}

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

.clear-cart-btn {
    width: 100%;
    padding: 10px;
    background: white;
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-cart-btn:hover {
    border-color: #FF6B6B;
    color: #FF6B6B;
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 300;
    padding: 20px;
    overflow-y: auto;
}

.modal.open {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
}

.modal h2 {
    margin-bottom: 12px;
    color: var(--text-dark);
}

/* ============================================
   VARIATION SELECTOR (BOTTOM SHEET)
   ============================================ */
.variation-modal {
    align-items: flex-end;
    padding: 0;
}

.variation-sheet {
    max-width: 600px;
    width: 100%;
    border-radius: 16px 16px 0 0;
    margin: 0 auto;
    max-height: 80vh;
    animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.variation-pills {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
    max-height: 50vh;
    overflow-y: auto;
}

.variation-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.variation-pill:hover {
    border-color: var(--primary-green);
}

.variation-pill.active {
    border-color: var(--primary-green);
    background: var(--light-green);
}

.variation-pill-name {
    color: var(--text-dark);
    font-weight: 500;
}

.variation-pill-price {
    color: var(--primary-green);
    font-weight: 700;
}

/* ============================================
   CHECKOUT FORM
   ============================================ */
.checkout-modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

.checkout-modal-content h2 {
    flex-shrink: 0;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.checkout-form-scroll {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-right: 4px;
    margin-right: -4px;
}

.checkout-form .submit-btn {
    flex-shrink: 0;
    margin-top: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input[readonly] {
    background: #f5f5f5;
    color: #777;
    cursor: not-allowed;
}

.field-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary-green);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.field-badge.unverified {
    background: #f0ad4e;
}

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

.postcode-status {
    margin-top: -8px;
    margin-bottom: 16px;
    font-size: 12px;
    padding: 8px;
    border-radius: 4px;
    display: none;
}

.postcode-status.valid {
    display: block;
    background: #E8F8F0;
    color: var(--primary-green);
}

.postcode-status.invalid {
    display: block;
    background: #FFE5E5;
    color: #FF6B6B;
}

.submit-btn {
    padding: 14px;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: var(--dark-green);
}

.submit-btn:disabled {
    background: #CCC;
    cursor: not-allowed;
}

/* ============================================
   CONFIRMATION MODAL
   ============================================ */
.modal-content.confirmation {
    text-align: center;
}

.order-number,
.order-total {
    margin: 24px 0;
    padding: 16px;
    background: var(--light-bg);
    border-radius: 8px;
}

.order-number p,
.order-total p {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.order-number h3,
.order-total h3 {
    font-size: 24px;
    color: var(--primary-green);
}

.confirmation-message {
    color: var(--text-light);
    margin: 20px 0;
    line-height: 1.6;
}

.continue-btn {
    padding: 12px 32px;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 16px;
}

.continue-btn:hover {
    background: var(--dark-green);
}

/* ============================================
   ACCOUNT SIDEBAR
   ============================================ */
.account-sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
    z-index: 200;
    overflow-y: auto;
}

.account-sidebar.open {
    left: 0;
}

.account-sidebar-body {
    padding: 16px;
}

.account-phone-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--light-green, #e8f5ee);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.account-phone-row .phone-number {
    font-weight: 600;
    font-size: 15px;
}

.account-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary-green);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.account-unverified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0ad4e;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.account-email-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -6px 0 12px;
    flex-wrap: wrap;
}

.account-verify-email-btn {
    background: none;
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
}

.account-verify-email-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.account-email-otp-row {
    display: flex;
    gap: 8px;
    margin: -6px 0 12px;
    flex-wrap: wrap;
}

.account-email-otp-row input {
    flex: 1;
    min-width: 120px;
    padding: 10px 12px;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    font-size: 14px;
}

.account-email-otp-row button {
    background: var(--primary-green);
    color: #fff;
    border: none;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.account-email-otp-row button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.account-email-otp-msg {
    font-size: 13px;
    margin: -6px 0 12px;
}

.account-email-otp-msg.success { color: var(--primary-green); }
.account-email-otp-msg.error { color: #e53935; }

.account-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark, #1a1a1a);
    cursor: pointer;
    margin-bottom: 12px;
    text-align: left;
}

.account-menu-item .icon {
    font-size: 20px;
}

.account-menu-item.logout {
    color: #e53935;
    border-color: #e53935;
}

.account-back {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-green);
    cursor: pointer;
    padding: 0;
    margin-bottom: 16px;
}

.account-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.account-form-group {
    flex: 1;
    margin-bottom: 12px;
}

.account-form-row .account-form-group {
    margin-bottom: 0;
}

.account-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
}

.account-form-group input,
.account-form-group textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    font-family: inherit;
}

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

.account-form-group input[readonly] {
    background: #f5f5f5;
    color: #777;
    cursor: not-allowed;
}

.account-form-group textarea {
    resize: vertical;
    min-height: 70px;
}

.account-save-btn {
    width: 100%;
    background: var(--primary-green);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
}

.account-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.account-save-msg {
    text-align: center;
    font-size: 13px;
    margin-top: 10px;
    display: none;
}

.account-save-msg.success { color: var(--primary-green); display: block; }
.account-save-msg.error { color: #e53935; display: block; }

.account-profile-view-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--light-green, #e8f5ee);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.account-profile-name-text {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-dark, #1a1a1a);
}

.account-profile-name-text.placeholder {
    color: #888;
    font-weight: 400;
}

.account-edit-btn {
    background: none;
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    cursor: pointer;
}

.account-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.account-form-actions .account-save-btn {
    margin-top: 0;
    flex: 2;
}

.account-cancel-btn {
    flex: 1;
    background: #fff;
    color: #555;
    border: 1px solid var(--border-color, #e0e0e0);
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.account-order-item {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}

.account-order-item:last-child { margin-bottom: 0; }

.account-order-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.account-order-number {
    font-weight: 700;
    font-size: 14px;
}

.account-order-date {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.account-order-total {
    font-weight: 700;
    font-size: 15px;
    color: var(--primary-green);
}

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

.account-status-pending, .account-status-confirmed { background: #fff3e0; color: #f57c00; }
.account-status-preparing, .account-status-ready { background: #e3f2fd; color: #1976d2; }
.account-status-out_for_delivery { background: var(--light-green, #e8f5ee); color: var(--primary-green); }
.account-status-delivered { background: var(--light-green, #e8f5ee); color: var(--primary-green); }
.account-status-cancelled { background: #ffebee; color: #e53935; }

.account-track-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-green);
    text-decoration: none;
}

.account-empty-state {
    text-align: center;
    color: #888;
    font-size: 14px;
    padding: 20px 0;
}

.account-checkbox-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark, #1a1a1a);
    cursor: pointer;
}

.account-checkbox-row input[type="checkbox"] {
    width: auto;
}

.account-address-item {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}

.account-address-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.account-address-label {
    font-weight: 700;
    font-size: 14px;
}

.account-default-badge {
    display: inline-block;
    background: var(--primary-green);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.account-address-text {
    font-size: 14px;
    color: #444;
    margin-bottom: 4px;
}

.account-address-postcode {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.account-address-actions {
    display: flex;
    gap: 10px;
}

.account-address-action {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-green);
    cursor: pointer;
}

.account-address-action.delete {
    color: #e53935;
    border-color: #e53935;
}

/* Saved address selector in checkout */
.saved-address-option {
    display: block;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
}

.saved-address-option.selected {
    border-color: var(--primary-green);
    background: var(--light-green, #e8f5ee);
}

.saved-address-option .label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.saved-address-option .label-row input[type="radio"] {
    width: auto;
}

.saved-address-option .address-label {
    font-weight: 700;
    font-size: 14px;
}

.saved-address-option .address-text {
    font-size: 13px;
    color: #555;
    margin-left: 24px;
}

@media (min-width: 600px) {
    .account-sidebar {
        width: 380px;
        left: -400px;
    }

    .account-sidebar.open {
        left: 0;
    }
}

/* ============================================
   OVERLAY
   ============================================ */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 150;
}

.overlay.visible {
    display: block;
}

/* ============================================
   RESPONSIVE
   Mobile-first: base styles above target phones.
   Tablet: >= 600px. Desktop: >= 1024px.
   ============================================ */

/* Tablet and up */
@media (min-width: 600px) {
    .header-top {
        flex-wrap: nowrap;
    }

    .search-wrapper {
        order: 2;
        flex: 1;
        max-width: 480px;
        margin-top: 0;
    }

    .brand {
        order: 1;
    }

    .header-actions {
        order: 3;
    }

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

    .category-item {
        width: 88px;
    }

    .category-item .icon {
        width: 80px;
        height: 80px;
    }

    .cart-sidebar {
        width: 380px;
        right: -400px;
    }

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

/* Desktop and up */
@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
        gap: 24px 16px;
    }

    .categories-scroll {
        gap: 24px;
    }

    section {
        padding: 24px;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .products-grid {
        gap: 14px 8px;
    }

    .cart-button {
        padding: 8px 12px;
        font-size: 16px;
    }

    section {
        margin: 8px 0;
        padding: 12px;
    }

    section h2 {
        font-size: 16px;
    }
}

/* ============================================
   HOMEPAGE BANNERS
   ============================================ */
.banner-section {
    padding: 0 16px;
    background: transparent;
    box-shadow: none;
    margin: 8px 0;
}

.banner-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

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

.banner-item {
    flex: 0 0 90%;
    scroll-snap-align: start;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.banner-item img {
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    display: block;
}

@media (min-width: 600px) {
    .banner-item {
        flex: 0 0 60%;
    }
}

@media (min-width: 1024px) {
    .banner-item {
        flex: 0 0 32%;
    }
}

/* ============================================
   HOMEPAGE THEME OVERRIDES (Uber / Jio Mart)
   ============================================ */
.theme-uber .header {
    background: #06C167;
}

.theme-uber .icon-button,
.theme-uber .cart-button {
    color: #06C167;
}

.theme-uber .brand-name {
    color: #fff;
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 22px;
    text-transform: uppercase;
}

.theme-jiomart .header {
    background: #0078AD;
}

.theme-jiomart .icon-button,
.theme-jiomart .cart-button {
    color: #0078AD;
}

.theme-jiomart .brand-name {
    color: #fff;
    font-weight: 800;
    font-size: 22px;
}

/* ============================================
   BLINKIT THEME - LAYOUT
   ============================================ */
body.theme-blinkit {
    padding-bottom: 60px;
    padding-top: 60px;
}

body.theme-blinkit .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    padding: 0;
    display: flex;
    align-items: center;
}

body.theme-blinkit .header-top {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 0 12px;
    flex-wrap: nowrap;
}

body.theme-blinkit .brand {
    flex: 0 0 auto;
}

body.theme-blinkit .logo-img {
    height: 32px;
}

body.theme-blinkit .search-wrapper {
    order: 0;
    flex: 1;
    margin-top: 0;
}

body.theme-blinkit .search-bar {
    border-radius: 24px;
}

body.theme-blinkit .header-actions {
    flex: 0 0 auto;
}

body.theme-blinkit .main-content {
    max-width: 1200px;
    margin: 0 auto;
}

body.theme-blinkit .cart-bar {
    bottom: 60px;
}

body.theme-blinkit .cart-sidebar,
body.theme-blinkit .account-sidebar {
    z-index: 210;
}

/* ============================================
   BLINKIT THEME - HORIZONTAL SCROLL SECTIONS
   ============================================ */
.home-section {
    background: white;
    margin: 8px 0;
    padding: 16px 0 16px 16px;
    box-shadow: var(--shadow);
}

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

.section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
}

.view-all-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-green);
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.products-scroll,
.featured-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-right: 16px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.products-scroll::-webkit-scrollbar,
.featured-scroll::-webkit-scrollbar {
    display: none;
}

.products-scroll .product-card {
    flex: 0 0 150px;
    width: 150px;
}

.scroll-sentinel {
    flex: 0 0 1px;
    width: 1px;
}

.category-sections-sentinel {
    width: 100%;
    height: 1px;
}

.featured-scroll .featured-card {
    flex: 0 0 70%;
    max-width: 280px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
    position: relative;
}

.featured-scroll .featured-card img {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    display: block;
}

.featured-scroll .top-banner-card {
    flex: 0 0 45%;
    max-width: 200px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
    position: relative;
}

.featured-scroll .top-banner-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
}

/* ============================================
   BLINKIT THEME - PRODUCT CARD REFINEMENTS
   ============================================ */
.product-card {
    border-radius: 12px;
}

.product-image {
    height: 120px;
    background: white;
    border-radius: 12px 12px 0 0;
}

.product-image img {
    object-fit: contain;
}

.discount-badge {
    border-radius: 6px;
    background: var(--orange);
    top: 6px;
    left: 6px;
    padding: 3px 6px;
}

.product-name {
    font-weight: 500;
}

.local-price {
    color: var(--primary-green);
}

/* ============================================
   BLINKIT THEME - 2-COLUMN VIEW (CATEGORY / SEARCH)
   ============================================ */
.products-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 12px;
}

.products-grid-2col .product-image {
    height: 95px;
}

.products-view-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 16px;
    margin-bottom: 12px;
    position: sticky;
    top: 60px;
    background: white;
    z-index: 10;
    padding-top: 4px;
    padding-bottom: 8px;
}

.products-view-header .section-title {
    flex: 1;
}

.add-all-favs-btn {
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.back-btn {
    background: var(--light-bg);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ============================================
   BLINKIT THEME - SKELETON LOADERS
   ============================================ */
@keyframes skeleton-pulse {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton-card {
    flex: 0 0 150px;
    width: 150px;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.skeleton-card .skeleton-image {
    height: 120px;
}

.skeleton-card .skeleton-line {
    height: 12px;
    margin: 12px;
    border-radius: 4px;
}

.skeleton-card .skeleton-line.short {
    width: 60%;
}

.skeleton-image,
.skeleton-line {
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
    background-size: 400px 100%;
    animation: skeleton-pulse 1.4s ease infinite;
}

.skeleton-categories {
    display: flex;
    gap: 16px;
    overflow: hidden;
    padding: 4px 16px;
}

.skeleton-categories .skeleton-circle {
    flex: 0 0 70px;
    width: 70px;
    height: 80px;
    border-radius: 12px;
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
    background-size: 400px 100%;
    animation: skeleton-pulse 1.4s ease infinite;
}

/* ============================================
   BLINKIT THEME - TOAST NOTIFICATION
   ============================================ */
.toast {
    position: fixed;
    left: 50%;
    bottom: 76px;
    transform: translateX(-50%) translateY(20px);
    background: var(--text-dark);
    color: white;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    z-index: 400;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   BLINKIT THEME - FOOTER NAV
   ============================================ */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    z-index: 200;
}

.nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 10px;
    font-weight: 600;
    position: relative;
}

.nav-tab .nav-icon {
    font-size: 20px;
}

.nav-tab.active {
    color: var(--primary-green);
}

.nav-tab .nav-badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 22px);
    background: var(--primary-green);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* ============================================
   CART BADGE BOUNCE ANIMATION
   ============================================ */
@keyframes cart-bounce {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.4); }
    60% { transform: scale(0.9); }
}

.cart-count.bounce,
.nav-badge.bounce {
    animation: cart-bounce 0.4s ease;
}

/* Tablet and up: cap content width for blinkit */
@media (min-width: 600px) {
    .products-scroll .product-card {
        flex: 0 0 170px;
        width: 170px;
    }

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