/*
 * Blinkit-inspired Customer UI
 * Mobile-first, bold, clean
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Sora:wght@500;600;700&display=swap');

:root {
    --primary-color: #0C831F;
    --primary-dark: #0A6B19;
    --secondary-color: #F8CB46;
    --accent-color: #FFB703;
    --dark-bg: #0C3B2E;
    --light-bg: #F7F8FA;
    --surface: #FFFFFF;
    --surface-2: #F3F4F6;
    --text-primary: #1F2937;
    --text-secondary: #667085;
    --text-light: #98A2B3;
    --border-light: #E6E8EC;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 10px 28px rgba(16, 24, 40, 0.12);
    --shadow-lg: 0 18px 40px rgba(16, 24, 40, 0.16);
    --ring: 0 0 0 3px rgba(12, 131, 31, 0.2);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: linear-gradient(180deg, #F7F8FA 0%, #F2F4F7 100%);
    color: var(--text-primary);
    line-height: 1.6;
}

a { color: inherit; }

::selection {
    background: rgba(12, 131, 31, 0.2);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

/* Top Nav */
.top-navbar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
}

.navbar-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 72px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-text {
    font-family: 'Sora', 'Plus Jakarta Sans', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.4px;
}

.navbar-search {
    flex: 1;
    max-width: 520px;
    margin: 0 20px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 44px 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    font-size: 0.95rem;
    background: var(--surface);
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: rgba(12, 131, 31, 0.4);
    box-shadow: var(--ring);
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}

.nav-btn:hover {
    background: var(--surface-2);
    border-color: var(--border-light);
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--accent-color);
    color: var(--surface);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
    min-width: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.btn-login {
    background: linear-gradient(135deg, var(--primary-color), #13A34A);
    color: var(--surface);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    border: none;
}

/* Profile */
.profile-dropdown { position: relative; }

.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--surface-2);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-btn:hover { background: var(--surface); }

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #13A34A);
    color: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.dropdown-menu {
    position: absolute;
    top: 115%;
    right: 0;
    background: var(--surface);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 8px 0;
    display: none;
    z-index: 1000;
    border: 1px solid var(--border-light);
}

.dropdown-menu.show { display: block; animation: dropdownFade 0.18s ease; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.dropdown-item:hover { background: var(--surface-2); }

.dropdown-item i { font-size: 1.1rem; color: var(--text-secondary); }

.dropdown-divider { height: 1px; background: var(--border-light); margin: 8px 0; }

/* Hero */
.hero-section {
    background: linear-gradient(135deg, #0C831F 0%, #0A6B19 60%, #0C3B2E 100%);
    color: var(--surface);
    padding: 64px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: -30% -20% auto auto;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(248, 203, 70, 0.25), transparent 60%);
    opacity: 0.8;
}

.hero-content h1 {
    font-family: 'Sora', 'Plus Jakarta Sans', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-content p { font-size: 1.05rem; opacity: 0.92; }

/* Container */
.main-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px 20px 50px;
}

/* Category Pills */
.category-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0 16px;
    margin-bottom: 24px;
    scrollbar-width: none;
}

.category-pills::-webkit-scrollbar { display: none; }

.category-pill {
    padding: 8px 14px;
    background: #FFFFFF;
    border: 1px solid #E7E9ED;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 1px 0 rgba(16, 24, 40, 0.04);
}

.category-pill:hover,
.category-pill.active {
    background: #E9F7EC;
    color: var(--primary-color);
    border-color: rgba(12, 131, 31, 0.3);
}

.category-pill.active {
    box-shadow: 0 6px 18px rgba(12, 131, 31, 0.18);
}

