/* ==========================================
   MAIN CSS BY PCPARTDEALS.EU
========================================== */

:root {
    --yellow: #f5c518;
    --yellow-dark: #dba700;
    --yellow-light: #fff4c8;

    --bg: #ececec;
    --card: #f7f7f7;

    --white: #ffffff;

    --text: #111111;
    --muted: #666666;

    --border: #dddddd;

    --shadow:
        0 10px 30px rgba(0, 0, 0, .08);

    --radius: 24px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

img {
    max-width: 100%;
}

.container {
    width: min(1200px, calc(100% - 40px));
    margin: auto;
}

/* ==========================================
   HEADER
========================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 999;

    background: rgba(255, 255, 255, .95);

    backdrop-filter: blur(14px);

    border-bottom: 1px solid var(--border);
}

.nav-container {
    height: 85px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
}

.logo span {
    color: var(--yellow-dark);
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav a {
    color: #444;
    font-weight: 600;
    transition: .25s;
}

.nav a:hover {
    color: var(--yellow-dark);
}

.nav a[aria-current="page"] {
    color: #111;
    text-decoration: underline;
    text-decoration-color: var(--yellow-dark);
    text-decoration-thickness: 3px;
    text-underline-offset: 8px;
}

.desktop-buttons {
    display: flex;
    gap: 12px;
}

/* ==========================================
   NUPUD
========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 14px 22px;

    border-radius: 14px;

    font-weight: 700;

    transition: .25s;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary {
    background: var(--yellow);
    color: #111;
}

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

.btn-secondary {
    background: white;
    border: 1px solid var(--border);
}

.btn-dark {
    background: #111;
    color: white;
}

/* ==========================================
   HERO
========================================== */

.hero {
    padding: 90px 0;

    background:
        linear-gradient(180deg,
            #fff9df,
            #f0f0f0);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-block;

    background: var(--yellow-light);

    color: #111;

    padding: 10px 18px;

    border-radius: 999px;

    font-weight: 700;

    margin-bottom: 24px;
}

.hero-content h1 {
    font-size: clamp(3rem, 5vw, 5rem);

    line-height: 1;

    letter-spacing: -3px;

    margin-bottom: 20px;
}

.hero-content h1 span {
    color: var(--yellow-dark);
}

.hero-content p {
    color: var(--muted);
    line-height: 1.8;
    max-width: 650px;
}

/* OTSING */

.hero-search {
    margin-top: 30px;

    background: white;

    border-radius: 18px;

    box-shadow: var(--shadow);

    display: flex;

    overflow: hidden;
}

.hero-search input {
    flex: 1;

    border: none;
    outline: none;

    padding: 18px;

    background: white;
}

.hero-search button {
    background: var(--yellow);

    padding: 18px 24px;

    font-weight: 700;
}

/* NUPUD */

.hero-buttons {
    display: flex;
    gap: 14px;

    margin-top: 24px;
}

/* STATISTIKA */

.stats {
    display: flex;
    gap: 18px;

    margin-top: 40px;
}

.stat-card {
    flex: 1;

    background: white;

    padding: 24px;

    border-radius: 20px;

    box-shadow: var(--shadow);

    transition: .3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 1.7rem;
    color: var(--yellow-dark);
}

.stat-card p {
    margin-top: 6px;
    color: var(--muted);
}

/* ==========================================
   HERO (VISUAALNE)
========================================== */

.hero-visual {
    position: relative;
}

.hero-card {
    background: #fff8df;

    border: 2px solid #f7e4a4;

    border-radius: 32px;

    padding: 50px;

    min-height: 430px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    box-shadow: var(--shadow);
}

.hero-circle {
    width: 120px;
    height: 120px;

    border-radius: 50%;

    background:
        linear-gradient(135deg,
            var(--yellow),
            #ffd95c);

    margin-bottom: 25px;
}

.product-preview {
    position: absolute;

    background: white;

    padding: 18px;

    border-radius: 18px;

    box-shadow: var(--shadow);

    animation: float 5s ease-in-out infinite;
}

.product-preview h4 {
    margin-top: 10px;
}

.product-preview span {
    color: var(--yellow-dark);
    font-weight: 700;
}

.product-1 {
    top: -20px;
    right: -10px;
}

.product-2 {
    bottom: -20px;
    left: -10px;
}

.product-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-icon img,
.trust-icon img,
.repair-icon img,
.category-card img {
    width: 28px;
    height: 28px;
    display: block;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ==========================================
   SEKTSIOONID
========================================== */

.featured,
.trust,
.categories,
.cta {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 10px;
}

.section-header p {
    color: var(--muted);
}

/* ==========================================
   ESILETÕSTETUD TOOTED
========================================== */

.featured {
    background: #e4e4e4;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.product-card {
    background: white;

    padding: 22px;

    border-radius: 24px;

    box-shadow: var(--shadow);

    transition: .3s;
}

.product-card h3 {
    font-size: 1.1rem;
    line-height: 1.35;
    min-height: 3em;
    margin-top: 16px;
}

.product-card:hover {
    transform: translateY(-8px);
}

.featured-cart-btn {
    width: 100%;
    min-height: 44px;
    margin-top: 14px;
}

.product-image {
    width: 100%;
    height: 180px;

    border-radius: 20px;

    background: var(--yellow-light);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 2rem;

    margin-bottom: 0;
    overflow: hidden;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    color: var(--muted);
    font-size: .9rem;
}

.product-meta span {
    background: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: 999px;
    padding: 6px 10px;
}

.price {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;

    margin-top: 16px;

    color: var(--yellow-dark);

    font-size: 1.5rem;

    font-weight: 800;
}

.sale-price {
    color: #c3272b;
    font-weight: 800;
}

.original-price {
    color: var(--muted);
    font-size: .95rem;
    text-decoration: line-through;
}

.campaign-badge {
    display: grid;
    gap: 4px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff4c8;
    color: #3b2b00;
    font-size: .86rem;
}

.campaign-badge span {
    color: #6b5a22;
}

.new-product-price-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: fit-content;
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #f3f4f6;
    color: #333;
    font-size: .84rem;
    font-weight: 700;
}

.new-product-price-badge span {
    color: var(--muted);
    font-weight: 650;
}

.new-product-price-badge del {
    color: #777;
}

.new-product-price-badge strong {
    color: #c3272b;
}

.campaign-banner-stack {
    width: min(1200px, calc(100% - 40px));
    margin: 18px auto 0;
    display: grid;
    overflow: hidden;
    border-radius: 14px;
}

.campaign-banner-stack.hidden {
    display: none;
}

.campaign-banner {
    grid-area: 1 / 1;
    min-width: 0;
    height: clamp(96px, 10vw, 128px);
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 18px 22px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--campaign-banner-background, #111);
    color: var(--campaign-banner-text, white);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-102%);
    transition: transform .6s ease, opacity .35s ease, visibility .6s;
}

.campaign-banner span {
    color: inherit;
    opacity: .82;
}

.campaign-banner.is-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.campaign-banner.is-exiting {
    z-index: 1;
    visibility: visible;
    transform: translateX(102%);
}

.campaign-banner-image {
    padding: 0;
    overflow: hidden;
    background: transparent;
}

.campaign-banner-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-actions {
    display: flex;
    justify-content: center;
    margin-top: 34px;
}

/* ==========================================
   USALDUS (Ei oska muud moodi seda sõnastada)
========================================== */

.trust {
    background: #fff8df;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.trust-card {
    background: white;

    padding: 30px;

    border-radius: 24px;

    box-shadow: var(--shadow);
}

.trust-icon {
    width: 65px;
    height: 65px;

    border-radius: 18px;

    background: var(--yellow);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1.4rem;

    margin-bottom: 20px;
}

/* ==========================================
   KATEGOORIAD
========================================== */

.categories {
    background: #e7e7e7;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.category-card {
    background: white;

    padding: 40px;

    text-align: center;

    border-radius: 22px;

    font-size: 1.1rem;
    font-weight: 700;

    box-shadow: var(--shadow);

    transition: .3s;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.category-card:hover {
    background: var(--yellow);

    transform: translateY(-5px);
}

/* ==========================================
   CTA (Toob tavaliselt minu lehel rohkem kliente - RS)
========================================== */

.cta {
    background: #ececec;
}

.cta-box {
    background:
        linear-gradient(135deg,
            #ffd84f,
            #ffec9f);

    border-radius: 30px;

    padding: 50px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    box-shadow: var(--shadow);
}

.cta-box h2 {
    margin-bottom: 10px;
}

/* ==========================================
   FOOTER
========================================== */

.footer {
    background: #111;

    color: white;

    padding: 60px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(220px, .9fr) minmax(220px, .9fr);
    gap: 28px;
    align-items: start;
}

.footer-logo {
    font-size: 1.7rem;
    font-weight: 800;
}

.footer-logo span {
    color: var(--yellow);
}

.footer p {
    color: #bbb;
    margin-top: 10px;
    line-height: 1.6;
}

.footer-contact,
.footer-links {
    display: grid;
    gap: 10px;
}

.footer-contact h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.footer-contact a,
.footer-contact span {
    color: #ddd;
    line-height: 1.5;
}

.footer-links {
    justify-items: start;
}

.footer-links a {
    color: #ddd;
}

.contact-page {
    background: var(--bg);
}

.contact-hero {
    padding: 90px 0 56px;
    background:
        linear-gradient(180deg,
            #fff8de,
            #ececec);
}

.contact-eyebrow {
    display: inline-block;
    margin-bottom: 18px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--yellow-light);
    font-size: .88rem;
    font-weight: 700;
}

.contact-hero h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
    margin-bottom: 12px;
}

.contact-hero p {
    max-width: 680px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 1.05rem;
}

.contact-section {
    padding: 45px 0 90px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.contact-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow);
}

.contact-card-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.contact-card-heading h2 {
    font-size: 1.35rem;
}

.contact-card-number {
    display: inline-flex;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--yellow);
    color: #111;
    font-size: .82rem;
    font-weight: 800;
}

.contact-list {
    display: grid;
    gap: 0;
}

.contact-list > div {
    padding: 15px 0;
    border-top: 1px solid var(--border);
}

.contact-list a,
.contact-list span {
    color: #222;
    line-height: 1.5;
}

.contact-list a {
    font-weight: 600;
}

.contact-list a:hover {
    color: var(--yellow-dark);
}

.contact-label {
    display: block;
    color: var(--muted);
    font-size: .85rem;
    font-weight: 700;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.contact-map {
    grid-column: 1 / -1;
}

.location-section {
    padding: 90px 0;
    background: #e4e4e4;
}

.location-grid {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: 32px;
    align-items: center;
}

.location-content {
    padding: 12px 0;
}

.location-content h2 {
    margin-bottom: 14px;
    font-size: clamp(2rem, 4vw, 3rem);
}

.location-content p {
    max-width: 520px;
    margin-bottom: 24px;
    color: var(--muted);
    line-height: 1.7;
}

.map-frame {
    min-height: 380px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: white;
    box-shadow: var(--shadow);
}

.map-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 380px;
    border: 0;
}

/* ==========================================
   HAMBURGER (Menüü) (Väga nämma!)
========================================== */

.hamburger {
    display: none;

    width: 50px;
    height: 50px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 14px;
}

.hamburger span {
    display: block;

    width: 22px;
    height: 2px;

    background: #111;

    margin: 5px auto;

    transition: .3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-buttons {
    display: none;
}

/* ==========================================
   MOBIILILE KOHANDATUD (Muidu on väga paha paha)
========================================== */

@media (max-width: 980px) {

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .product-grid,
    .trust-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .desktop-buttons {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .nav {
        position: absolute;

        top: calc(100% + 1px);
        left: 0;
        right: 0;

        width: auto;

        background: white;

        flex-direction: column;
        align-items: stretch;

        padding: 25px;

        gap: 20px;

        border-bottom: 1px solid var(--border);
        box-shadow: 0 18px 36px rgba(0, 0, 0, .12);
        z-index: 1001;

        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);

        transition: .3s;
    }

    .nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .mobile-buttons {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .mobile-buttons .btn {
        width: 100%;
    }

    .mobile-nav-open {
        overflow: hidden;
    }

    .hero-search {
        flex-direction: column;
    }

    .hero-search button {
        width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .stats {
        flex-direction: column;
    }

    .product-1,
    .product-2 {
        position: static;
        margin-bottom: 15px;
    }

    .hero-card {
        min-height: auto;
    }

    .cta-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-links {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .nav a[aria-current="page"] {
        text-underline-offset: 5px;
    }
}

@media (max-width: 600px) {
    .contact-hero {
        padding: 58px 0 36px;
    }

    .contact-section {
        padding: 28px 0 60px;
    }

    .contact-card {
        padding: 22px;
        border-radius: 20px;
    }

    .contact-list a,
    .contact-list span {
        overflow-wrap: anywhere;
    }
}

/* FIRESTORE'i kaudu esiletõstetud tooted (Lihtne süsteem kuid tähtis, et saaks tooteid näidata mida klient tahab või ei taha aga ikka ostab) */

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}

.product-card a {
    display: block;
    color: inherit;
}

.skeleton {
    height: 260px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;

    background:
        linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, .5),
            transparent);

    animation: skeleton 1.2s infinite;
}

@keyframes skeleton {

    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(100%);
    }

}

/* ==========================================
   Parandustööde sektsioon (Komisjonka parandus on lege)
========================================== */

.repairs {
    padding: 100px 0;
    background: #f6f0d4;
}

.repairs-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 50px;
    align-items: center;
}

