/* =============== Design tokens =============== */
:root {
    --green: #19a062;
    --green-strong: #148a54;
    --green-100: #e9f7ee;
    --ink: #0d2a1a;
    --muted: #5b7a67;
    --line: #e5efe9;
    --card: #ffffff;
    --bg: #f6faf7;
    --shadow: 0 10px 24px rgba(16, 38, 28, .08);
    --radius: 16px;
    --ease: cubic-bezier(.22, .61, .36, 1);
}

/* =============== Base =============== */


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

body {

    background: radial-gradient(1200px 600px at 8% 12%, rgba(25, 160, 98, .08), transparent 60%),
    radial-gradient(1200px 600px at 92% 88%, rgba(25, 160, 98, .06), transparent 60%),
    var(--bg);
    font-family: Poppins, system-ui, Arial, sans-serif;
    color: var(--ink);
    min-height: 100svh;            /* nie środek, tylko trochę wyżej */


}

/* =============== Layout =============== */
.container {
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 16px;
    display: grid;

    grid-template-columns: 1fr 340px;
    gap: 24px;
}

@media (max-width: 960px) {
    .container {
        grid-template-columns: 1fr;
    }
}

/* =============== Cards =============== */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    min-width: 300px;
}

.card h2 {
    margin: 0;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2::after {
    content: "";
    flex: 1 1 auto;
    height: 2px;
    margin-left: 8px;
    background: linear-gradient(90deg, rgba(25, 160, 98, .18), transparent);
    border-radius: 2px;
}

/* sticky podsumowanie na długich listach */
.container aside.card {
    position: sticky;
    top: 24px;
    align-self: start;
}

/* =============== Lista produktów =============== */
.cart-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.empty-cart{
    margin-left:8px;
}



.item3 {
    display: grid;
    grid-template-columns: 72px 1fr auto 110px 40px;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px dashed var(--line);
    transition: background .2s var(--ease);
}

.item3:last-child {
    border-bottom: none;
}

.item3:hover {
    background: #fafdfb;
}

.thumb {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff, #f1fff6);
    border: 1px solid var(--line);
    position: relative;
}

.thumb::after {
    /* prosty place-holder ikonki produktu */
    content: "🛒";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 26px;
    opacity: .5;
}

.info h3 {
    margin: 0 0 4px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
}

.info small {
    color: var(--muted);
}

.price {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--ink);
}

/* =============== Ilość (ładniejszy number input) =============== */
.qty input {
    width: 92px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 10px;
    text-align: center;
    font: inherit;
    color: var(--ink);
    background: #fff;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
    box-shadow: inset 0 1px 0 rgba(16, 38, 28, .03);
}

.qty input:focus {
    outline: none;
    border-color: rgba(25, 160, 98, .55);
    box-shadow: 0 0 0 6px rgba(25, 160, 98, .12);
}

/* ukryj domyślne strzałki w WebKit, zostawmy czysty wygląd */
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty input[type=number] {
    -moz-appearance: textfield;
}

/* =============== Usuń (lepszy affordance) =============== */
.remove {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    color: #b23;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background .2s var(--ease), color .2s var(--ease), transform .06s;
}

.remove:hover {
    background: #fff4f4;
    color: #d12f2f;
}

.remove:active {
    transform: translateY(1px);
}

/* =============== Podsumowanie =============== */
.summary {
    padding: 16px;
}

.row1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 2px;
    border-bottom: 1px dashed var(--line);
}

.row1:last-child {
    border-bottom: none;
}

.badge {
    font-size: .78rem;
    background: var(--green-100);
    color: var(--green-strong);
    border: 1px solid var(--green-100);
    padding: 2px 8px;
    border-radius: 999px;
}

.total {
    font-weight: 700;
    font-size: 1.1rem;
}

.total span:last-child {
    color: var(--green-strong);
}

/* =============== CTA =============== */
.btn {
    width: 100%;
    margin-top: 16px;
    height: 48px;
    border-radius: 12px;
    border: 0;
    background: linear-gradient(180deg, var(--green), var(--green-strong));
    color: #fff;
    font-weight: 700;
    letter-spacing: .2px;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(25, 160, 98, .18), inset 0 1px 0 rgba(255, 255, 255, .45);
    transition: transform .06s ease, box-shadow .25s var(--ease), filter .2s var(--ease);
}

