/* cart-drop.css */

.drop-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 6000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    }
@keyframes drop-fade{ from{opacity:0} to{opacity:1} }

.drop-modal{
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    }

.drop-title{
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .2px;
    color: #2b2b2b;
    }

.drop-form{ margin: 0; }

.drop-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    }

.drop-col-span{ grid-column: 1 / -1; }
.drop-spacer{ display:block; }

.drop-label{
    position: relative;
    display: grid;
    gap: 0px;
    font-size: 12px;
    color: #555;
    }

.drop-input{
    width: 100%;
    box-sizing: border-box;
    height: 40px;
    padding: 8px 10px;
    border: 1px solid #d7d7d7;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    background: #fff;
    }
.drop-input::placeholder{ color:#9aa1a9; }
.drop-input:focus{
    border-color: #11111100;
    box-shadow: 0 0 0 3px rgba(0,0,0,.08);
    }

.drop-error{
    margin-top: 8px;
    color: #b00020;
    font-size: 13px;
    }

.drop-actions{
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 14px;
    }



/* Validation states */
/* Сообщение об ошибке под полем */
.drop-field-error{
    color:#b00020;
    font-size:12px;
    margin-top:6px;
    line-height:1.2;
    min-height:14px;
    transition:opacity .2s;
    }
.drop-field-error:empty{
    opacity:0;
    min-height:0;
    margin-top:0;
    }

/* Успешное поле */
input.drop-valid,
textarea.drop-valid,
select.drop-valid{
    border-color:none !important;
    box-shadow:0 0 0 3px rgba(46,125,50,.15) !important;
    transition:border-color .15s, box-shadow .15s;
    }
input.drop-valid:focus,
textarea.drop-valid:focus,
select.drop-valid:focus{
    outline:0;
    box-shadow:0 0 0 4px rgba(46,125,50,.25) !important;
    }

/* Поле с ошибкой */
input.drop-invalid,
textarea.drop-invalid,
select.drop-invalid{
    border-color:#ff000033 !important;
    box-shadow:0 0 0 0px rgba(211,47,47,.15) !important;
    transition:border-color .15s, box-shadow .15s;
    }
input.drop-invalid:focus,
textarea.drop-invalid:focus,
select.drop-invalid:focus{
    outline:0;
    box-shadow:0 0 0 4px rgba(211,47,47,.25) !important;
    }
.drop-field-error {
    font-size: 12px;
    color: #ef9292;
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    background: #ffffff;
    padding: 0px 10px;
    border-radius: 5px;
    width: max-content;
    }


/* Кнопки */
.drop-btn{
    appearance: none;
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
    transition: transform .02s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
    user-select: none;
    }
.drop-btn:active{ transform: translateY(1px); }

.drop-btn-outline{
    background: #fff;
    color: #222;
    border: 1px solid #cfd3d7;
    }
.drop-btn-outline:hover{ border-color:#111; }

.drop-btn-primary{
    background: #31914f;
    color: #fff;
    }
.drop-btn-primary:hover{ box-shadow: 0 6px 22px rgba(0,0,0,.18); }

/* Адаптив */
@media (max-width: 520px){
    .drop-grid{ grid-template-columns: 1fr; }
    .drop-spacer{ display:none; }
    }



/* модалка  оплаты */
#bt-dropin-overlay{
    position:fixed; inset:0; z-index:6000;
    background:rgba(0,0,0,.55);
    display:none;                 /* cart.js меняет на block */
    align-items:center; justify-content:center;
    }
#bt-dropin-overlay .bt-window{
    width:100%; max-width:560px;
    background:#fff; border-radius:12px; padding:16px;
    box-shadow:0 16px 60px rgba(0,0,0,.3);
    }



/* успешная оплата */
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    }
.success-dialog {
    width: min(420px, 92vw);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    padding: 22px;
    text-align: center;
    }
.success-dialog h3 {
    margin: 0 0 6px;
    font: 600 20px/1.2 system-ui, -apple-system, Segoe UI, Roboto;
    }