/* Bootstrap primary overrides (remove blue) */
.btn-primary {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Home Page Compact Cards */
.home-page .products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.home-page .product-card {
    min-height: 270px;
    border-radius: 12px;
}

.home-page .product-info {
    padding: 10px;
    min-height: 120px;
}

.home-page .product-name {
    font-size: 0.9rem;
    min-height: 36px;
}

.home-page .product-quantity {
    font-size: 0.8rem;
}

.home-page .product-price {
    font-size: 0.95rem;
}

.home-page .btn-add-cart {
    padding: 6px 10px;
    font-size: 0.78rem;
    border-radius: 8px;
}

.section-title {
    font-family: 'Sora', 'Plus Jakarta Sans', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
}

.view-all {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 22px;
    align-items: stretch;
}

/* Product Card */
.product-card {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    animation: fadeUp 0.4s ease both;
    height: 100%;
    min-height: 330px;
}

.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

.product-image-wrapper {
    position: relative;
    padding-top: 100%;
    background: linear-gradient(180deg, #F4F6F8 0%, #FFFFFF 100%);
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image { transform: scale(1.04); }

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary-color);
    color: #111827;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.product-info {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 150px;
}

.product-timing { font-size: 0.75rem; color: var(--text-light); }

.product-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.product-quantity { font-size: 0.85rem; color: var(--text-secondary); }

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.product-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-shrink: 1;
}

.product-actions .btn-product-details,
.product-actions .btn-add-cart {
    white-space: nowrap;
    min-width: 0;
}

.btn-add-cart {
    background: linear-gradient(135deg, var(--primary-color), #13A34A);
    color: var(--surface);
    border: none;
    padding: 7px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-add-cart:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* Cart */
.cart-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 26px 20px 40px;
}

.cart-header {
    font-family: 'Sora', 'Plus Jakarta Sans', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.cart-content {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
}

.cart-items-section {
    background: var(--surface);
    border-radius: 16px;
    padding: 22px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-light);
}

.cart-item:last-child { border-bottom: none; }

.cart-item-image {
    width: 86px;
    height: 86px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--surface-2);
}

.cart-item-details { flex: 1; }

.cart-item-name { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }

.cart-item-meta { font-size: 0.85rem; color: var(--text-secondary); }

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 2px solid var(--primary-color);
    background: var(--surface);
    color: var(--primary-color);
    border-radius: 50%;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qty-btn:hover { background: var(--primary-color); color: var(--surface); }

.qty-number { font-weight: 700; min-width: 28px; text-align: center; }

.cart-summary {
    background: var(--surface);
    border-radius: 16px;
    padding: 22px;
    border: 1px solid var(--border-light);
    position: sticky;
    top: 90px;
    box-shadow: var(--shadow-sm);
}

.summary-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 16px; }

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.summary-row strong { color: var(--text-primary); }

.summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 2px dashed var(--border-light);
    font-size: 1.2rem;
    font-weight: 800;
}

.btn-checkout {
    width: 100%;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--primary-color), #13A34A);
    color: var(--surface);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    margin-top: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-checkout:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* Empty State */
.empty-state { text-align: center; padding: 70px 20px; }

.empty-state i { font-size: 4rem; color: var(--text-light); margin-bottom: 20px; }

.empty-state h3 { font-size: 1.4rem; margin-bottom: 8px; }

.empty-state p { color: var(--text-secondary); margin-bottom: 22px; }

/* Checkout helpers */
.checkout-container .payment-method {
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--surface);
}

.checkout-container .payment-method.active {
    border-color: var(--primary-color);
    background: rgba(12, 131, 31, 0.08);
}

.checkout-container .payment-method:hover {
    border-color: var(--primary-color);
}

/* Shared page shells */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid var(--border-light) !important;
    box-shadow: var(--shadow-sm);
}

.navbar .navbar-brand {
    font-family: 'Sora', 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: var(--primary-color) !important;
    letter-spacing: -0.01em;
}

.navbar .nav-link {
    color: var(--text-primary);
    font-weight: 600;
    border-radius: 9px;
    padding: 7px 11px !important;
    transition: all 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(12, 131, 31, 0.1);
}

.order-card,
.track-form,
.profile-header,
.profile-card,
.checkout-form,
.order-summary-sidebar,
.success-box,
.failed-container {
    border: 1px solid var(--border-light) !important;
    border-radius: 18px !important;
    box-shadow: var(--shadow-sm) !important;
    background: var(--surface) !important;
}

.success-box,
.failed-container {
    margin-top: 48px;
}

