:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #16a34a;
    --success-bg: #dcfce7;
    --warning: #ea580c;
    --warning-bg: #ffedd5;
    --error: #dc2626;
    --error-bg: #fee2e2;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --success: #22c55e;
    --success-bg: #14532d;
    --warning: #f97316;
    --warning-bg: #7c2d12;
    --error: #ef4444;
    --error-bg: #7f1d1d;
    --gray-50: #111827;
    --gray-100: #1f2937;
    --gray-200: #374151;
    --gray-300: #4b5563;
    --gray-400: #6b7280;
    --gray-500: #9ca3af;
    --gray-600: #d1d5db;
    --gray-700: #e5e7eb;
    --gray-800: #f3f4f6;
    --gray-900: #f9fafb;
    --white: #1f2937;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
}

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

body {
    font-family: 'Inter', 'Noto Sans HK', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.logo-icon {
    font-size: 1.75rem;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: var(--gray-200);
}

.lang-current {
    color: var(--primary);
    font-weight: 600;
}

.lang-separator {
    color: var(--gray-400);
}

.lang-other {
    color: var(--gray-500);
}

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

.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.2s;
}

.theme-btn:hover {
    background: var(--gray-200);
}

.theme-btn .icon-sun,
.theme-btn .icon-moon {
    display: none;
}

:root .theme-btn .icon-moon {
    display: block;
}

[data-theme="dark"] .theme-btn .icon-sun {
    display: block;
}

[data-theme="dark"] .theme-btn .icon-moon {
    display: none;
}

.main {
    flex: 1;
    padding: 24px 0;
}

.search-section {
    margin-bottom: 24px;
}

.search-box {
    display: flex;
    gap: 8px;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--primary);
}

.search-input::placeholder {
    color: var(--gray-400);
}

.search-btn {
    padding: 12px 20px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.filters-section {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
}

.filter-select {
    padding: 10px 12px;
    font-size: 0.9375rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.filter-select:focus {
    border-color: var(--primary);
}

.filters-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

.results-count {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.clear-btn {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.clear-btn:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

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

.error {
    text-align: center;
    padding: 40px 20px;
}

.error-message {
    color: var(--error);
    margin-bottom: 16px;
}

.retry-btn {
    padding: 10px 24px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

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

.hidden {
    display: none !important;
}

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

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
}

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

.product-header {
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
}

.product-brand {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-category {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 6px;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
}

.product-unit-info {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--primary);
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
}

.product-prices {
    padding: 16px;
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-50);
}

.price-row:last-child {
    border-bottom: none;
}

.price-row.best-price {
    background: var(--success-bg);
    margin: 0 -16px;
    padding: 8px 16px;
    border-radius: var(--radius);
}

.supermarket-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.price-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.price-row.best-price .price-value {
    color: var(--success);
}

.price-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.price-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.unit-price {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
}

.offer-price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.offer-price-label {
    color: var(--warning);
    font-weight: 500;
}

.offer-price-value {
    color: var(--warning);
    font-weight: 700;
}

.offer-min-qty {
    color: var(--gray-500);
    font-size: 0.65rem;
}

.price-row.price-more {
    justify-content: center;
}

.price-row.price-more span {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.best-badge {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--success);
    background: var(--white);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

.best-badge.offer-best {
    color: var(--white);
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 4px rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 12px rgba(245, 158, 11, 0.8); }
}

.product-offers {
    padding: 12px 16px;
    background: var(--warning-bg);
    border-top: 1px solid var(--gray-100);
}

.offer-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--warning);
    font-weight: 500;
}

.offer-tag::before {
    content: "🏷️";
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    padding: 20px 0;
}

.page-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

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

.page-info {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 8px;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--gray-600);
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.modal-body {
    padding: 24px;
}

.modal-header {
    margin-bottom: 20px;
    padding-right: 40px;
}

.modal-brand {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.modal-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.4;
}

.modal-category {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 8px;
}

.modal-section {
    margin-bottom: 24px;
}

.modal-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.modal-price-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-price-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.modal-price-item.best {
    background: var(--success-bg);
    border: 2px solid var(--success);
}

.modal-supermarket {
    font-weight: 500;
    color: var(--gray-700);
}

.modal-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
}

.modal-price-item.best .modal-price {
    color: var(--success);
}

.modal-price-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.modal-price-values {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-unit-price {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-500);
    background: var(--gray-200);
    padding: 2px 6px;
    border-radius: 4px;
}

.modal-unit-info {
    font-size: 0.875rem;
    color: var(--primary);
    margin-top: 8px;
    font-weight: 500;
}

.modal-offer-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--gray-200);
    flex-wrap: wrap;
}

.modal-offer-label {
    font-size: 0.75rem;
    color: var(--warning);
    font-weight: 500;
}

