/* VLAMI — prodavnica hidroizolacije (koristi boje iz styles.css) */

.shop-page {
  background: #f6f8fc;
}

.shop-page main {
  min-height: 62vh;
}

.shop-hero {
  padding: 2.25rem 0 1.25rem;
  background: linear-gradient(120deg, #ffffff 0%, #eef2ff 100%);
  border-bottom: 1px solid #e2e8f0;
}

.shop-hero h1 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
}

.shop-hero p {
  max-width: 640px;
}

.shop-chips li {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #dbe3f4;
  color: #334155;
}

.shop-section {
  padding: 2rem 0 3.5rem;
}

/* ---------- kartica proizvoda ---------- */
.shop-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  scroll-margin-top: 90px;
}

.shop-card:hover {
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.shop-card.is-in-cart {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px #f59e0b inset;
}

.shop-card-img {
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  padding: 0.5rem;
}

.shop-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.shop-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 1.1rem 1.1rem;
}

.shop-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}

.shop-card-pack {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 600;
}

.shop-card-desc {
  font-size: 0.86rem;
  color: #475569;
  margin: 0.45rem 0 0.75rem;
  line-height: 1.45;
}

.shop-card-foot {
  margin-top: auto;
}

.shop-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--vlami-primary);
  line-height: 1.1;
}

.shop-price-note {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.7rem;
}

.btn-add,
.shop-card-action .qty-stepper {
  min-height: 44px;
}

.btn-add {
  font-weight: 700;
  border-radius: 12px;
}

.in-cart-note {
  font-size: 0.8rem;
  color: #92400e;
  text-align: center;
  margin-top: 0.4rem;
}

/* ---------- +/- količina ---------- */
.qty-stepper {
  display: flex;
  align-items: stretch;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  overflow: hidden;
  background: #fffbeb;
}

.qty-stepper button {
  flex: 0 0 44px;
  border: 0;
  background: #f59e0b;
  color: #111827;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.qty-stepper button:hover {
  background: #d97706;
}

.qty-stepper button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.qty-stepper .qty-value {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  min-width: 2.25rem;
}

.qty-stepper-sm {
  border-width: 1px;
  border-color: #e2e8f0;
  background: #ffffff;
  border-radius: 10px;
  height: 34px;
}

.qty-stepper-sm button {
  flex-basis: 32px;
  background: #f1f5f9;
  font-size: 1.05rem;
}

.qty-stepper-sm button:hover {
  background: #e2e8f0;
}

.qty-stepper-sm .qty-value {
  font-size: 0.95rem;
  min-width: 2rem;
}

/* ---------- korpa (desktop) ---------- */
.cart-panel {
  position: sticky;
  top: 88px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 110px);
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.cart-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
}

.cart-body {
  overflow-y: auto;
  padding: 0.25rem 1.25rem;
  flex: 1 1 auto;
  min-height: 120px;
}

.cart-foot {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid #f1f5f9;
  background: #ffffff;
  border-radius: 0 0 20px 20px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.85rem;
}

.cart-total-row strong {
  font-size: 1.4rem;
  color: var(--vlami-primary);
}

.cart-go {
  font-weight: 700;
  border-radius: 12px;
}

.cart-go.disabled {
  opacity: 0.45;
}

.cart-note {
  font-size: 0.78rem;
  color: #64748b;
  text-align: center;
  margin-top: 0.5rem;
}

.cart-empty {
  text-align: center;
  padding: 1.75rem 0.5rem;
}

.cart-empty-icon {
  font-size: 2rem;
  opacity: 0.55;
  margin-bottom: 0.25rem;
}

.cart-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 0;
  border-bottom: 1px solid #f1f5f9;
  position: relative;
}

.cart-item:last-child {
  border-bottom: 0;
}

.cart-item img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  background: #ffffff;
  flex-shrink: 0;
}

.cart-item-main {
  flex: 1;
  min-width: 0;
  padding-right: 1.25rem;
}

.cart-item-name {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.25;
}

.cart-item-meta {
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 0.4rem;
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.cart-item-sum {
  font-size: 0.92rem;
  white-space: nowrap;
}

.cart-item-remove {
  position: absolute;
  top: 0.6rem;
  right: -0.35rem;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.35rem;
  line-height: 1;
  border-radius: 8px;
}

.cart-item-remove:hover {
  color: #dc2626;
  background: #fef2f2;
}

.cart-item.flash {
  animation: cartFlash 0.9s ease;
}

@keyframes cartFlash {
  0% { background: #fef3c7; }
  100% { background: transparent; }
}

/* ---------- korpa (mobilni) ---------- */
.cart-bar {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  z-index: 1035;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #0f172a;
  color: #ffffff;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
  transform: translateY(140%);
  transition: transform 0.25s ease;
}

.cart-bar.is-visible {
  transform: translateY(0);
}

.cart-bar.bump {
  animation: barBump 0.4s ease;
}

@keyframes barBump {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-4px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

.cart-bar-summary {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: transparent;
  border: 0;
  color: inherit;
  text-align: left;
  padding: 0.25rem 0.5rem;
  min-width: 0;
}

.cart-bar-icon {
  position: relative;
  display: inline-flex;
}

.cart-bar-count {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f59e0b;
  color: #111827;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-bar-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.cart-bar-label {
  font-size: 0.75rem;
  color: #cbd5e1;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cart-bar-text strong {
  font-size: 1.05rem;
  white-space: nowrap;
}

.cart-bar-go {
  font-weight: 800;
  border-radius: 12px;
  padding: 0.7rem 1.25rem;
}

body.has-cart-bar footer {
  padding-bottom: 6rem !important;
}

.cart-sheet.offcanvas-bottom {
  height: auto;
  max-height: 85vh;
  border-radius: 20px 20px 0 0;
}

.cart-sheet .offcanvas-body {
  padding-top: 0;
  padding-bottom: 0;
}

.cart-sheet .cart-foot {
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.05);
}

/* ---------- koraci ---------- */
.checkout-steps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.checkout-steps .step {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  color: inherit;
}

.checkout-steps .step span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.75rem;
}

.checkout-steps .step.done {
  color: #0f766e;
}

.checkout-steps .step.done span {
  background: #ccfbf1;
  color: #0f766e;
}

.checkout-steps .step.active {
  color: #0f172a;
}

.checkout-steps .step.active span {
  background: #f59e0b;
  color: #111827;
}

.step-line {
  flex: 0 1 40px;
  min-width: 12px;
  height: 2px;
  background: #e2e8f0;
}

/* ---------- checkout ---------- */
.checkout-empty,
.thanks-card {
  max-width: 560px;
  margin: 1rem auto;
  text-align: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 2.5rem 1.5rem;
}

.thanks-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dcfce7;
  color: #15803d;
}

