:root {
    --wheat: #D4A574;
    --dark-wheat: #B8864F;
    --cream: #F5EFE6;
    --dark-cream: #E8DCC8;
    --earth: #8B6F47;
    --deep-earth: #5C4A35;
    --white: #FFFEF9;
    --charcoal: #2D2520;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--charcoal);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Grain texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

/* Header */
header {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--cream) 0%, var(--dark-cream) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.header-decoration {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 165, 116, 0.15) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-30px, 30px) rotate(5deg);
    }
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 300;
    color: var(--deep-earth);
    margin-bottom: 1rem;
    letter-spacing: 2px;
    line-height: 1.2;
}

.logo strong {
    font-weight: 700;
    display: block;
    font-size: clamp(3rem, 10vw, 6.5rem);
    background: linear-gradient(135deg, var(--earth) 0%, var(--dark-wheat) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--earth);
    font-weight: 300;
    margin-bottom: 2rem;
    font-style: italic;
}

.location {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: var(--deep-earth);
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    margin-top: 1rem;
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
    position: relative;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    color: var(--deep-earth);
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--wheat);
    margin: 1rem auto 0;
}

/* About Section */
.about-section {
    background: var(--cream);
    position: relative;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--charcoal);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-image {
    position: relative;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--dark-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: var(--earth);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* Products Section */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.product-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid var(--cream);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(139, 111, 71, 0.15);
}

.product-image {
    height: 280px;
    background: var(--dark-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: var(--earth);
    position: relative;
    overflow: hidden;
}

/* No hover overlay - price is static below image */
.product-content {
    padding: 2rem;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.product-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--deep-earth);
    margin-bottom: 0;
    flex: 1;
    line-height: 1.2;
}

.product-price-static {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--deep-earth); /* was --wheat: contrast ~2.1:1 → now 7.39:1 ✓ */
    white-space: nowrap;
    text-align: right;
    line-height: 1;
}

.product-price-per-kg {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--earth);
    display: block;
    margin-top: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-description {
    color: var(--deep-earth); /* was --earth: 4.12:1 on cream → now 7.39:1 ✓ */
    font-size: 0.95rem;
    line-height: 1.6;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--deep-earth); /* was --wheat + white = 2.13:1 → now 8.37:1 ✓ */
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, var(--deep-earth) 0%, var(--earth) 100%);
    color: var(--white);
}

.contact-section .section-title {
    color: var(--white);
}

.contact-section .section-title::after {
    background: var(--wheat);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    transition: background 0.3s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.contact-icon {
    font-size: 2rem;
    min-width: 50px;
    height: 50px;
    background: var(--wheat);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-details h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--wheat);
}

.contact-details p {
    font-size: 1.1rem;
    line-height: 1.6;
}

.contact-details a {
    color: var(--white);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.contact-details a:hover {
    border-bottom-color: var(--wheat);
}

.contact-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 20px;
    color: var(--charcoal);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--deep-earth);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--cream);
    border-radius: 10px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--wheat);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--earth) 0%, var(--dark-wheat) 100%);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 111, 71, 0.3);
}

/* Footer */
footer {
    background: var(--charcoal);
    color: var(--cream);
    padding: 3rem 0;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.social-link {
    width: 50px;
    height: 50px;
    background: rgba(212, 165, 116, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wheat);
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--wheat);
    color: var(--white);
    transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 768px) {

    .about-content,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        height: 300px;
    }

    section {
        padding: 3rem 0;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Decorative elements */
.wheat-icon {
    display: inline-block;
    font-size: 2rem;
    color: var(--wheat);
}

/* Contact Buttons (Messenger & WhatsApp) */
.contact-btn {
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.messenger-btn:hover {
    background: linear-gradient(135deg, #0066CC 0%, #004C99 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 132, 255, 0.3);
}

.whatsapp-btn:hover {
    background: linear-gradient(135deg, #1DA851 0%, #128C3E 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

@media (max-width: 768px) {
    .contact-btn {
        font-size: 1rem;
        padding: 0.9rem 1.5rem;
    }
}

/* Google Maps links styling */
.location a:hover span {
    border-bottom-color: var(--dark-wheat) !important;
}

.contact-details a {
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--wheat) !important;
}

/* Sticky Navigation */
.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0.5rem 0;
    backdrop-filter: blur(5px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.nav-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--deep-earth);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--earth);
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s;
    font-family: 'Cormorant Garamond', serif;
}

.nav-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--earth) !important;
    transition: color 0.3s;
}

.nav-social:hover {
    color: #1877F2 !important;
}

.nav-links a:hover {
    color: var(--dark-wheat);
}

/* Adjust header padding so content doesn't jump behind nav */
header {
    padding-top: 60px;
}

