/* ============================================
   FloraHub — Client Mobile-First CSS
   ============================================ */

/* ---------- Design Tokens ---------- */
:root {
    --primary: #2e7d32;
    --primary-light: #60ad5e;
    --primary-dark: #005005;
    --primary-50: rgba(46, 125, 50, 0.06);
    --primary-100: rgba(46, 125, 50, 0.12);
    --primary-200: rgba(46, 125, 50, 0.20);
    --accent: #fdd835;
    --accent-dark: #c6a700;

    --bg: #f4f6f8;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    --border: #e8ecf0;
    --border-light: #f0f2f4;

    --text-primary: #1a1d21;
    --text-secondary: #5f6b7a;
    --text-muted: #8f99a8;
    --text-inverse: #ffffff;

    --success: #16a34a;
    --success-bg: rgba(22, 163, 74, 0.08);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.08);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.08);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.08);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.10);
    --shadow-glow: 0 4px 20px rgba(46, 125, 50, 0.25);

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);

    --bottom-nav-height: 64px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --navbar-height: 56px;
}

/* ---------- Base Reset ---------- */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure body padding for bottom nav on mobile */
body.has-bottom-nav {
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom) + 8px);
}

/* ---------- Glassmorphism Navbar ---------- */
.client-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-light);
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    padding: 0 16px;
    transition: box-shadow var(--transition-normal);
}

.client-navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.client-navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary) !important;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.client-navbar .navbar-brand i {
    font-size: 1.4rem;
}

.client-navbar .nav-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.client-navbar .nav-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    position: relative;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.client-navbar .nav-icon-btn:hover,
.client-navbar .nav-icon-btn:active {
    background: var(--primary-50);
    color: var(--primary);
}

.client-navbar .nav-icon-btn .badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
}

.client-navbar .cart-badge {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--danger);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    animation: badgePop 0.3s var(--transition-spring);
}

@keyframes badgePop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

/* ---------- Bottom Navigation ---------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: stretch;
    height: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
    padding-bottom: var(--safe-area-bottom);
    box-shadow: 0 -2px 20px rgba(0,0,0,0.05);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    transition: color var(--transition-fast);
    position: relative;
    border: none;
    background: none;
    cursor: pointer;
    padding: 6px 0;
}

.bottom-nav-item i {
    font-size: 1.3rem;
    transition: transform var(--transition-spring);
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active i {
    transform: scale(1.1);
}

.bottom-nav-item .bottom-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 18px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--danger);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.55rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* FAB (Floating Action Button) - Central */
.bottom-nav-fab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-nav-fab-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: var(--shadow-glow);
    transform: translateY(-12px);
    transition: transform var(--transition-spring), box-shadow var(--transition-normal);
    cursor: pointer;
    position: relative;
}

.bottom-nav-fab-btn:active {
    transform: translateY(-10px) scale(0.95);
}

.bottom-nav-fab-btn .bottom-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: var(--danger);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Hide bottom nav on desktop */
@media (min-width: 992px) {
    .bottom-nav { display: none; }
    body.has-bottom-nav { padding-bottom: 0; }
}

/* ---------- Search Bar ---------- */
.search-bar-container {
    position: sticky;
    top: var(--navbar-height);
    z-index: 1020;
    background: var(--bg);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    padding: 0 16px;
    height: 44px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    gap: 10px;
}

.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.search-bar i {
    color: var(--text-muted);
    font-size: 1rem;
    flex-shrink: 0;
}

.search-bar input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    min-width: 0;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

/* ---------- Category Chips ---------- */
.category-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 16px 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

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

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition-fast);
    scroll-snap-align: start;
    text-decoration: none;
    flex-shrink: 0;
}

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

.category-chip.active {
    box-shadow: var(--shadow-glow);
}

/* ---------- Product Grid ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        padding: 20px;
    }
}

@media (min-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        padding: 24px;
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* ---------- Product Card ---------- */
.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-spring), box-shadow var(--transition-normal);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:active {
    transform: scale(0.98);
}

@media (min-width: 768px) {
    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }
}

.product-card-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--bg);
    display: block;
}

.product-card-img-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--bg), var(--border-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}

.product-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card-badge.featured {
    background: var(--accent);
    color: var(--accent-dark);
}

.product-card-badge.volume {
    background: var(--success-bg);
    color: var(--success);
}

