/*!
Theme Name: Basta Modern
Theme URI: https://example.com
Description: A modern WordPress theme for product comparisons with Kelkoo API integration
Author: Your Name
Version: 1.0
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

/* Fix image opacity issues */
img {
    opacity: 1 !important;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    min-height: 70px;
}

.site-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.6rem;
    font-weight: 400;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: none;
    position: relative;
    transition: all 0.3s ease;
    max-height: 80px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
}

.site-title:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: scale(1.05);
}

.site-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #1e40af, #3b82f6, #06b6d4);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.site-title:hover::after {
    transform: scaleX(1);
}

.mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #1e40af;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle:hover {
    background: rgba(30, 64, 175, 0.1);
    transform: scale(1.05);
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: #64748b;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    position: relative;
    font-size: 0.95rem;
}

.main-nav a:hover {
    color: #1e40af;
    background: rgba(30, 64, 175, 0.08);
}

/* Hero Section - Minimalist */
.hero-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #1e293b;
    padding: 1.5rem 0;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: #1e293b;
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.8;
    max-width: 400px;
    margin: 0 auto 1rem;
    color: #64748b;
}

.hero-cta {
    display: inline-block;
    background: #1e40af;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.3s ease;
}

.hero-cta:hover {
    background: #1e3a8a;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 400px);
}

.home .main-content {
    padding: 2rem 0;
}

.home .hero-section {
    padding: 5rem 0;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


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

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Product Grid - Single Column Layout */
.products-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
    overflow: visible;
}

/* Article Feed Grid for Homepage */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.product-card {
    position: relative;
    background: white;
    border-radius: 16px;
    overflow: visible;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.best-product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
    white-space: nowrap;
    max-width: none;
}

.product-ranking {
    position: absolute;
    top: -15px;
    left: -15px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 1.2rem;
    z-index: 20;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
    border: 3px solid white;
}

