:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #f1f5f9;
    --bg-color: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --amazon-color: #ff9900;
    --flipkart-color: #2874f0;
    --success-color: #16a34a;
    --card-bg: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --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);
    --font-family: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 0) 0, hsla(253, 16%, 7%, 0) 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 0.1) 0, hsla(225, 39%, 30%, 0) 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 0.1) 0, hsla(339, 49%, 30%, 0) 50%);
    color: var(--text-main);
    min-height: 100vh;
    padding: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.app-footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 0.8s ease-out;
}

.app-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.05em;
}

.highlight {
    color: var(--primary-color);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

/* Search Bar */
.search-container {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

#search-form {
    display: flex;
    gap: 1rem;
    background: white;
    padding: 0.5rem;
    border-radius: 99px;
    /* Pill shape */
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

#search-input {
    width: 100%;
    border: none;
    outline: none;
    padding: 1rem 1rem 1rem 3.5rem;
    font-size: 1.1rem;
    border-radius: 99px;
    background: transparent;
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 2rem;
    border-radius: 99px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1rem;
    font-style: italic;
}

/* Results Wrapper (New Two Column) */
.results-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
    align-items: start;
}

.platform-column {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    min-height: 400px;
    /* Min height to look consistent while loading */
    display: flex;
    flex-direction: column;
}

#amazon-column {
    border-top: 5px solid #ff9900;
}

#flipkart-column {
    border-top: 5px solid #2874f0;
}

.column-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.column-content {
    padding: 1rem;
    flex-grow: 1;
    background: #f8fafc;
}

.product-list-item {
    display: flex;
    gap: 1rem;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid transparent;
}

.product-list-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 0, 0, 0.05);
}

.item-img {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 5px;
}

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

.item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-title:hover {
    color: var(--primary-color);
}

.item-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.buy-btn-small {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 0.5rem;
    width: fit-content;
}

.status-indicator {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 99px;
}

.status-indicator.loading {
    background: #e2e8f0;
    color: var(--text-muted);
    animation: pulse 1.5s infinite;
}

.status-indicator.done {
    background: #dcfce7;
    color: #166534;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* Autocomplete Styles */
.autocomplete-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    margin-top: 0.5rem;
    overflow: hidden;
    list-style: none;
    border: 1px solid #e2e8f0;
}

.autocomplete-item {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    font-size: 1rem;
}

.autocomplete-item:hover {
    background-color: #f8fafc;
    color: var(--primary-color);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

/* Original Grid - hidden or removed */
.results-grid {
    display: none;
}

.product-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: center;
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

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

.product-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 12px;
}

.product-image {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
}

.product-details {
    width: 100%;
}

.product-name {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.product-rating {
    color: #f59e0b;
    /* Amber */
    font-weight: 600;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comparison-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
}

.platform-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.platform-card.best-deal {
    border-color: var(--success-color);
    background: #f0fdf4;
}

.best-deal-badge {
    position: absolute;
    top: 10px;
    right: -30px;
    background: var(--success-color);
    color: white;
    padding: 5px 30px;
    transform: rotate(45deg);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.platform-logo {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.amazon-logo {
    color: var(--text-main);
}

/* Simplification */
.flipkart-logo {
    color: var(--flipkart-color);
}

.price-tag {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0.5rem 0 1.5rem;
    color: var(--text-main);
}

.best-deal .price-tag {
    color: var(--success-color);
}

.buy-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    width: 100%;
    transition: background 0.2s;
}

.amazon-btn {
    background-color: #ffd814;
    /* Amazon yellow */
    color: #111;
    border: 1px solid #fcd200;
}

.amazon-btn:hover {
    background-color: #f7ca00;
}

.flipkart-btn {
    background-color: #2874f0;
    color: white;
    border: 1px solid #fcd200;
}

.flipkart-btn:hover {
    background-color: #1c5ec9;
}

/* --- REVIEWS SECTION --- */
.reviews-section {
    margin-top: 2rem;
}

.reviews-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.platform-reviews {
    background: #fff;
    padding: 1rem;
    border-radius: 12px;
}

.review-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.review-card {
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
}

.review-card:last-child {
    border-bottom: none;
}

.review-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.review-rating {
    color: #f59e0b;
    font-weight: 600;
}

.review-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    display: block;
}

.review-text {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-main);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Spinner */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

#loading-spinner {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Responsive */
@media (max-width: 768px) {
    .results-wrapper {
        grid-template-columns: 1fr;
    }


    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .app-title {
        font-size: 2rem;
    }

    #search-form {
        flex-direction: column;
        border-radius: 20px;
        padding: 1rem;
    }

    .search-icon {
        left: 1rem;
        font-size: 1rem;
    }

    #search-input {
        padding: 0.8rem 1rem 0.8rem 2.8rem;
        font-size: 1rem;
    }

    .search-btn {
        width: 100%;
        padding: 0.8rem;
        margin-top: 0.5rem;
    }
}

.info-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #f97316;
    color: white;
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.no-category-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    height: 100%;
    min-height: 150px;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 1rem;
}

.no-category-state i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #ef4444;
}

.no-category-state p {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* --- BLOG STYLES --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-image {
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 1.5rem;
}

.blog-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.blog-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Post Detail */
.post-header {
    text-align: center;
    max-width: 800px;
    margin: 2rem auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

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

.post-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.post-meta {
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.post-content-wrapper {
    max-width: 800px;
    margin: 0 auto 4rem;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.post-hero-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.post-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #334155;
}

.post-body h2,
.post-body h3 {
    color: var(--text-main);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

/* --- FAQ STYLES --- */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    /* Hide default arrow */
    position: relative;
    padding-right: 3rem;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--primary-color);
}

details[open] .faq-question::after {
    content: '-';
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- FOOTER NAV --- */
.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.feedback-container {
    max-width: 600px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

.submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 99px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

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

.btn-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}