/* ===========================
   GLOBAL
=========================== */

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

:root {
    --brand-700: #0f6a39;
    --brand-600: #148a4b;
    --brand-500: #1fa45d;
    --brand-100: #dff7e8;
    --text-main: #1f2d25;
}

body {
    background: #f3fbf6;
    color: var(--text-main);
    line-height: 1.6;
    font-family: Arial, Helvetica, sans-serif;
}

/* ===========================
   NAVBAR
=========================== */

header {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.072);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    max-width: 1200px;
    margin: auto;
    padding: 13.5px 30px;

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

/* CENTERED LOGO */
.logo {
    flex-shrink: 0;
    order: 0;
    margin: 0 auto;
}

.logo a {
    text-decoration: none;
}

.logo-safe-mark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.safe-icon {
    width: 44px;
    height: 44px;
    border: 3px solid var(--brand-600);
    border-radius: 10px;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, var(--brand-100) 100%);
}

.safe-icon::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid var(--brand-700);
    border-radius: 50%;
    position: absolute;
    top: 12px;
    left: 12px;
}

.safe-icon::after {
    content: "";
    width: 6px;
    height: 2px;
    background: var(--brand-700);
    position: absolute;
    top: 18px;
    left: 26px;
}

.safe-text {
    color: var(--brand-700);
    font-size: 30px;
    line-height: 1;
    letter-spacing: 1.5px;
    font-weight: 800;
}

/* ===========================
   MENU LINKS
=========================== */

.menu {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
}

.left-menu {
    order: -1;
}

.right-menu {
    order: 1;
    margin-right: auto;
}

.menu li a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 24px;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
}

/* HOVER BRONZE */
.menu li a:hover {
    background: var(--brand-600);
    color: white !important;
}

/* ===========================
   RIGHT ICONS
=========================== */

.nav-icons {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    order: 2;
}


.cart-icon,
.user-icon {
    font-size: 28px;
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
    position: relative;
}

.cart-icon:hover,
.user-icon:hover {
    transform: scale(1.1);
}

/* Cart badge overlay */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--brand-600);
    color: #fff;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    border: 2px solid #fff;
    z-index: 2;
    pointer-events: none;
}

/* ===========================
   LANGUAGE DROPDOWN
=========================== */

.language-selector {
    position: relative;
    display: flex;
    align-items: center;
}

#langBtn {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    padding: 5px;
}

#langMenu {
    position: absolute;
    top: 40px;
    right: 0;
    background: white;
    padding: 8px 0;
    list-style: none;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    width: 180px;
    z-index: 2000;
}

#langMenu li {
    padding: 10px 15px;
    cursor: pointer;
    transition: 0.15s;
    white-space: nowrap;
}

#langMenu li:hover {
    background: #f2f2f2;
}

.hidden {
    display: none;
}

/* ===========================
   HAMBURGER
=========================== */

.hamburger {
    display: none;
}

/* ===========================
   MOBILE MENU
=========================== */