.product-card-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 4px;
}

.product-card-category {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.product-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
}

.product-card-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.product-card-price .unit {
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

.product-card-add {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition-spring);
    flex-shrink: 0;
}

.product-card-add:active {
    transform: scale(0.85);
    background: var(--primary-dark);
}

.product-card-add.added {
    background: var(--success);
    animation: checkPop 0.4s ease;
}

@keyframes checkPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ---------- Cart Drawer / Bottom Sheet ---------- */
.cart-sheet {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    z-index: 1060;
    background: var(--bg-card);
    box-shadow: -8px 0 30px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
}

.cart-sheet.open {
    transform: translateX(0);
}

.cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 1055;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

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

.cart-sheet-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-sheet-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--bg);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.cart-sheet-close:hover {
    background: var(--border);
}

.cart-sheet-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0;
}

.cart-sheet-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--border-light);
    padding: 16px 20px;
    padding-bottom: calc(16px + var(--safe-area-bottom));
    background: var(--bg-card);
}

/* ---------- Cart Sections ---------- */
.cart-section {
    border-bottom: 1px solid var(--border-light);
}

.cart-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    user-select: none;
    transition: background var(--transition-fast);
}

.cart-section-header:hover {
    background: var(--primary-50);
}

.cart-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cart-section-title i {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.cart-section-title .section-icon-materials { background: var(--primary-100); color: var(--primary); }
.cart-section-title .section-icon-labor { background: var(--info-bg); color: var(--info); }
.cart-section-title .section-icon-transport { background: var(--warning-bg); color: var(--warning); }

.cart-section-subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.cart-section-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-section-total {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cart-section-chevron {
    color: var(--text-muted);
    transition: transform var(--transition-fast);
    font-size: 0.85rem;
}

.cart-section.expanded .cart-section-chevron {
    transform: rotate(180deg);
}

.cart-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-section.expanded .cart-section-content {
    max-height: 2000px;
}

/* ---------- Cart Items ---------- */
.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    transition: background var(--transition-fast);
}

.cart-item:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

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

.cart-item-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.cart-item-total {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    text-align: right;
}

/* Qty stepper */
.qty-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.qty-stepper button {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.qty-stepper button:hover {
    background: var(--primary-50);
    color: var(--primary);
}

.qty-stepper .qty-value {
    width: 32px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    line-height: 30px;
}

.cart-item-remove {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.cart-item-remove:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ---------- Service Selector ---------- */
.service-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.service-card:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

.service-card:hover {
    background: var(--primary-50);
}

.service-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--info-bg);
    color: var(--info);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.service-card-info {
    flex: 1;
    min-width: 0;
}

.service-card-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.service-card-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.service-card-price {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.service-card-price .price-type {
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* ---------- Transport Calculator ---------- */
.transport-calc {
    padding: 16px 20px;
}

.transport-calc .input-group-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.transport-calc input[type="number"] {
    flex: 1;
    height: 44px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 14px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg);
    outline: none;
    transition: border-color var(--transition-fast);
}

.transport-calc input[type="number"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.transport-calc .input-suffix {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}

.transport-calc .round-trip-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.transport-calc .round-trip-toggle input[type="checkbox"] {
    display: none;
}

.transport-calc .toggle-switch {
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: var(--radius-full);
    position: relative;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.transport-calc .toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-spring);
}

.transport-calc .round-trip-toggle input:checked + .toggle-switch {
    background: var(--primary);
}

.transport-calc .round-trip-toggle input:checked + .toggle-switch::after {
    transform: translateX(20px);
}

.transport-calc .transport-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--warning-bg);
    border-radius: var(--radius-md);
    margin-top: 8px;
}

.transport-calc .transport-result-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.transport-calc .transport-result-value {
    font-size: 1rem;
    font-weight: 800;
    color: var(--warning);
}

/* ---------- Cart Summary ---------- */
.cart-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.cart-summary-row .value {
    font-weight: 600;
    color: var(--text-primary);
}

.cart-summary-divider {
    border: none;
    border-top: 1.5px dashed var(--border);
    margin: 4px 0;
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    padding-top: 4px;
}

.cart-summary-total .total-value {
    color: var(--primary);
    font-size: 1.3rem;
}

/* ---------- Action Buttons ---------- */
.btn-primary-client {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn-primary-client:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(46, 125, 50, 0.35);
    color: white;
}

.btn-primary-client:active {
    transform: translateY(0) scale(0.98);
}

.btn-secondary-client {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

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

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp:hover {
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.35);
}

/* ---------- Empty State ---------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

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

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

/* ---------- Skeleton Loading ---------- */
.skeleton {
    background: linear-gradient(90deg,
        var(--border-light) 25%,
        var(--bg) 37%,
        var(--border-light) 63%
    );
    background-size: 400% 100%;
    animation: skeletonShimmer 1.4s ease infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeletonShimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.skeleton-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 1;
}

.skeleton-text {
    height: 12px;
    margin: 10px 12px;
}

.skeleton-text-sm {
    height: 8px;
    width: 60%;
    margin: 6px 12px;
}

.skeleton-price {
    height: 20px;
    width: 50%;
    margin: 12px 12px 14px;
}

/* ---------- Toast Notifications ---------- */
.toast-container {
    position: fixed;
    top: calc(var(--navbar-height) + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: calc(100% - 32px);
    max-width: 380px;
}

.toast-msg {
    background: var(--text-primary);
    color: white;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-xl);
    pointer-events: auto;
    animation: toastIn 0.4s var(--transition-spring);
}

.toast-msg.toast-out {
    animation: toastOut 0.3s ease forwards;
}

.toast-msg.success { background: var(--success); }
.toast-msg.error { background: var(--danger); }

@keyframes toastIn {
    0% { opacity: 0; transform: translateY(-20px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-20px) scale(0.95); }
}

/* ---------- Simulator Page ---------- */
.simulator-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 16px;
}