.modal-offer-effective {
    font-size: 1rem;
    font-weight: 700;
    color: var(--warning);
}

.modal-savings {
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 600;
    background: var(--success-bg);
    padding: 2px 8px;
    border-radius: 4px;
}

.modal-offers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-offer-item {
    padding: 12px 16px;
    background: var(--warning-bg);
    border-radius: var(--radius);
    border-left: 4px solid var(--warning);
}

.modal-offer-supermarket {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--warning);
    margin-bottom: 4px;
}

.modal-offer-text {
    font-size: 0.875rem;
    color: var(--gray-700);
}

.footer {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 24px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin: 0;
}

.info-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.info-btn:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.info-btn svg {
    width: 14px;
    height: 14px;
}

.info-modal-content {
    max-width: 560px;
}

.info-modal-body {
    padding: 8px 0;
}

.info-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 24px;
}

.info-section {
    margin-bottom: 20px;
}

.info-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.info-section p {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.supermarket-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 24px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.supermarket-list li {
    font-size: 0.9rem;
    color: var(--gray-700);
    padding-left: 16px;
    position: relative;
}

.supermarket-list li::before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: 0;
}

.info-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.info-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.info-link:hover {
    color: var(--primary-hover);
}

.info-link svg {
    width: 14px;
    height: 14px;
}

.shopping-list-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--gray-600);
    transition: all 0.2s;
}

.shopping-list-btn:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.shopping-list-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.shopping-list-panel {
    position: fixed;
    inset: 0;
    z-index: 300;
}

.shopping-list-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s;
}

.shopping-list-panel:not(.hidden) .shopping-list-overlay {
    opacity: 1;
}

.shopping-list-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}

.shopping-list-panel:not(.hidden) .shopping-list-content {
    transform: translateX(0);
}

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

.shopping-list-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.shopping-list-close {
    padding: 8px;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--gray-600);
    transition: all 0.2s;
}

.shopping-list-close:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.shopping-list-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.shopping-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-500);
    text-align: center;
}

.shopping-list-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.shopping-list-empty-text {
    font-size: 1rem;
    margin-bottom: 4px;
}

.shopping-list-empty-hint {
    font-size: 0.875rem;
    color: var(--gray-400);
}

.shopping-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 8px;
}

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

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

.shopping-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-900);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shopping-item-brand {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 2px;
}

.shopping-item-price {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--success);
    margin-top: 4px;
}

.shopping-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-600);
    transition: all 0.2s;
}

.qty-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.qty-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-800);
    min-width: 20px;
    text-align: center;
}

.shopping-item-remove {
    padding: 6px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: var(--gray-400);
    transition: all 0.2s;
    flex-shrink: 0;
}

.shopping-item-remove:hover {
    background: var(--error-bg);
    color: var(--error);
}

.shopping-list-summary {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    flex-shrink: 0;
}

.summary-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 12px;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.summary-item.best {
    background: var(--success-bg);
    border-color: var(--success);
}

.summary-supermarket {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.summary-total {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
}

.summary-item.best .summary-total {
    color: var(--success);
}

.summary-badge {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--white);
    background: var(--success);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

.summary-item-info {
    display: flex;
    align-items: center;
}

.summary-missing {
    font-size: 0.7rem;
    color: var(--warning);
    margin-top: 2px;
}

.shopping-list-actions {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.clear-list-btn {
    width: 100%;
    padding: 12px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.clear-list-btn:hover {
    background: var(--error-bg);
    border-color: var(--error);
    color: var(--error);
}

.add-to-list-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 16px;
    margin-top: 12px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s;
}

.add-to-list-btn:hover {
    background: var(--primary-hover);
}

.add-to-list-btn.added {
    background: var(--success);
}

.add-to-list-btn svg {
    width: 16px;
    height: 16px;
}

.product-card-actions {
    padding: 12px 16px;
    border-top: 1px solid var(--gray-100);
}

.card-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 12px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
}

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

.card-add-btn.in-list {
    background: var(--success-bg);
    border-color: var(--success);
    color: var(--success);
}

.card-add-btn svg {
    width: 14px;
    height: 14px;
}

/* Modal Action Buttons */
.modal-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.add-to-list-btn.in-list {
    background: var(--success);
    cursor: default;
}

.add-to-list-qty {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 8px;
}

.modal-qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    transition: all 0.2s;
}

.modal-qty-btn:hover {
    background: rgba(255,255,255,0.3);
}

.modal-qty-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    min-width: 24px;
    text-align: center;
}

@media (max-width: 640px) {
    .header-content {
        padding: 12px 0;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
    }
    
    .filters-row {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .page-btn span {
        display: none;
    }
}