@media (max-width: 900px) {

    .hamburger {
        display: block;
        position: absolute;
        left: 20px;
        top: 25px;
        font-size: 32px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 2001;
    }

    /* ukrywamy obie listy */
    .left-menu,
    .right-menu {
        display: none !important;
    }

    /* po otwarciu menu – POKAZUJEMY OBA */
    body.menu-open .left-menu,
    body.menu-open .right-menu {
        display: flex !important;
        flex-direction: column;
        width: 100%;
        text-align: left;
        position: static;
    }

    /* wygląd pozycji w mobile */
    body.menu-open .left-menu li a,
    body.menu-open .right-menu li a {
        font-size: 22px;
        padding: 14px 20px;
        border-bottom: 1px solid #eee;
        display: block;
        width: 100%;
    }

    /* panel rozwijany - WSPÓLNY kontener dla obu menu */
    body.menu-open .navbar {
        flex-wrap: wrap;
    }

    body.menu-open .left-menu {
        order: 10;
        background: white;
        width: 100%;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    body.menu-open .right-menu {
        order: 11;
        background: white;
        width: 100%;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    /* ikony przeniesione */
    .nav-icons {
        position: absolute;
        right: 20px;
        top: 20px;
    }

    /* logo mobilne */
    .logo-safe-mark {
        gap: 8px;
    }

    .safe-icon {
        width: 34px;
        height: 34px;
    }

    .safe-icon::before {
        width: 10px;
        height: 10px;
        top: 9px;
        left: 9px;
    }

    .safe-icon::after {
        top: 14px;
        left: 20px;
    }

    .safe-text {
        font-size: 22px;
    }
}

/* OSTATECZNE WYŁĄCZENIE HAMBURGERA NA DESKTOPIE */
@media (min-width: 901px) {
    .hamburger {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute;
        left: -9999px;
    }
}


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

.hero {
    background: url("../img/market-chart.svg") center/cover no-repeat;
    color: white;
    text-align: center;
    /* 20% smaller than original: padding reduced */
    padding: 104px 16px;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.hero h1, .hero p, .hero a {
    position: relative;
}


.hero h1 {
    /* ~20% smaller */
    font-size: 38px;
    margin-bottom: 8px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 20px;
}

.hero-btn {
    padding: 10px 20px;
    background: var(--brand-600);
    color: white;
    font-size: 14px;
    text-decoration: none;
    border-radius: 6px;
    transition: 0.2s;
}

.hero-btn:hover {
    background: var(--brand-700);
}

/* ===========================
   DELIVERY OPTIONS
=========================== */

.delivery-options {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    text-align: center;
}

.delivery-options h2 {
    font-size: 32px;
    margin-bottom: 40px;
}

.options {
    display: flex;
    justify-content: center; /* center cards and allow max-width to control size */
    gap: 25px;
    flex-wrap: wrap;
}

.options article {
    background: white;
    padding: 15px;
    border-radius: 10px;
    /* use flexible sizing with an explicit max so cards don't grow too large on wide desktop screens */
    flex: 1 1 320px; /* grow/shrink, base width 320px */
    max-width: 360px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: 0.3s;
}

.options article:hover {
    transform: translateY(-5px);
}

/* Make delivery option images a sensible, consistent size */
.options article img {
    width: 100%;
    max-width: 100%;
    height: 180px; /* fixed visual height for consistency */
    max-height: 320px; /* safety cap */
    object-fit: cover; /* crop to fill without distortion */
    display: block;
    border-radius: 8px;
    margin-bottom: 12px;
}

/* Stronger selector to avoid accidental overrides */
section.delivery-options .options article img {
    width: 100%;
    max-width: 100%;
    height: 180px;
    object-fit: cover;
}

@media (max-width: 900px) {
    .options article img {
        height: 200px; /* slightly taller on narrow screens */
    }
}

@media (max-width: 480px) {
    .options article {
        width: 100%;
        min-width: auto;
    }

    .options {
        gap: 18px;
    }

    .options article img {
        height: 220px; /* larger touch targets on very small screens */
    }
}

/* ===========================
   LOCATIONS
=========================== */

.locations {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.locations h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 30px;
}

.loc-grid {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    flex-wrap: wrap;
}

.loc-card {
    width: 32%;
    min-width: 280px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

.loc-card p {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    order: -1; /* move text above image */
}

.loc-card img {
    width: 100%;
    height: 200px; /* fixed height for consistent sizing */
    object-fit: cover; /* crop to fill without distortion */
    display: block;
}

/* Desktop: force single row and cap card width so three cards fit on one line */
@media (min-width: 901px) {
    .loc-grid {
        flex-wrap: nowrap; /* keep cards on a single row */
        justify-content: center; /* center them and rely on max-width */
    }

    .loc-card {
        /* allow cards to shrink to fit, but cap their width */
        flex: 1 1 320px;
        max-width: 360px;
        width: auto; /* override percentage width */
        min-width: 0; /* allow shrinking below previous min */
    }
}

/* Gift form styles */
.gift-form-section {
    max-width: 760px;
    margin: 40px auto;
    padding: 0 20px 40px;
}

.gift-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    background: white;
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.gift-form label { font-weight: 600; }
.gift-form input[type="text"] {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.gift-result { margin-top: 14px; font-size: 15px; }

@media (max-width: 480px) {
    .gift-form-section { padding: 0 12px 30px; }
}

/* ===========================
   SHOP / WINKEL PAGE
=========================== */

main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

main h1 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 30px;
    color: #333;
}

.cart {
    position: fixed;
    top: 120px;
    right: 30px;
    background: white;
    padding: 12px 18px;
    border-radius: 50px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.12);
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 999;
    transition: 0.2s;
}

.cart:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

#cart-count {
    background: var(--brand-600);
    color: white;
    padding: 4px 10px;
    border-radius: 50%;
    font-weight: bold;
    min-width: 24px;
    text-align: center;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.product-card h3 {
    font-size: 20px;
    margin: 16px 16px 8px;
    color: #333;
    font-weight: 600;
}

.product-card .product-desc {
    font-size: 14px;
    color: #666;
    margin: 0 16px 12px;
    line-height: 1.5;
    flex-grow: 1;
}

.product-card .product-price {
    font-size: 22px;
    font-weight: bold;
    color: var(--brand-700);
    margin: 0 16px 16px;
}

.product-card button {
    background: var(--brand-600);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    border-radius: 0;
    margin-top: auto;
}

.product-card button:hover {
    background: var(--brand-700);
}

.product-card button:active {
    transform: scale(0.98);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }

    .product-card img {
        height: 240px;
    }

    .cart {
        top: 90px;
        right: 15px;
        padding: 10px 14px;
        font-size: 18px;
    }
}

@media (max-width: 600px) {
    main {
        padding: 0 15px;
        margin: 20px auto;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 20px;
    }

    .product-card img {
        height: 260px;
    }

    main h1 {
        font-size: 28px;
        margin-bottom: 20px;
        margin-top: 20px;
    }

    .cart {
        position: fixed;
        bottom: 20px;
        top: auto;
        right: 20px;
    }
}