.summary-card {
  position: sticky;
  top: 88px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
}

.summary-details > summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.summary-details > summary::-webkit-details-marker {
  display: none;
}

.summary-title {
  font-weight: 700;
}

.summary-title::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 0.5rem;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s ease;
}

.summary-details[open] .summary-title::after {
  transform: rotate(-135deg) translateY(-1px);
}

.summary-total-mini {
  color: var(--vlami-primary);
  white-space: nowrap;
}

.summary-details[open] .summary-total-mini {
  visibility: hidden;
}

.sum-list {
  margin: 0.75rem 0 0.5rem;
}

.sum-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.sum-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  flex-shrink: 0;
}

.sum-item-main {
  flex: 1;
  min-width: 0;
}

.sum-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.25;
}

.sum-item-name .text-muted {
  font-weight: 400;
  font-size: 0.8rem;
}

.sum-item-meta {
  font-size: 0.8rem;
  color: #64748b;
}

.sum-item-total {
  font-size: 0.9rem;
  white-space: nowrap;
}

.sum-totals {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed #cbd5e1;
}

.sum-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: #475569;
  padding: 0.15rem 0;
}

.sum-row-total {
  font-size: 1.05rem;
  color: #0f172a;
  font-weight: 700;
  padding-top: 0.5rem;
}

.sum-row-total strong {
  font-size: 1.35rem;
  color: var(--vlami-primary);
}

.sum-row-note {
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 0.4rem;
}

.form-block {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  min-width: 0;
}

fieldset.form-block[hidden],
.form-block[hidden] {
  display: none;
}

.form-block-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.form-block-title > span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checkout-form .form-label {
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.checkout-form .form-control {
  min-height: 46px;
  border-radius: 10px;
  font-size: 1rem; /* sprečava zumiranje na iPhone-u */
}

.checkout-form .form-control:focus,
.checkout-form .form-check-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 0.2rem rgba(245, 158, 11, 0.25);
}

.form-check-input:checked {
  background-color: #f59e0b;
  border-color: #f59e0b;
}

.tip-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.tip-option {
  position: relative;
  cursor: pointer;
  margin: 0;
}

.tip-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  pointer-events: none;
}

.tip-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  height: 100%;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tip-icon {
  color: #64748b;
  margin-bottom: 0.35rem;
}

.tip-name {
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
}

.tip-desc {
  font-size: 0.8rem;
  color: #64748b;
}

.tip-option:hover .tip-box {
  border-color: #cbd5e1;
}

.tip-option input:focus-visible + .tip-box {
  box-shadow: 0 0 0 0.2rem rgba(245, 158, 11, 0.35);
}

.tip-option input:checked + .tip-box {
  border-color: #f59e0b;
  background: #fffbeb;
}

.tip-option input:checked + .tip-box .tip-icon {
  color: #b45309;
}

.invalid-tip {
  display: none;
}

.was-validated .tip-choice:not(:has(input:checked)) + .invalid-tip {
  display: block;
}

.isporuka-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  min-width: 0;
}

.submit-block {
  border-color: #fcd34d;
  background: #fffdf6;
}

.submit-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.submit-total strong {
  font-size: 1.5rem;
  color: var(--vlami-primary);
  white-space: nowrap;
}

.submit-dostava {
  font-size: 0.9rem;
  color: #0f766e;
  margin-bottom: 0.6rem;
}

.btn-submit {
  font-weight: 800;
  border-radius: 14px;
  min-height: 54px;
}

.btn-submit .sending-label {
  display: none;
}

.btn-submit.is-sending #submitLabel {
  display: none;
}

.btn-submit.is-sending .sending-label {
  display: inline;
}

/* ---------- responsive ---------- */
@media (max-width: 991.98px) {
  .summary-card {
    position: static;
    padding: 1rem;
  }

}

@media (max-width: 575.98px) {
  .shop-hero {
    padding: 1.5rem 0 1rem;
  }

  .shop-section {
    padding: 1.25rem 0 2.5rem;
  }

  .shop-card-body {
    padding: 0.75rem 0.75rem 0.85rem;
  }

  .shop-card-title {
    font-size: 0.95rem;
  }

  .shop-card-desc {
    display: none;
  }

  .shop-card-pack {
    margin-bottom: 0.5rem;
  }

  .shop-price {
    font-size: 1.15rem;
  }

  .btn-add {
    font-size: 0.88rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .qty-stepper button {
    flex-basis: 38px;
  }

  .form-block {
    padding: 1rem;
    border-radius: 16px;
  }

  .tip-box {
    padding: 0.85rem;
  }

  .checkout-steps {
    font-size: 0.78rem;
  }
}
