/* Modern Theme for PriceHunt */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #475569;
    --accent-color: #f59e0b;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-main: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --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);
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --font-sans: 'Roboto', 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* Header Styling */
.header_container {
    background-color: var(--surface-color) !important;
    box-shadow: var(--shadow-md) !important;
    border-bottom: 1px solid var(--border-color);
}

.mdl-layout__header-row {
    padding: 0 24px;
}

/* Hide hamburger menu on desktop */
@media (min-width: 769px) {
    .mdl-layout__drawer-button {
        display: none !important;
    }
}

.logo_tagline {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-left: 8px;
    font-weight: 500;
}

/* Search Box Styling */
#search_box {
    background: var(--background-color);
    border-radius: var(--radius-lg);
    padding: 4px 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

#search_box:focus-within {
    background: var(--surface-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#search_form {
    display: flex;
    align-items: center;
}

.mdl-textfield {
    padding: 0;
    margin: 0;
    width: 100%;
}

.mdl-textfield__label {
    top: 4px;
}

.mdl-textfield__label:after {
    background-color: transparent !important;
}

/* Hide label when input is focused or has value */
.mdl-textfield.is-focused .mdl-textfield__label,
.mdl-textfield.is-dirty .mdl-textfield__label {
    visibility: hidden;
}

#search_box .mdl-textfield__input:focus~.mdl-textfield__label,
#search_box .mdl-textfield__input:not(:placeholder-shown)~.mdl-textfield__label {
    opacity: 0;
}


.search-button {
    background: var(--primary-color) !important;
    box-shadow: none !important;
    border-radius: 50%;
    min-width: 40px;
    width: 40px;
    height: 40px;
    margin-left: 8px;
}

.search-button i {
    font-size: 20px;
}

/* Navigation */
.mdl-navigation__link:hover {
    color: var(--primary-color) !important;
    background-color: transparent !important;
}

.mdl-navigation__link i {
    margin-right: 6px;
    color: inherit;
}

/* Content Container */
.content_container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