/* Mobile Nav Adjustments */
@media (max-width: 768px) {

    /* Prevent content jumping */
    body {
        overflow-x: hidden;
    }

    /* Burger Menu */
    .burger-menu {
        display: block;
        cursor: pointer;
        z-index: 1002;
    }

    .burger-menu div {
        width: 25px;
        height: 3px;
        background-color: var(--deep-earth);
        margin: 5px;
        transition: all 0.3s ease;
    }

    /* Nav Links container - slide in */
    .nav-links {
        position: fixed;
        right: 0px;
        height: 100vh;
        /* Fallback */
        height: 100dvh;
        /* Dynamic viewport for mobile */
        top: 0;
        background-color: var(--cream);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 70%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        gap: 2rem;
    }

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .nav-links a {
        font-size: 1.5rem;
        opacity: 0;
        /* Animated via JS/CSS if desired, or simplified here */
        animation: navLinkFade 0.5s ease forwards 0.3s;
    }

    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }

        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    /* Burger Animation */
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .toggle .line2 {
        opacity: 0;
    }

    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    /* Header & Hero adjustments */
    header {
        padding-top: 60px;
        min-height: 80vh;
        /* Reduce height on mobile */
    }

    .logo {
        font-size: 3rem;
    }

    .logo strong {
        /* Fix for "Rzemieślniczy" being cut off */
        font-size: clamp(2.2rem, 9vw, 6.5rem);
        word-break: keep-all;
        /* Try to keep word together but shrink */
    }

    /* Contact Section Fixes */
    .contact-grid {
        grid-template-columns: 100%;
        /* Explicitly 100% */
        gap: 2rem;
        width: 100%;
        /* Ensure grid doesn't overflow */
    }

    /* Ensure container has padding */
    .container {
        padding: 0 1.5rem;
    }

    .contact-item {
        padding: 1.2rem;
        width: 100%;
        /* Constrain width */
        max-width: 100%;
        box-sizing: border-box;
        /* Redundant but safe */
    }

    .contact-details {
        word-break: break-word;
        /* Prevent long emails/text from stretching container */
        min-width: 0;
        /* Flexbox overflow fix */
    }

    /* Adjust contact social buttons */
    .contact-form {
        padding: 1.5rem;
    }
}

/* Desktop-only styles to hide burger menu */
@media (min-width: 769px) {
    .burger-menu {
        display: none;
    }
}

/* GDPR Consent */
.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--earth);
    cursor: pointer;
    line-height: 1.4;
}

.consent-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--deep-earth);
    margin-top: 2px;
}

.consent-label span {
    flex: 1;
}

.consent-label a {
    color: var(--deep-earth);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s;
}

.consent-label a:hover {
    color: var(--wheat);
}

/* Modal Product Badges */
/* Modal Product Label (Subtle) */
.product-type-label {
    font-size: 0.8rem;
    color: #888;
    font-weight: 400;
    margin-left: 6px;
    letter-spacing: 0.5px;
}

/* Progress Circular Indicators */
.progress-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 12px;
    /* Adjusted gap */
    margin: 1rem 0;
    padding: 10px;
    background: var(--cream);
    border-radius: 10px;
}

.progress-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 65px;
    /* Adjusted width */
}

.progress-circle {
    position: relative;
    width: 40px;
    /* Increased to 40px */
    height: 40px;
    border-radius: 50%;
    /* Create a ring chart */
    background: radial-gradient(closest-side, var(--white) 65%, transparent 66% 100%),
        conic-gradient(var(--wheat) calc(var(--percent) * 1%), #e0e0e0 0);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.progress-circle span {
    font-size: 0.7rem;
    /* Slightly larger font */
    font-weight: bold;
    color: var(--deep-earth);
    z-index: 1;
}

.progress-label {
    font-size: 0.65rem;
    color: var(--deep-earth); /* was --earth: contrast 3.81 → now 7.39:1 ✓ */
    line-height: 1.1;
    font-weight: 600;
}

/* -------------------------------------------------------
   Content visibility — skip rendering below-fold sections
   until they enter the viewport. Eliminates forced reflow
   from complex CSS (conic-gradient, etc.) on page load.
------------------------------------------------------- */
#about,
#products,
#order,
#contact,
.seo-section {
    content-visibility: auto;
    contain-intrinsic-size: 0 600px; /* estimated height — prevents layout shift */
}

/* -------------------------------------------------------
   iOS 18 fix — eliminates 300ms tap delay and double-tap
   zoom interference on interactive elements
------------------------------------------------------- */
button,
a,
[onclick],
.product-card,
.contact-btn,
.qty-btn,
.bread-order-btn,
.social-link {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
