/* ===== CART STRANICA (BLAGAJNA) ===== */

.cart-page {
  min-height: 100vh;
  background: var(--bg);
  padding: 120px 16px 40px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Vanjski peach okvir */
.cart-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  background: linear-gradient(160deg, #fff 0%, #f1d1c5 100%);
  border-radius: 1.2rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  padding: 22px 22px 24px;
  box-sizing: border-box;
}

/* Naslov "Blagajna" – centriran */
.cart-title {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 700;
  color: #3b2626;
  text-align: center;
}

/* Bijela unutarnja kartica */
.cart-layout {
  margin-top: 12px;
  background: #ffffff;
  border-radius: 1rem;
  padding: 16px 18px 18px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Prazna košarica */
.cart-empty {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 0.7rem;
  background: #fff5f3;
  color: #7a3b3b;
  font-size: 0.9rem;
}

/* Panel s artiklima */
.cart-items-panel {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 10px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Jedan artikl */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-radius: 0.8rem;
  background: #fbf7ff;
  padding: 8px 10px;
}

.cart-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-item-img {
  width: 56px;
  height: 56px;
  border-radius: 0.8rem;
  object-fit: cover;
  background: #fbeae2;
}

.cart-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #3a2727;
}

.cart-item-price {
  font-size: 0.86rem;
  font-weight: 500;
  color: #b65c5c;
}

.cart-item-right {
  display: flex;
  align-items: center;
}

.cart-item-remove {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  color: #c06a6a;
  padding: 2px 4px;
  border-radius: 999px;
  transition: background 0.15s ease, transform 0.08s ease;
}

.cart-item-remove:hover {
  background: rgba(192, 106, 106, 0.08);
  transform: scale(1.05);
}

/* Sažetak + forma */
.cart-summary-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-summary-header h2 {
  margin: 0;
  font-size: 1.1rem;
  color: #3b2626;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: #3b2626;
}

.cart-summary-row span:last-child {
  font-size: 1rem;
  color: #b65c5c;
}

.cart-summary-actions {
  margin-top: 6px;
}

.cart-divider {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 10px 0 8px;
}

/* Podaci kupca */
.cart-customer-block {
  margin-top: 4px;
}

.cart-customer-title {
  font-size: 1.1rem;
  margin: 0 0 4px;
  color: #3b2626;
}

.cart-customer-status {
  font-size: 0.85rem;
  color: #6c4c4c;
  margin: 0 0 8px;
}

.cart-customer-form {
  margin-top: 4px;
}

.cart-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

.cart-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cart-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #4a2f2f;
}

.cart-field input {
  border-radius: 0.7rem;
  border: 1px solid rgba(0, 0, 0, 0.14);
  padding: 7px 9px;
  font-size: 0.9rem;
  outline: none;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.cart-field input:focus {
  border-color: #b65c5c;
  box-shadow: 0 0 0 1px rgba(182, 92, 92, 0.25);
  background: #fffdfb;
}

/* Gumb dovrši narudžbu */
.cart-submit-btn {
  margin-top: 10px;
  width: 100%;
  display: inline-flex;
  justify-content: center;
}

/* Responsivno */
@media (max-width: 768px) {
  .cart-page {
    padding: 110px 10px 32px;
  }

  .cart-container {
    padding: 18px 14px 18px;
    border-radius: 1rem;
  }

  .cart-layout {
    padding: 14px 12px 16px;
  }

  .cart-form-grid {
    grid-template-columns: 1fr;
  }

  .cart-item {
    align-items: flex-start;
  }
}
.cart-proof-hint {
  margin-top: 1.5rem;
  max-width: 720px;
  line-height: 1.5;
  font-size: 0.95rem;
  color: #4a2b2b;
}

.cart-confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* da oba gumba izgledaju lijepo jedan do drugog */
.cart-confirmation-actions .btn-primary,
.cart-confirmation-actions .btn-secondary {
  flex: 0 0 auto;
}

/* zeleni gumb "Dodaj potvrdu" */
.btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  border-radius: 999px;
  background: #2e7d32;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #1b5e20;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
/* === Status narudžbe – kupac === */

.customer-status-wrapper {
  margin-top: 1.2rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: #fff7fb;
  border: 1px solid #f0d3f2;
}

.customer-status-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #5b2f73;
  margin-bottom: 0.5rem;
}

.order-status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.order-status-pills .status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid #d5bfdc;
  background: #faf3ff;
  color: #5b2f73;
}

.order-status-pills .status-pill--active,
.order-status-pills .status-pill.status-pill--active {
  background: #4caf50;
  color: #fff;
  border-color: #4caf50;
}
/* ==== Dostava – kartice ==== */
.shipping-options {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.shipping-card {
  flex: 1 1 240px;
  padding: 1rem 1.25rem;
  border: 2px solid #e7d3e9;
  border-radius: 14px;
  background: #faf6fc;
  cursor: pointer;
  transition: all 0.2s ease;
}

.shipping-card:hover {
  border-color: #c59ad1;
  background: #f5ecfa;
}

.shipping-card.active {
  border-color: #8a4fa3;
  background: #f3e5ff;
  box-shadow: 0 0 0 3px rgba(138, 79, 163, 0.15);
}

.shipping-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #5b2f73;
}

.shipping-price {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: #333;
}
.btn-primary {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  background: #a74e9b;          /* ljubičasta */
  color: #fff !important;
  border: none;
  border-radius: 40px;          /* kao zeleni */
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.1s ease;

  width: auto !important;       /* makne onu veliku širinu */
  max-width: fit-content;       /* drži se prirodne veličine */
}
.btn-primary:hover {
  background: #8f3f83;
}
.btn-primary:active {
  transform: scale(0.96);
}
.btn-primary:disabled {
  background: #c9a8c5;
  cursor: not-allowed;
}

.delivery-info-btn {
  display: block;
  margin: 12px auto 22px auto; /* centriran */
  background: #b04ca5;
  color: #fff;
  padding: 7px 22px;
  border: none;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  width: fit-content;       /* <<< gumb se sužava prema tekstu */
  min-width: 180px;         /* <<< da ne bude premali */
  text-align: center;
  transition: opacity 0.2s ease;
}

.delivery-info-btn:hover {
  opacity: 0.85;
}

/* ===== Modal: Informacije o dostavi ===== */

.delivery-modal {
  position: fixed;
  inset: 0;
  display: none;               /* sakriveno dok je zatvoren */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.delivery-modal--open {
  display: flex;
}

.delivery-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.delivery-modal__dialog {
  position: relative;
  z-index: 1;
  max-width: 420px;
  width: 90%;
  background: #fff;
  border-radius: 18px;
  padding: 1.4rem 1.6rem 1.2rem;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  font-size: 0.95rem;
}

.delivery-modal__dialog h2 {
  margin: 0 0 0.6rem 0;
  font-size: 1.1rem;
  color: #5b2f73;
}

.delivery-modal__dialog p {
  margin: 0 0 0.45rem 0;
  color: #444;
}

.delivery-modal__note {
  font-size: 0.8rem;
  color: #777;
  margin-top: 0.3rem;
}

.delivery-modal__close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  color: #999;
}

.delivery-modal__close:hover {
  color: #555;
}

.delivery-modal__ok {
  margin-top: 0.8rem;
  display: inline-block;
  background: #b04ca5;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.delivery-modal__ok:hover {
  opacity: 0.9;
}