.success-dialog p {
    margin: 0 10px 8px;
    }
.success-dialog .order-id {
    margin: 0 0 14px;
    }
.success-dialog .order-id b {
    font-weight: bold;
    }














/* Модалка для корзины */

/* подложка */
.cart-overlay {
    position: fixed; inset: 0; display: none;
    align-items: center; justify-content: center;
    background: rgba(0,0,0,.6); z-index: 3000; padding: 16px;
    }
.cart-overlay.show { display: flex; }

/* окно */
.cart-modal {
    background: #fff; color: #111;
    width: min(600px, 96vw); max-height: 88vh;
    border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.35);
    display: flex; flex-direction: column; overflow: hidden;
    font-family: "Geist", system-ui, sans-serif;
    }

/* ===== Cart image zoom (lightbox) ===== */
.imgzoom-backdrop{
  position: fixed; inset: 0;
  background: rgba(0,0,0,0);
  transition: background .35s ease;
  z-index: 4000; /* выше cart-modal (3000) */
  cursor: zoom-out;
}
.imgzoom-clone{
  position: fixed; left:0; top:0;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  border-radius: 12px;
  will-change: left, top, width, height, opacity;
  transition: left .35s ease, top .35s ease,
              width .35s ease, height .35s ease, opacity .35s ease;
  z-index: 4001;
  cursor: zoom-out;
}

/* шапка */
.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #ebebeb;
    }
.cart-header h3 { margin: 0; color: black; font-size: 18px; text-transform: uppercase; }

/* тело (скроллится) */
.cart-body {
    padding: 10px 12px; overflow: auto;
    display: flex; flex-direction: column;
    }

/* строка товара */
.cart-item {
    display: grid; grid-template-columns: 64px 1fr auto;
    gap: 12px; align-items: center; padding: 0 0 10px 0px;
    }
.cart-thumb {
    width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background:#f4f4f4;
    display:flex; align-items:center; justify-content:center;
    }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in;}