.product-image {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.product-image img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    opacity: 1 !important;
    display: block;
    transition: opacity 0.3s ease;
    margin: 0 auto;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.product-description {
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #059669;
    margin-bottom: 1rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.rating-stars {
    color: #fbbf24;
    font-size: 1.1rem;
}

.rating-text {
    color: #64748b;
    font-weight: 600;
}

.product-features {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.product-features h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.features-list {
    list-style: none;
}

.features-list li {
    padding: 0.25rem 0;
    position: relative;
    padding-left: 1.5rem;
    color: #475569;
}

.features-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #059669;
    font-weight: bold;
}

/* Product Features Table */
.features-table-container {
    overflow-x: auto;
    margin: 1rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.features-table {
    width: 100%;
    border-collapse: collapse;
    background: #f8fafc;
    font-size: 0.9rem;
}

.features-table tbody tr:last-child {
    border-bottom: none;
}

.features-table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.5);
}

.features-table tbody tr:hover {
    background: rgba(30, 64, 175, 0.05);
}

.features-table td {
    padding: 0.75rem 1rem;
    vertical-align: top;
    border-bottom: 1px solid #e2e8f0;
}

.features-table td:first-child {
    font-weight: 600;
    color: #475569;
    background: #fafafa;
    width: 40%;
    min-width: 120px;
}

.features-table td:last-child {
    color: #1e293b;
    background: white;
}

.product-cta {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    text-align: center;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.product-cta:hover {
    background: linear-gradient(135deg, #047857, #065f46);
    transform: translateY(-2px);
}

.store-link {
    display: block;
    text-align: center;
    color: #1e40af;
    text-decoration: none;
    margin-top: 0.75rem;
    font-weight: 600;
}

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

/* Page Header - Minimalist */
.page-header {
    background: white;
    color: #1e293b;
    padding: 1.5rem 0;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: #1e293b;
}

.page-subtitle {
    font-size: 0.9rem;
    opacity: 0.7;
    color: #64748b;
    font-weight: 500;
}

/* Breadcrumbs */
.breadcrumbs {
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.breadcrumb-list li::after {
    content: ">";
    margin-left: 0.5rem;
    color: #94a3b8;
}

.breadcrumb-list li:last-child::after {
    display: none;
}

.breadcrumb-list a {
    color: #1e40af;
    text-decoration: none;
}

.breadcrumb-list a:hover {
    text-decoration: underline;
}

/* FAQ Section */
.faq-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.faq-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 2rem;
    text-align: center;
}

.faq-item {
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.faq-question {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.faq-answer {
    color: #475569;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Footer */
.site-footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
}

.footer-text {
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    margin-bottom: 2rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    font-size: 0.9rem;
}

/* Dropdown Navigation */
.main-nav .menu-item-has-children {
    position: relative;
}

.main-nav .menu-item-has-children > a::after {
    content: "▾";
    margin-left: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.main-nav .menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

.main-nav .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    list-style: none;
    display: flex;
    flex-direction: column;
}

.main-nav .menu-item-has-children:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav .sub-menu li {
    margin: 0;
    width: 100%;
}

.main-nav .sub-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #64748b;
    border-radius: 0;
    background: transparent;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}

.main-nav .sub-menu a:hover {
    background: rgba(30, 64, 175, 0.1);
    color: #1e40af;
}

/* Mobile fullwidth products and sections */
@media (max-width: 767px) {
    body {
        overflow-x: hidden !important;
    }

    .mobile-fullwidth {
        margin-left: -15px !important;
        margin-right: -15px !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
        background: white !important;
        width: calc(100vw) !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }

    .mobile-fullwidth:last-child {
        border-bottom: none !important;
    }

    .products-grid {
        margin-left: -15px !important;
        margin-right: -15px !important;
        width: calc(100vw) !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }

    .faq-section.mobile-fullwidth {
        margin-left: -15px !important;
        margin-right: -15px !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin-top: 2rem !important;
        width: calc(100vw) !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }

    .faq-item {
        border-radius: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-bottom: 1px solid #e2e8f0 !important;
        box-shadow: none !important;
    }

    .faq-item:last-child {
        border-bottom: none !important;
    }

    .product-card.mobile-fullwidth {
        position: relative !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .product-card.mobile-fullwidth .product-ranking {
        position: absolute !important;
        top: 15px !important;
        left: 30px !important;
        z-index: 10 !important;
        background: linear-gradient(135deg, #1e40af, #3b82f6) !important;
        color: white !important;
        width: 30px !important;
        height: 30px !important;
        border-radius: 6px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3) !important;
    }

    .product-card.mobile-fullwidth .product-image {
        position: relative !important;
        margin-top: 0 !important;
    }

    .product-card.mobile-fullwidth .best-product-badge {
        position: absolute !important;
        top: 15px !important;
        right: 15px !important;
        padding: 0.4rem 0.8rem !important;
        font-size: 0.8rem !important;
        border-radius: 16px !important;
        white-space: nowrap !important;
        max-width: none !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .mobile-menu-toggle {
        display: flex !important;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        display: none;
        padding: 0;
        margin: 0;
        border-radius: 0 0 12px 12px;
        overflow: hidden;
    }

    .main-nav.active {
        display: block;
        animation: slideDown 0.3s ease;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0;
        margin: 0;
    }

    .main-nav li {
        border-bottom: 1px solid #f1f5f9;
    }

    .main-nav li:last-child {
        border-bottom: none;
    }

    .main-nav a {
        display: block;
        padding: 1rem 1.5rem;
        margin: 0;
        font-size: 1rem;
        transition: all 0.2s ease;
    }

    .main-nav a:hover {
        background: #f8fafc;
        color: #1e40af;
        padding-left: 2rem;
    }

    .main-nav .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8fafc;
        border-radius: 0;
        margin: 0;
        padding: 0;
        width: 100%;
        border-top: 1px solid #e2e8f0;
    }

    .main-nav .sub-menu a {
        padding: 0.75rem 2.5rem;
        font-size: 0.9rem;
        color: #64748b;
        background: #f8fafc;
    }

    .main-nav .sub-menu a:hover {
        background: #e2e8f0;
        padding-left: 3rem;
    }

    .main-nav .menu-item-has-children > a::after {
        display: none;
    }

    .header-content {
        position: relative;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .product-ranking {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }

    .container,
    .container-narrow {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

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

    .product-card {
        margin: 0 10px;
    }

    .product-ranking {
        top: -5px;
        left: -5px;
    }
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 3rem 0;
}

.loading::after {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1e40af;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

/* Mobile menu animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}