.simulator-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 16px;
}

.simulator-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.simulator-section-header .section-number {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.simulator-section-header h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.simulator-total-card {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    border-radius: var(--radius-xl);
    padding: 24px 20px;
    box-shadow: var(--shadow-glow);
    margin-bottom: 16px;
}

.simulator-total-card .total-label {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: 4px;
}

.simulator-total-card .total-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.simulator-total-card .total-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.simulator-total-card .breakdown-item {
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.85;
}

.simulator-total-card .breakdown-item .breakdown-value {
    font-weight: 700;
    opacity: 1;
}

/* ---------- WhatsApp Copy Modal ---------- */
.whatsapp-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1070;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.whatsapp-modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.whatsapp-modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

.whatsapp-modal-backdrop.open .whatsapp-modal {
    transform: translateY(0);
}

@media (min-width: 768px) {
    .whatsapp-modal-backdrop {
        align-items: center;
    }
    .whatsapp-modal {
        border-radius: var(--radius-xl);
        max-height: 70vh;
    }
}

.whatsapp-modal-handle {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    margin: 10px auto;
}

.whatsapp-modal-header {
    padding: 8px 20px 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.whatsapp-modal-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}

.whatsapp-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.whatsapp-modal-body pre {
    background: #0b141a;
    color: #e9edef;
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 0.78rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Segoe UI', system-ui, sans-serif;
    max-height: 300px;
    overflow-y: auto;
}

.whatsapp-modal-footer {
    padding: 16px 20px;
    padding-bottom: calc(16px + var(--safe-area-bottom));
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--border-light);
}

/* ---------- Submit Quote Modal ---------- */
.quote-form-container {
    padding: 16px 20px;
}

.form-field {
    margin-bottom: 16px;
}

.form-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-field label .required {
    color: var(--danger);
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    -webkit-appearance: none;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-100);
    background: var(--bg-card);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--text-muted);
}

/* ---------- Micro-animations ---------- */
.animate-in {
    animation: fadeInUp 0.4s ease both;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(16px); }
    100% { opacity: 1; transform: translateY(0); }
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }

/* ---------- Pulse on add ---------- */
.pulse-success {
    animation: pulseSuccess 0.5s ease;
}

@keyframes pulseSuccess {
    0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(22, 163, 74, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* ---------- Footer (desktop only) ---------- */
.client-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
    padding: 20px 0;
    margin-top: auto;
    text-align: center;
}

.client-footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 991px) {
    .client-footer {
        display: none;
    }
}

/* ---------- Utilities ---------- */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

@media (min-width: 768px) {
    .container-client {
        padding: 0 24px;
    }
}