.cart-info { 
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    }
.cart-title { font-size: 16px; font-family: 'Geist Thin'; }
.cart-meta { font-size: 12px; color: #555; display: flex; gap: 10px; flex-wrap: wrap; }
.cart-chip { background:#f0f0f0; padding: 2px 8px; border-radius: 4px; font-size: 12px; }

.cart-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-items: end;
    justify-content: flex-end;
    }
.cart-price { font-size: 15px; font-family: 'Geist Thin'; }

.qty {
    display: inline-flex;
    align-items: center;
    gap: 0px;
    border: 1px solid #b1b1b1;
    padding: 0px;
    }
.qty-btn {
    width: 20px;
    height: 25px;
    border: 0;
    cursor: pointer;
    background: #ffffff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Geist Thin';
    }
.qty-btn:hover {
    background: #ebebeb;
    }
.qty-input {
    width: 20px;
    text-align: center;
    border: 0;
    outline: none;
    background: transparent;
    font-family: 'Geist Thin';
    }
.remove-btn {
    border: none;
    background: #ffffff;
    color: #ad0000;
    border-radius: 3px;
    cursor: pointer;
    height: 35px;
    width: 19px;
    display: flex;
    justify-content: center;
    font-size: 30px;
    font-family: 'Geist Thin';
    align-items: center;
    }





/* футер корзины */
.cart-footer {
    padding: 12px 16px;
    display: flex;
    gap: 10px;
    background: #ebebeb;
    align-items: center;
    justify-content: center;
    font-family: 'Geist Thin';
    flex-direction: column;
    }
.subtotal { font-size: 16px; }
.subtotal strong {font-size: 19px; font-family: 'Geist Thin';}

.cart-cta { display: flex; gap: 8px; }
.btn-outline {
    background: #fff;
    color: #1111118c;
    border: 1px solid #00000020;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    }
.btn-primary {
    background: #31914f;
    color: #fff;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
    padding: 9px 18px;
    font-size: 16px;
    text-transform: capitalize;
    }

/* пустая корзина */
.cart-empty {
    text-align: center; color:#555; padding: 28px 10px; font-size: 15px;
    }

/* блокировка скролла фона */
body.cart-lock { overflow: hidden; }

/* адаптив */
@media (max-width: 560px) {
    .cart-actions{ grid-column: 1 / -1; }
    .cart-price{ justify-self: start; }
    }

















/* платежная система braintree */

.braintree-placeholder {
    display: none;
    }
.braintree-sheet__content--form {
    padding: 10px 10px 0px 10px;
    }
.braintree-show-applePay .braintree-applePay, .braintree-show-card .braintree-card, .braintree-show-delete-confirmation .braintree-delete-confirmation, .braintree-show-googlePay .braintree-googlePay, .braintree-show-methods .braintree-methods, .braintree-show-options .braintree-options, .braintree-show-paypal .braintree-paypal, .braintree-show-paypalCredit .braintree-paypalCredit, .braintree-show-venmo .braintree-venmo {
    border: 1px solid white;
    }
.braintree-sheet__header {
    border:none;
    display: none;
    }
.braintree-sheet__content--form .braintree-form__field-group .braintree-form__field .braintree-form__hosted-field  {
    border: 1px solid #ffffff;
    border-radius: 6px;
    background: #edefef;
    padding: 0 15px;
    }
.braintree-sheet__content--form .braintree-form__field-group .braintree-form__field .braintree-form__hosted-field.braintree-form__field--valid {
    border-color: #edefef;
    }
:where(a) {
    color: teal;
    }
.braintree-large-button span {
    border-bottom: 0px solid #b5b5b5;
    padding-bottom: 1px;
    }
.braintree-large-button {
    background: #a9bbbb;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-size: 17px;
    margin: 0 auto;
    padding: 12px;
    text-align: center;
    width: fit-content;
    }
.braintree-large-button:hover {
    background: #b4d5d5;
    font-weight: 100;
    }
.braintree-option:first-child {
    border: 5px solid white;
    border-radius: 20px;
    margin: 0;
    padding: 30px;
    }
.braintree-option:last-child {
    border: 5px solid white;
    border-radius: 20px;
    margin: 0;
    padding: 30px;
    }










/* ===== Cart summary (TOTAL + Details) ===== */

.cart-total-line {
    display: flex;
    gap: 0px;
    margin: 0px 10px 0 0;
    justify-content: center;
    float: left;
    align-items: baseline;
}

.cart-total-label {
  font-size: .9rem;
  letter-spacing: .06em;
  color: #555;
}

.cart-total-value {
    font-weight: 700;
    font-size: 20px;
    margin: 0 0 0 10px;
}

/* “Details” link */
.cart-details-link {
  display: inline-block;
  font-size: .85rem;
  color: #0a66c2;               /* синий (как у ссылок) */
  text-decoration: underline;
  margin-top: .1rem;
  cursor: pointer;
}
.cart-details-link:hover { text-decoration: none; }
.cart-details-link:focus {
  outline: 2px solid rgba(10,102,194,.35);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Popup container (initially hidden via inline style in JS) */
.cart-details-popup {
  position: relative;            /* остаётся в потоке, не перекрывает модалку */
  margin-top: .4rem;
  padding: .6rem .7rem;
  background: #fff;
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  font-size: .9rem;
  line-height: 1.35;
  z-index: 1;                    /* поверх содержимого блока, но ниже общей модалки */
}

/* rows inside popup */
.cart-details-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  padding: .2rem 0;
  color: #333;
}

/* values */
.cart-subtotal-val,
.cart-shipping-val,
.cart-tax-val,
.cart-total-val {
  font-variant-numeric: tabular-nums;  /* ровные цифры */
  white-space: nowrap;
}

/* total row inside popup */
.cart-details-total {
  margin-top: .35rem;
  padding-top: .35rem;
  border-top: 1px dashed #ddd;
  font-weight: 700;
}

/* небольшая адаптивность */
@media (min-width: 480px) {
  .cart-total-value { font-size: 1.15rem; }
  .cart-details-popup { font-size: .92rem; }
}