h1 {
    font-weight: 700;
    color: var(--text-main);
    font-size: 2.25rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h1 span {
    background: linear-gradient(to right, var(--primary-color), #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Cards & Panels */
.mdl-card,
.product_display_container,
.description,
.specifications,
.product_overview,
.comments_container_wrapper,
.chart_container_wrapper {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm) !important;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.mdl-card:hover,
.product_display_container:hover {
    box-shadow: var(--shadow-md) !important;
    transform: translateY(-2px);
}

/* Tabs */
.mdl-tabs__tab-bar {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.mdl-tabs__tab {
    color: white !important;
    font-weight: 600;
    text-transform: none;
    font-size: 1rem;
    padding: 0 24px;
}

.mdl-tabs__tab.is-active {
    color: var(--primary-color) !important;
}

.mdl-tabs__tab.is-active::after {
    background: var(--primary-color) !important;
    height: 3px;
}

/* Buttons */
.mdl-button {
    text-transform: none;
    font-weight: 600;
    border-radius: var(--radius-md);
    letter-spacing: 0.025em;
}

.mdl-button--raised.mdl-button--colored {
    background: var(--primary-color) !important;
    color: white !important;
    box-shadow: var(--shadow-sm);
}

.mdl-button--raised.mdl-button--colored:hover {
    background: var(--primary-hover) !important;
    box-shadow: var(--shadow-md);
}

/* Footer */
.modern-footer {
    background-color: #1e293b;
    color: #f1f5f9;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding: 0 1.5rem;
}

.footer-column h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.footer-column p {
    color: #94a3b8;
    line-height: 1.7;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
    padding-left: 4px;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s;
}

.social-icons a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #64748b;
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header_container {
        padding: 0;
    }

    .mdl-layout__header-row {
        padding: 0 16px;
    }

    /* Fix logo overlap with hamburger menu on mobile */
    .mdl-layout__drawer-button {
        line-height: 48px;
    }

    .mdl-layout-title.logo,
    .mdl-layout__header-row .logo {
        margin-left: 60px !important;
        padding-left: 0 !important;
        display: flex;
        align-items: center;
    }

    .mdl-layout__header-row {
        padding-left: 8px !important;
    }

    h1 {
        font-size: 1.75rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Fix Search Bar Text Cutoff */
.mdl-textfield__input {
    border-bottom: none !important;
    font-size: 1rem;
    color: var(--text-main);
    padding: 8px 0;
    /* Add padding */
    height: auto;
    /* Allow auto height */
    line-height: 1.5;
    /* Proper line height */
}

/* Navigation Link Visibility */
.mdl-navigation__link {
    color: #1e293b !important;
    /* Very dark slate for better visibility */
    font-weight: 600;
    /* Increased weight */
    font-size: 0.95rem;
    transition: color 0.2s;
    opacity: 1 !important;
    /* Ensure full opacity */
}

/* Header Dropdown Fixes */
.mdl-menu__container {
    background-color: var(--surface-color) !important;
    box-shadow: var(--shadow-md) !important;
}

.mdl-menu__item {
    color: var(--text-main) !important;
    font-size: 0.9rem;
}

.mdl-menu__item:hover {
    background-color: var(--background-color) !important;
    color: var(--primary-color) !important;
}

.mdl-menu__outline {
    background-color: var(--surface-color) !important;
}

/* Ensure Header Row is Transparent */
.mdl-layout__header-row {
    background-color: transparent !important;
}

/* Hero Section - Minimal Horizontal Banner */
.hero-section {
    background: linear-gradient(135deg, #6b9bd1, #a4c4e4);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border: none;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1;
    min-width: 250px;
}

.hero-section h1 {
    color: white;
    font-size: 1.25rem;
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
}

.hero-section h1 span {
    background: none;
    -webkit-text-fill-color: white;
}

.hero-section .lead {
    font-size: 0.75rem;
    margin: 0.25rem 0 0 0;
    opacity: 0.9;
    line-height: 1.4;
}

.hero-cta {
    background: white !important;
    color: var(--primary-color) !important;
    font-size: 0.8rem;
    padding: 0 18px;
    height: 32px;
    line-height: 32px;
    flex-shrink: 0;
    white-space: nowrap;
}

.hero-cta:hover {
    background: #f8fafc !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Mobile: Stack vertically */
@media (max-width: 600px) {
    .hero-section {
        padding: 0.75rem 1rem;
    }

    .hero-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .hero-text {
        min-width: 100%;
    }

    .hero-section h1 {
        font-size: 1.1rem;
    }

    .hero-section .lead {
        font-size: 0.7rem;
    }

    .hero-cta {
        width: 100%;
        text-align: center;
        font-size: 0.75rem;
        padding: 0 12px;
        box-sizing: border-box;
    }
}

/* Popular Categories Refinements */
.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
    padding-left: 8px;
    border-left: 4px solid var(--primary-color);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.category-card {
    background: var(--surface-color);
    padding: 1.25rem 0.75rem;
    border-radius: var(--radius-lg);
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    height: 100%;
    box-sizing: border-box;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.category-card i {
    font-size: 2.25rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.category-card span {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Deals Section */
.populardeals_container_wrapper {
    margin-top: 3rem;
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.container_heading.big {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

#all_deals {
    text-align: right;
    margin-top: 1rem;
}

#all_deals a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

#all_deals a:hover {
    text-decoration: underline;
}

/* Why Choose PriceHunt Section */
/* Why Choose PriceHunt Section */
.why-choose-section {
    margin: 2.5rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.feature-card {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.feature-card i {
    font-size: 2.25rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.85rem;
}

/* Newsletter Signup Section */
.newsletter-section {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.newsletter-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.newsletter-text {
    flex: 1;
    min-width: 250px;
}

.newsletter-text h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: white;
}

.newsletter-text p {
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 0;
}

.newsletter-form {
    flex: 1;
    min-width: 250px;
}

.newsletter-form form {
    display: flex;
    gap: 0.75rem;
}

.newsletter-form .mdl-textfield {
    padding: 0;
    margin: 0;
    width: 100%;
}

.newsletter-form .mdl-textfield__input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: white;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.newsletter-form .mdl-textfield__label {
    color: rgba(255, 255, 255, 0.6);
    top: 8px;
    left: 12px;
}

.newsletter-form .mdl-textfield__label:after {
    background-color: var(--primary-color);
}

.newsletter-btn {
    height: 40px;
    padding: 0 20px;
    background: var(--primary-color) !important;
    color: white !important;
    text-transform: none;
    font-weight: 600;
    border-radius: 4px;
}

/* Align Top Stories with Sidebar Ad */
.home_container {
    margin-top: -42px;
}

.home_container h2 {
    margin-top: 0;
}

.newsletter-btn:hover {
    background: #f8fafc !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Micro-interactions and Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.stat-card,
.category-card,
.feature-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading state for dynamic content */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Newsletter */
@media (max-width: 768px) {
    .newsletter-content {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .newsletter-form form {
        flex-direction: column;
        width: 100%;
    }

    .newsletter-btn {
        width: 100%;
    }

    .stats-grid,
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}