@import url('https://fonts.googleapis.com/css?family=Merriweather:400,700&display=swap');

html, body {
    margin: 0;
    padding: 0;
    font-family: "Merriweather", "Georgia", serif;
    background: #f7f5f2;
    color: #56473b;
}
*, *:before, *:after { box-sizing: border-box; }

main, .offers-grid, .cart-table, .order-form, footer {
    width: 90vw;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

a { color: #8a6c49; text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2 {
    font-family: "Merriweather", "Georgia", serif;
    font-weight: 700;
    color: #56473b;
    letter-spacing: 0.3px;
    margin-top: 30px;
    margin-bottom: 18px;
}

.success-box {
    background: #e8efe3;
    color: #335c1b;
    border: 1.5px solid #b7d4b2;
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

header {
    background: #e9e1d7;
    color: #56473b;
    border-bottom: 2.5px solid #d3c1a0;
    box-shadow: 0 2px 8px #ede5db;
    padding: 0;
    width: 100vw;
    margin-bottom: 0;
}
.logo-bar {
    text-align: center;
    font-size: 2.1em;
    font-family: "Merriweather", "Georgia", serif;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 30px 0 5px 0;
    color: #8a6c49;
    text-shadow: 0 1px 0 #f9f8f5;
}
.navbar {
    display: flex;
    justify-content: center;
    gap: 38px;
    font-size: 1.11em;
    margin-top: 8px;
    margin-bottom: 16px;
}
.navbar a, .admin-navbar a {
    color: #8a6c49;
    text-decoration: none;
    padding: 9px 15px;
    border-radius: 20px;
    background: #f4ede6;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
    font-weight: 500;
}
.navbar a.active, .navbar a:hover,
.admin-navbar a.active, .admin-navbar a:hover {
    background: #d5c4ae;
    color: #56473b;
}
.cart-btn {
    background: #b8a382;
    color: #fff;
    border-radius: 20px;
    font-weight: bold;
    border: none;
    padding: 7px 22px;
    margin-left: 22px;
    font-size: 1.07em;
    cursor: pointer;
    box-shadow: 0 1px 6px #eee1d1;
    transition: background 0.15s, color 0.15s;
}
.cart-btn:hover { background: #a18b6b; }

@media (max-width: 700px) {
    .logo-bar { font-size: 1.23em; padding: 20px 0 5px 0;}
    .navbar { font-size: 1em; gap: 12px; }
}

footer {
    background: #e9e1d7;
    color: #8a6c49;
    text-align: center;
    padding: 16px 5px 11px 5px;
    margin-top: 36px;
    font-size: 0.99em;
    border-top: 2px solid #d3c1a0;
    font-family: "Merriweather", "Georgia", serif;
    letter-spacing: 0.2px;
    width: 90vw;
    max-width: 1400px;
}

.breadcrumbs {
    color: #ad9d86;
    font-size: 0.98em;
    margin: 10px 0 18px 0;
    padding-left: 6px;
}

/* GRID i KARTY PRODUKTÓW */
.offers-grid {
    display: grid;
    grid-gap: 32px;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    margin: 24px 0 0 0;
    padding: 0 0 40px 0;
    width: 100%;
}

.offer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 10px 14px 10px;
    border: 2px solid #d3c1a0;
    border-radius: 18px;
    background: #fcf7ee;
    box-shadow: 0 2px 14px #e8e1d6;
    min-width: 0;
    position: relative;
    transition: box-shadow 0.13s, border 0.12s, background 0.13s;
}
.offer-card:hover {
    box-shadow: 0 2px 20px #ebdcc7;
    border-color: #b8a382;
    background: #f8f3ea;
}

.product-img {
    width: 90%;
    max-width: 90%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 12px;
    object-fit: contain;
    background: #e6dfd2;
    cursor: pointer;
    box-shadow: 0 2px 10px #e3d9ca;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.product-title {
    font-weight: bold;
    font-size: 1.15em;
    margin-bottom: 7px;
    text-align: center;
    word-break: break-word;
    color: #684d36;
    font-family: "Merriweather", "Georgia", serif;
}
.product-desc {
    margin-bottom: 7px;
    color: #705943;
    font-size: 1em;
    text-align: center;
}
.product-price {
    color: #9b6d33;
    font-weight: bold;
    font-size: 1.21em;
    margin-bottom: 10px;
    margin-top: 5px;
    font-family: "Merriweather", "Georgia", serif;
}
.choose-btn {
    background: #8a6c49;
    color: #fff;
    border: none;
    border-radius: 11px;
    padding: 8px 32px;
    margin: 13px 0 4px 0;
    font-size: 1.07em;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 1px 8px #eee1d1;
    transition: background 0.18s;
    letter-spacing: 0.2px;
}
.choose-btn:disabled { opacity: 0.38; background: #b5a895; }
.choose-btn:hover:not(:disabled) { background: #6e5534; }

.quantity-input {
    width: 52px;
    padding: 4px;
    border-radius: 6px;
    border: 1.5px solid #ccbfb2;
    text-align: center;
    margin-left: 6px;
    background: #f4ede6;
    color: #56473b;
    font-size: 1.02em;
}

/* RADIOGRUPY (WARIANTY) */
.variant-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 8px 0;
    border: none;
    padding: 0;
}
@media (max-width: 600px) {
    .variant-radio-group {
        flex-direction: column;
        gap: 4px;
    }
}
.variant-radio-label {
    cursor: pointer;
    border-radius: 8px;
    padding: 4px 13px;
    border: 1.5px solid #e5dccd;
    background: #f6f0e8;
    color: #6e5534;
    transition: border 0.14s, background 0.14s, color 0.13s;
    display: inline-block;
    font-size: 0.99em;
    margin-bottom: 3px;
    margin-right: 3px;
    font-family: "Merriweather", "Georgia", serif;
}
.variant-radio:checked + .variant-radio-label,
.variant-radio-label:active {
    border: 2px solid #8a6c49;
    background: #f4e6d7;
    color: #3f2d18;
}
.variant-radio {
    display: none;
}
.variant-radio:checked + .variant-radio-label {
    border: 2px solid #8a6c49;
    background: #f4e6d7;
    color: #3f2d18;
}

/* OVERLAY na karcie gdy niedostępny */
.card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(225, 218, 203, 0.69);
    z-index: 2;
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}
.overlay-text {
    color: #735c42;
    font-weight: bold;
    font-size: 1.12em;
    text-shadow: 0 1px 8px #fff, 0 2px 8px #fff;
}

/* KOSZYK */
.cart-table {
    width: 100%;
    margin-top: 18px;
    border-collapse: collapse;
    font-size: 1.03em;
    background: #f7f2eb;
    border-radius: 8px;
}
.cart-table th, .cart-table td {
    padding: 11px 7px;
    border-bottom: 1px solid #e4dac7;
    text-align: center;
}
.cart-table img.cart-img {
    width: 62px;
    height: auto;
    border-radius: 6px;
    background: #ede7dc;
}

.qty-btn, .remove-btn {
    padding: 2px 13px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1em;
}
.qty-btn {
    background: #ece5dc;
    color: #7b674e;
    margin-left: 2px;
    font-family: inherit;
}
.qty-btn:hover { background: #e5dacb; }
.remove-btn {
    background: #e7c4b1;
    color: #a1441a;
    font-family: inherit;
}
.remove-btn:hover { background: #efd3be; }

.order-form label { display: block; margin: 12px 0 0 0; font-weight: 500; }
.order-form input[type="text"],
.order-form input[type="email"] {
    width: 260px;
    padding: 8px;
    border-radius: 7px;
    border: 1.5px solid #c5b9a6;
    margin-left: 7px;
    font-size: 1em;
    background: #f6f0e8;
    color: #56473b;
    font-family: "Merriweather", "Georgia", serif;
}
.order-btn {
    background: #b8a382;
    color: #fff;
    border: none;
    border-radius: 11px;
    padding: 11px 38px;
    font-size: 1.11em;
    margin-top: 18px;
    cursor: pointer;
    font-weight: bold;
    font-family: "Merriweather", "Georgia", serif;
}
.order-btn:hover { background: #8a6c49; }

.styled-select, .order-select, select {
    background: #f6f0e8;
    color: #56473b;
    border: 1.2px solid #ccbfb2;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 1.08em;
    font-family: "Merriweather", "Georgia", serif;
    margin-top: 9px;
    margin-bottom: 10px;
    transition: border 0.14s, box-shadow 0.13s;
    outline: none;
    box-shadow: 0 1px 7px #eee5db;
    width: 100%;
    max-width: 430px;
    min-width: 200px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="gray" height="16" viewBox="0 0 20 20" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7.293 7.293a1 1 0 0 1 1.414 0L10 8.586l1.293-1.293a1 1 0 1 1 1.414 1.414l-2 2a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 0-1.414z"></path></svg>');
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 22px 22px;
}

.styled-select:focus, .order-select:focus, select:focus {
    border-color: #9b6d33;
    box-shadow: 0 2px 12px #ecd8b6;
}


/* MODAL ZDJĘCIA */
#imgModal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0; top: 0; width: 100vw; height: 100vh;
    background: rgba(239,232,221,0.95);
    justify-content: center;
    align-items: center;
}
#imgModal img {
    max-width: 96vw;
    max-height: 92vh;
    border-radius: 13px;
    box-shadow: 0 1px 18px #bbad99;
    background: #fff;
    display: block;
    margin: auto;
}
#imgModalClose {
    position: absolute;
    right: 38px; top: 20px;
    color: #56473b;
    font-size: 2.4em;
    font-weight: bold;
    cursor: pointer;
    background: rgba(200,180,160,0.25);
    border-radius: 24px;
    padding: 4px 13px;
    transition: background 0.17s;
}
#imgModalClose:hover { background: rgba(200,180,160,0.42); color: #8a6c49; }

#addProductModal > div {
    max-height: 96vh;
    overflow-y: auto;
    background: #f4ede6;
    border: 2px solid #d3c1a0;
}

/* RESPONSYWNOŚĆ - MOBILE */
@media (max-width: 900px) {
    main, .offers-grid, .cart-table, .order-form, footer {
        width: 98vw;
        max-width: 98vw;
    }
    .offers-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
    .offer-card { padding: 10px 3px 10px 3px; }
    .product-img { max-width: 98%; }
}
@media (max-width: 600px) {
    .offers-grid { grid-template-columns: 1fr; }
    .logo-bar { font-size: 1.13em; }
    .product-img { max-width: 96vw; }
    .cart-table th, .cart-table td { font-size: 0.97em; padding: 7px 2px;}
}