.btn:hover {
    filter: brightness(1.03);
    box-shadow: 0 16px 32px rgba(25, 160, 98, .22), inset 0 1px 0 rgba(255, 255, 255, .55);
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus-visible {
    outline: 3px solid rgba(25, 160, 98, .42);
    outline-offset: 2px;
}

.btn[disabled] {
    opacity: .6;
    cursor: not-allowed;
}

/* =============== Responsywność: 2 wiersze na mobile =============== */
@media (max-width: 640px) {
    .item3 {
        grid-template-columns: 64px 1fr 40px;
        grid-template-areas:
      "thumb info remove"
      "thumb meta  meta";
        row-gap: 8px;
        align-items: start;
    }

    .thumb {
        width: 64px;
        height: 64px;
    }

    /* =============== Design tokens =============== */
    :root {
        --green: #19a062;
        --green-strong: #148a54;
        --green-100: #e9f7ee;
        --ink: #0d2a1a;
        --muted: #5b7a67;
        --line: #e5efe9;
        --card: #ffffff;
        --bg: #f6faf7;
        --shadow: 0 10px 24px rgba(16, 38, 28, .08);
        --radius: 16px;
        --ease: cubic-bezier(.22, .61, .36, 1);
    }

    /* =============== Base =============== */
    * {
        box-sizing: border-box;
    }

    body {
        margin: 0;
        background: radial-gradient(1200px 600px at 8% 12%, rgba(25, 160, 98, .08), transparent 60%),
        radial-gradient(1200px 600px at 92% 88%, rgba(25, 160, 98, .06), transparent 60%),
        var(--bg);
        font-family: Poppins, system-ui, Arial, sans-serif;
        color: var(--ink);
    }

    /* =============== Layout =============== */
    .container {
        max-width: 1100px;
        margin: 32px auto;
        padding: 0 8px;
        display: grid;
        grid-template-columns: 1fr 340px;
        gap: 24px;

    }

    @media (max-width: 960px) {
        .container {
            grid-template-columns: 1fr;
        }
    }

    /* =============== Cards =============== */
    .card {
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        overflow: hidden;
    }

    .card h2 {
        margin: 0;
        padding: 18px 20px;
        border-bottom: 1px solid var(--line);
        color: var(--ink);
        font-size: 1.25rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .card h2::after {
        content: "";
        flex: 1 1 auto;
        height: 2px;
        margin-left: 8px;
        background: linear-gradient(90deg, rgba(25, 160, 98, .18), transparent);
        border-radius: 2px;
    }

    /* sticky podsumowanie na długich listach */
    .container aside.card {
        position: sticky;
        top: 24px;
        align-self: start;
    }

    /* =============== Lista produktów =============== */
    .cart-list {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .item3 {
        display: grid;
        grid-template-columns: 72px 1fr auto 110px 40px;
        gap: 14px;
        align-items: center;
        padding: 14px 16px;
        border-bottom: 1px dashed var(--line);
        transition: background .2s var(--ease);
    }

    .item3:last-child {
        border-bottom: none;
    }

    .item3:hover {
        background: #fafdfb;
    }

    .thumb {
        width: 72px;
        height: 72px;
        border-radius: 12px;
        background: linear-gradient(135deg, #fff, #f1fff6);
        border: 1px solid var(--line);
        position: relative;
    }

    .thumb::after {
        /* prosty place-holder ikonki produktu */
        content: "🛒";
        position: absolute;
        inset: 0;
        display: grid;
        place-items: center;
        font-size: 26px;
        opacity: .5;
    }

    .info h3 {
        margin: 0 0 4px 0;
        font-size: 1rem;
        font-weight: 600;
        color: var(--ink);
    }

    .info small {
        color: var(--muted);
    }

    .price {
        font-variant-numeric: tabular-nums;
        font-weight: 600;
        color: var(--ink);
    }

    /* =============== Ilość (ładniejszy number input) =============== */
    .qty input {
        width: 92px;
        height: 40px;
        border: 1px solid var(--line);
        border-radius: 10px;
        padding: 0 10px;
        text-align: center;
        font: inherit;
        color: var(--ink);
        background: #fff;
        transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
        box-shadow: inset 0 1px 0 rgba(16, 38, 28, .03);
    }

    .qty input:focus {
        outline: none;
        border-color: rgba(25, 160, 98, .55);
        box-shadow: 0 0 0 6px rgba(25, 160, 98, .12);
    }

    /* ukryj domyślne strzałki w WebKit, zostawmy czysty wygląd */
    .qty input::-webkit-outer-spin-button,
    .qty input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    .qty input[type=number] {
        -moz-appearance: textfield;
    }

    /* =============== Usuń (lepszy affordance) =============== */
    .remove {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        border: 1px solid transparent;
        background: transparent;
        font-size: 20px;
        line-height: 1;
        color: #b23;
        cursor: pointer;
        display: grid;
        place-items: center;
        transition: background .2s var(--ease), color .2s var(--ease), transform .06s;
    }

    .remove:hover {
        background: #fff4f4;
        color: #d12f2f;
    }

    .remove:active {
        transform: translateY(1px);
    }

    /* =============== Podsumowanie =============== */
    .summary {
        padding: 12px;
    }

    .row1 {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 12px 2px;
        border-bottom: 1px dashed var(--line);
    }

    .row1:last-child {
        border-bottom: none;
    }

    .badge {
        font-size: .78rem;
        background: var(--green-100);
        color: var(--green-strong);
        border: 1px solid var(--green-100);
        padding: 2px 8px;
        border-radius: 999px;
    }

    .total {
        font-weight: 700;
        font-size: 1.1rem;
    }

    .total span:last-child {
        color: var(--green-strong);
    }

    /* =============== CTA =============== */
    .btn {
        width: 100%;
        margin-top: 16px;
        height: 48px;
        border-radius: 12px;
        border: 0;
        background: linear-gradient(180deg, var(--green), var(--green-strong));
        color: #fff;
        font-weight: 700;
        letter-spacing: .2px;
        cursor: pointer;
        box-shadow: 0 12px 24px rgba(25, 160, 98, .18), inset 0 1px 0 rgba(255, 255, 255, .45);
        transition: transform .06s ease, box-shadow .25s var(--ease), filter .2s var(--ease);
    }

    .btn:hover {
        filter: brightness(1.03);
        box-shadow: 0 16px 32px rgba(25, 160, 98, .22), inset 0 1px 0 rgba(255, 255, 255, .55);
    }

    .btn:active {
        transform: translateY(1px);
    }

    .btn:focus-visible {
        outline: 3px solid rgba(25, 160, 98, .42);
        outline-offset: 2px;
    }

    .btn[disabled] {
        opacity: .6;
        cursor: not-allowed;
    }

    /* =============== Responsywność: 2 wiersze na mobile =============== */
    @media (max-width: 640px) {
        .cart-list .item3 {
    display: grid;
    grid-template-columns: 100px 1fr 50px;
    grid-template-areas:
      "thumb info  remove"
      "thumb price remove"
      "thumb qty   remove";
    column-gap: 12px;
    row-gap: 8px;
    align-items: start;
  }

  .cart-list .item3 .thumb  { grid-area: thumb; }
  .cart-list .item3 .info   { grid-area: info; }
  .cart-list .item3 .price  { grid-area: price; }
  .cart-list .item3 .qty    { grid-area: qty; }

  /* KLUCZ: identyczne wyrównanie obu elementów w tej samej kolumnie */
  .cart-list .item3 .price,
  .cart-list .item3 .qty {
    justify-self: start;   /* jeśli cena ma być przy prawej krawędzi kolumny */
  }
  /* Jeśli chcesz przy lewej — użyj: justify-self: start; */

  /* kosmetyka qty */
  .cart-list .item3 .qty {
    display: inline-flex;
    align-items: center;

    justify-self: start;
  }






        .info {
            grid-area: info;

        }

        .price {
            grid-area: meta;
        }

        .qty {
            grid-area: meta;
        }

        .price, .qty {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            margin-top: 2px;
        }

        .qty input {
            width: 84px;
            height: 38px;
        }
    }

    /* =============== Preferencje systemowe =============== */
    @media (prefers-reduced-motion: reduce) {
        * {
            transition: none !important;
        }
    }

    .info {
        grid-area: info;
    }



    .price {
        grid-area: meta;
    }

    .qty {
        grid-area: meta;
    }

    .price, .qty {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        margin-top: 2px;
    }

    .qty input {
        width: 84px;
        height: 38px;
    }
}

/* =============== Preferencje systemowe =============== */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}







/* =============== Stylowanie przycisków + i - obok wyświetlanej ilości =============== */
.qty {
    display: flex;
    align-items: center;
    gap: 8px;


}

.qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    background: var(--card);
    font-size: 16px;
    color: var(--ink);
    display: grid;
    place-items: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.qty-btn:hover {
    background: var(--green-100);
    color: var(--green-strong);
}

.qty-btn:active {
    background: var(--green);
    color: white;
}

.qty-btn:focus {
    outline: none;
}

/* Stylizacja dla wyświetlania ilości */
.qty-display {
    display:flex;
    justify-content: center;
    align-content:center;
    align-items:center;
    width: 60px;
    height: 36px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}


@media (max-width: 370px){

    .remove{
        margin-left: -12px;
      }

      .info h3{
        font-size: .9rem;
      }

}


.cart-product-image{
    width:100px;
    height:100px;
    object-fit:contain;
}


#non-visible-form{
    display:none;
}



 @media (max-width: 400px) {
    .row1 {
        font-weight: 700;
        font-size: .8rem!important;
    }

    .card {
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        overflow: hidden;
        min-width: 280px;
    }

 }