.profile-avatar-large {
    background: linear-gradient(135deg, var(--primary-color), #13A34A) !important;
}

.info-row {
    border-bottom: 1px dashed var(--border-light) !important;
}

.btn-main,
.btn-edit {
    background: linear-gradient(135deg, var(--primary-color), #13A34A) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(12, 131, 31, 0.18);
    transition: all 0.2s ease;
}

.btn-main:hover,
.btn-edit:hover {
    background: linear-gradient(135deg, var(--primary-dark), #0f8d3b) !important;
    transform: translateY(-1px);
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background:
        radial-gradient(circle at 12% 10%, rgba(253, 195, 110, 0.36) 0%, transparent 28%),
        radial-gradient(circle at 90% 12%, rgba(82, 186, 126, 0.28) 0%, transparent 32%),
        linear-gradient(180deg, #f3f7f6 0%, #eaf1ef 100%);
}

.login-container,
.forgot-container,
.card-box {
    border: 1px solid var(--border-light) !important;
    border-radius: 24px !important;
    box-shadow: var(--shadow-lg) !important;
    background: rgba(255, 255, 255, 0.97) !important;
    max-width: 460px !important;
    width: 100%;
}

.logo-icon {
    color: var(--primary-color) !important;
}

.logo-text {
    color: var(--primary-color) !important;
}

.small-text,
.link-text,
.resend-link {
    color: var(--text-secondary) !important;
}

.link-text,
.resend-link {
    font-weight: 700;
}

.link-text:hover,
.resend-link:hover {
    color: var(--primary-color) !important;
}

.orders-page,
.checkout-page,
.profile-page,
.products-page,
.status-page,
.wishlist-page {
    background:
        radial-gradient(circle at 8% 7%, rgba(252, 212, 140, 0.25), transparent 24%),
        radial-gradient(circle at 92% 10%, rgba(120, 198, 170, 0.18), transparent 26%),
        linear-gradient(180deg, #f3f7f6 0%, #eef4f2 100%);
    min-height: 100vh;
}

.page-title {
    font-family: 'Sora', 'Plus Jakarta Sans', sans-serif;
    color: #173a35;
    letter-spacing: -0.02em;
}

.orders-page .container,
.checkout-page .checkout-container,
.profile-page .profile-container,
.products-page .products-shell,
.status-page .success-box,
.status-page .failed-container {
    position: relative;
}

.orders-page .status-timeline {
    gap: 8px;
}

.orders-page .status-step small {
    color: #4d6d67;
    font-weight: 600;
}

.orders-page .status-icon {
    background: #d7e4e1 !important;
    color: #5a726d;
    border: 2px solid #dce9e6;
}

.orders-page .status-step.active .status-icon {
    background: linear-gradient(135deg, #0f8b4a 0%, #13a34a 100%) !important;
    color: #fff;
    border-color: transparent;
}

.orders-page .status-step.completed .status-icon {
    background: #0c831f !important;
    color: #fff;
    border-color: transparent;
}

.orders-page .status-line {
    background: #d3e0dd !important;
}

.orders-page .status-step.completed .status-line {
    background: linear-gradient(90deg, #0c831f 0%, #12a046 100%) !important;
}

.products-page .products-shell {
    margin-top: 8px;
}

.products-page .products-grid {
    margin-top: 10px;
}

.products-page .btn-outline-secondary.btn-sm {
    border-radius: 10px;
    border-color: #b8c9c4;
}

.products-page .btn-sm {
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 700;
}

.status-page .success-box,
.status-page .failed-container {
    margin: 30px auto 24px;
    max-width: 680px;
}

.status-page .detail-row {
    border-bottom: 1px dashed #dfebe8;
    padding: 11px 0;
}

.checkout-page .checkout-container {
    margin-top: 20px;
}

.checkout-page .page-title {
    margin-top: 6px;
}

.profile-page .profile-container {
    margin-top: 22px;
}

.agreement-check {
    padding: 10px 12px;
    background: #f3faf4;
    border: 1px solid #d5ebd8;
    border-radius: 10px;
}

.agreement-check .form-check-input {
    margin-top: 0.22rem;
    border-color: #7dbf87;
}

.agreement-check .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.agreement-check label {
    font-size: 0.9rem;
    color: #335347;
}

.agreement-check a {
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: none;
}

.agreement-check a:hover {
    text-decoration: underline;
}

.legal-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    font-size: 0.85rem;
}

.legal-links a {
    color: #4f6d62;
    text-decoration: none;
}

.legal-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.legal-page {
    background:
        radial-gradient(circle at 8% 6%, rgba(253, 208, 132, 0.35), transparent 24%),
        radial-gradient(circle at 92% 9%, rgba(98, 206, 161, 0.28), transparent 28%),
        linear-gradient(180deg, #f2f7f5 0%, #eaf1ef 100%);
    min-height: 100vh;
}

.legal-shell {
    max-width: 1120px;
    margin: 28px auto;
    padding: 0 16px 28px;
}

.legal-hero {
    border-radius: 20px;
    padding: 26px 24px;
    background: linear-gradient(130deg, #0a5f33 0%, #0c831f 52%, #13a34a 100%);
    box-shadow: 0 18px 34px rgba(12, 97, 39, 0.28);
    color: #fff;
    margin-bottom: 16px;
}

.legal-hero.terms {
    background: linear-gradient(130deg, #13486f 0%, #0f6ea5 55%, #2f8ac2 100%);
    box-shadow: 0 18px 34px rgba(15, 79, 124, 0.3);
}

.legal-hero h1 {
    margin: 10px 0 6px;
    font-size: 2rem;
    color: #fff;
}

.legal-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.legal-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 6px 11px;
    background: rgba(255, 255, 255, 0.18);
}

.legal-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
    align-items: start;
}

.legal-toc {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 16px;
    position: sticky;
    top: 90px;
}

.legal-toc h6 {
    margin: 0 0 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.legal-toc a {
    display: block;
    text-decoration: none;
    color: #305650;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 9px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.legal-toc a:hover {
    color: var(--primary-color);
    background: #edf8f1;
}

.legal-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    padding: 22px;
}

.legal-title {
    font-family: 'Sora', 'Plus Jakarta Sans', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.legal-meta {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.legal-section {
    border: 1px solid #e5efea;
    border-radius: 14px;
    padding: 14px 14px 12px;
    margin-bottom: 12px;
    background: #fbfefd;
}

.legal-section h2 {
    font-size: 1.05rem;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legal-step {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #dcf4e2;
    color: #0c6a2d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

.legal-page.terms-page .legal-step {
    background: #dbeef9;
    color: #125a87;
}

.legal-card p,
.legal-card li {
    color: #334155;
    margin-bottom: 0;
}

.legal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* Responsive */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    }

    .cart-content {
        grid-template-columns: 1fr;
    }

    .cart-summary { position: static; }

    .home-page .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .legal-layout {
        grid-template-columns: 1fr;
    }

    .legal-toc {
        position: static;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        height: auto;
        flex-wrap: wrap;
        padding: 10px 16px;
    }

    .navbar-search {
        order: 3;
        width: 100%;
        margin: 10px 0 4px;
        max-width: 100%;
    }

    .hero-content h1 { font-size: 1.9rem; }

    .legal-hero {
        padding: 18px 16px;
    }

    .legal-hero h1 {
        font-size: 1.6rem;
    }

    .legal-shell {
        margin-top: 16px;
        padding: 0 12px 20px;
    }

    .legal-card {
        padding: 14px;
    }

    .products-grid {
        display: flex;
        overflow-x: auto;
        gap: 14px;
        padding-bottom: 12px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .products-grid::-webkit-scrollbar {
        height: 6px;
    }

    .products-grid::-webkit-scrollbar-thumb {
        background: rgba(16, 24, 40, 0.15);
        border-radius: 999px;
    }

    .product-card {
        flex: 0 0 70%;
        max-width: 320px;
        scroll-snap-align: start;
    }

    .home-page .products-grid {
        display: grid !important;
        overflow: visible !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .home-page .product-card {
        flex: none !important;
        max-width: none !important;
    }

    .cart-item {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .cart-item-image { width: 64px; height: 64px; }

    .quantity-selector { gap: 8px; }
}

@media (max-width: 480px) {
    .product-card { flex-basis: 82%; }
    .navbar-actions { gap: 8px; }
    .nav-btn { padding: 8px 10px; }

    .home-page .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .home-page .product-footer,
    .products-page .product-footer {
        flex-wrap: wrap;
    }

    .home-page .product-price,
    .products-page .product-price {
        width: 100%;
    }

    .home-page .product-actions,
    .products-page .product-actions {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
    }

    .home-page .product-actions .btn-product-details,
    .home-page .product-actions .btn-add-cart,
    .products-page .product-actions .btn-product-details,
    .products-page .product-actions .btn-add-cart {
        width: 100%;
        text-align: center;
    }
}
