/* ===== BuyNearby App CSS ===== */
/* Mobile-first styles for product browsing & checkout.
   Uses design tokens from design-tokens.css for app-migration readiness. */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    padding-top: var(--header-height, 80px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f9fafb;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
}

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

/* ===== WRAPPER ===== */
.container {
    width: 100%;
    max-width: 540px;
    margin: auto;
    padding: 0 16px;
}

/* ===== HEADER ===== */
.header {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 14px 16px;
    font-size: 18px;
    font-weight: 600;
    z-index: 200;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.header .back {
    font-size: 24px;
    font-weight: bold;
    color: #0d9488;
}

/* ===== STORE HEADER ===== */
.store-header {
    background: #fff;
    margin: 14px 0;
    padding: 18px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    display: flex;
    align-items: center;
    gap: 14px;
}

.store-header img {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    object-fit: cover;
}

.store-header .info h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.store-header .info p {
    margin: 2px 0 0;
    color: #6b7280;
    font-size: 14px;
}

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

/* ===== PRODUCT CARD ===== */
.product-card {
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}

.product-card img {
    width: 100%;
    height: 130px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 10px;
}

.product-card h3 {
    font-size: 15px;
    margin: 0 0 6px;
    font-weight: 600;
    line-height: 1.35;
    color: #1f2937;
}

.product-card .price {
    font-size: 16px;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 10px;
}

/* Add button — brand purple (was #ff6600 orange) */
.btn-add {
    background: linear-gradient(135deg, #0d9488, #115e59);
    color: #fff;
    padding: 10px;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    margin-top: auto;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

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

/* ===== CART STICKY ===== */
.cart-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 14px 18px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 200;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
}

.cart-sticky .total {
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
}

/* Cart button — brand purple (was #2196f3 blue) */
.cart-sticky button {
    background: linear-gradient(135deg, #0d9488, #115e59);
    padding: 12px 22px;
    border-radius: 12px;
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.cart-sticky button:active {
    transform: scale(0.97);
    opacity: 0.9;
}

/* ===== BUTTONS ===== */
/* Primary — brand purple (was #2196f3 blue) */
.btn-primary {
    background: linear-gradient(135deg, #0d9488, #115e59);
    padding: 14px;
    border-radius: 12px;
    color: white;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    display: block;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.btn-primary:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.btn-secondary {
    background: #f3f4f6;
    padding: 12px;
    border-radius: 12px;
    color: #374151;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-secondary:hover,
.btn-secondary:active {
    background: #e5e7eb;
}

/* ===== CHECKOUT CARDS ===== */
.card {
    background: white;
    padding: 18px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    margin-bottom: 14px;
    border: 1px solid #f3f4f6;
}

/* ===== INPUT FIELDS ===== */
input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    font-size: 15px;
    font-family: inherit;
    margin-bottom: 12px;
    background: #fff;
    color: #1f2937;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

/* ===== SUCCESS PAGE ===== */
.success-box {
    text-align: center;
    padding: 48px 20px;
}

.success-box h1 {
    font-size: 28px;
    color: #10b981;
    font-weight: 700;
    margin-bottom: 12px;
}

.success-box p {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.6;
}

/* ===== STATUS BADGES ===== */
.badge {
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-success  { background: #d1fae5; color: #065f46; }
.badge-warning  { background: #fef3c7; color: #92400e; }
.badge-danger   { background: #fee2e2; color: #991b1b; }
.badge-info     { background: #dbeafe; color: #1e40af; }
.badge-gray     { background: #f3f4f6; color: #374151; }
.badge-purple   { background: #ccfbf1; color: #134e4a; }