.repairs-content {
    background: white;
    padding: 50px;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.repairs-badge {
    display: inline-block;
    background: var(--yellow-light);
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 700;
    margin-bottom: 20px;
}

.repairs-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 18px;
}

.repairs-content p {
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 30px;
}

.repair-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.repair-item {
    background: #f7f7f7;
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 14px;
    font-weight: 600;
}

.repairs-visual {
    display: flex;
    justify-content: center;
}

.repair-card {
    width: 100%;
    max-width: 420px;

    background: linear-gradient(135deg,
            #ffd84f,
            #fff0b2);

    padding: 50px;
    border-radius: 30px;

    box-shadow: var(--shadow);

    text-align: center;
}

.repair-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.repair-icon img {
    width: 64px;
    height: 64px;
}

.repair-card h3 {
    margin-bottom: 15px;
}

.repair-card p {
    color: #444;
    line-height: 1.7;
}

.social-feed,
.latest-blog {
    padding: 80px 0;
    background: white;
}

.latest-blog {
    background: var(--bg);
}

.facebook-frame {
    display: flex;
    justify-content: center;
}

.facebook-frame iframe {
    display: block;
    width: min(500px, 100%);
    border: 0;
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow);
}

.blog-preview-grid,
.blog-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
}

.blog-preview-card,
.blog-list-card,
.blog-article {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.blog-preview-card h3,
.blog-list-card h2 {
    margin-bottom: 10px;
}

.blog-preview-card p,
.blog-list-card p {
    color: var(--muted);
    line-height: 1.6;
}

.text-link {
    display: inline-block;
    margin-top: 14px;
    font-weight: 700;
    color: var(--yellow-dark);
}

.blog-page {
    background: var(--bg);
    min-height: 100vh;
}

.blog-hero {
    padding: 70px 0 30px;
}

.blog-hero h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
}

.blog-list-section {
    padding: 30px 0 90px;
}

.blog-meta {
    color: var(--muted);
    font-size: .9rem;
    margin-bottom: 16px;
}

.markdown-body {
    display: grid;
    gap: 14px;
    line-height: 1.75;
}

.markdown-body ul {
    padding-left: 22px;
}

/* Mobiilikraam jälle, ei tea kas eelmine on vajalik) */

@media (max-width:980px) {

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

    .repairs-content {
        padding: 30px;
    }

    .repair-features {
        grid-template-columns: 1fr;
    }
}
