/* ========= CART TABLE STYLING ========= */
.cart_table {
  width: 100%;
  border-collapse: collapse;
  background-color: #1C1D29;
  color: #E4E4E7;
  border: 2px solid #FFD100; /* zlatni border */
  border-radius: 16px;      
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.cart_table th,
.cart_table td {
  padding: 16px 12px;
  text-align: center;
  font-size: 16px;
  vertical-align: middle;
}

.cart_table thead {
  background-color: #23253A;
  color: #FFFFFF;
  font-size: 17px;
  text-transform: uppercase;
  border-bottom: 2px solid #343544;
}

.cart_table tbody tr {
  border-bottom: 1px solid #2E2F4B;
  transition: background-color 0.2s;
}

.cart_table tbody tr:hover {
  background-color: #2E2F4B;
}

.cart_table img {
  max-width: 60px;
  border-radius: 8px;
}

.cart_table .order-total th,
.cart_table .order-total td {
  font-size: 18px;
  font-weight: bold;
  background-color: #2C2E41;
  color: #FFD100;
  border: 2px solid #FFD100; /* zlatni border */
}

/* Quantity Buttons */
.quantity-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.quantity-buttons button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.quantity-buttons .btn-minus {
  background-color: #d32f2f;
  color: white;
}

.quantity-buttons .btn-plus {
  background-color: #2e7d32;
  color: white;
}

.quantity-buttons .btn-minus:hover {
  background-color: #b71c1c;
}

.quantity-buttons .btn-plus:hover {
  background-color: #1b5e20;
}

/* Action buttons */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.action-buttons button {
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.action-buttons .delete-btn {
  background-color: #f44336;
  color: white;
}

.action-buttons .view-btn {
  background-color: #ffc107;
  color: #000;
}

.action-buttons .delete-btn:hover {
  background-color: #c62828;
}

.action-buttons .view-btn:hover {
  background-color: #ffb300;
}


.cart-service-name {
  font-weight: 700;
  color: #FFD100;
  margin-bottom: 4px;
  font-size: 17px;
}

.cart-description {
  font-size: 14px;
  color: #FFAA00;
  font-style: italic;
  line-height: 1.4;
  max-width: 300px;
  margin: 0 auto;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  transition: 0.2s ease;
}

.qty-btn.minus {
  background-color: #d32f2f;
}
.qty-btn.plus {
  background-color: #2e7d32;
}
.qty-btn.minus:hover {
  background-color: #b71c1c;
}
.qty-btn.plus:hover {
  background-color: #1b5e20;
}

.action-btn {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  border: none;
  transition: 0.2s ease;
  cursor: pointer;
}
.action-btn.remove {
  background: #f44336;
  color: white;
}
.action-btn.view {
  background: #ffc107;
  color: black;
}
.action-btn.remove:hover {
  background: #c62828;
}
.action-btn.view:hover {
  background: #ffb300;
}
.cart-service-name {
  font-weight: 700;
  color: #FFD100;
  margin-bottom: 4px;
  font-size: 17px;
}

.cart-description {
  font-size: 14px;
  color: #FFAA00;
  font-style: italic;
  line-height: 1.4;
  max-width: 300px;
  margin: 0 auto;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  transition: 0.2s ease;
}

.qty-btn.minus {
  background-color: #d32f2f;
}
.qty-btn.plus {
  background-color: #2e7d32;
}
.qty-btn.minus:hover {
  background-color: #b71c1c;
}
.qty-btn.plus:hover {
  background-color: #1b5e20;
}

.action-btn {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  border: none;
  transition: 0.2s ease;
  cursor: pointer;
}
.action-btn.remove {
  background: #f44336;
  color: white;
}
.action-btn.view {
  background: #ffc107;
  color: black;
}
.action-btn.remove:hover {
  background: #c62828;
}
.action-btn.view:hover {
  background: #ffb300;
}

/* 1) Zebra‑striping za još bolji contrast redova */
.cart_table tbody tr:nth-child(odd) {
  background-color: rgba(46, 47, 75, 0.3);
}

/* 2) Sticky header – zaglavlje ostaje na vrhu pri skrolovanju */
.cart_table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* 3) Tranzicije na hover dugmića i ikonica za mekši efekat */
.action-buttons button,
.quantity-buttons button {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.action-buttons button:hover,
.quantity-buttons button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 4) Text‑overflow ellipsis za duge opise u koloni “Service” */
.cart_description {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 5) Responsive sakrivanje kolona na mobilnim ekranima */
@media (max-width: 768px) {
  .cart_table th:nth-child(1),
  .cart_table td:nth-child(1),           /* Image */
  .cart_table th:nth-child(6),
  .cart_table td:nth-child(6) {         /* Actions */
    display: none;
  }
  .cart_table th,
  .cart_table td {
    padding: 12px 8px;
    font-size: 14px;
  }
}

/* 6) Custom scrollbar unutar .cart_table (ako ima scroll) */
.cart_table {
  overflow-x: auto;
}
.cart_table::-webkit-scrollbar {
  height: 6px;
}
.cart_table::-webkit-scrollbar-thumb {
  background: #343544;
  border-radius: 3px;
}
.cart_table::-webkit-scrollbar-track {
  background: #1C1D29;
}

/* 7) Isticanje selektovanog reda (ako ga korisnik izabere) */
.cart_table tbody tr.selected {
  background-color: #343548 !important;
}

/* 8) Variabile za boje – lakša kasnija održivost */
:root {
  --bg-dark:    #1C1D29;
  --bg-light:   #23253A;
  --accent:     #FFD100;
  --hover-dark: #2E2F4B;
}
.cart_table { background-color: var(--bg-dark); }
.cart_table thead { background-color: var(--bg-light); }
.cart_table tbody tr:hover { background-color: var(--hover-dark); }
.cart_table .order-total th,
.cart_table .order-total td { color: var(--accent); }
/* after your .cart_table border rule */
.cart_table,
.cart_table th,
.cart_table td {
  border-collapse: collapse;
}

/* remove cell borders */
.cart_table th,
.cart_table td {
  border-left: none !important;
  border-right: none !important;
}

/* keep outer border only */
.cart_table {
  border: 2px solid #FFD100;
}
.coupon {
  margin-top: 16px;
  text-align: right; /* gura ceo sadržaj udesno */
}

.coupon label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: #e6e6e6;
  font-weight: 500;
}

.coupon-inline {
  display: flex;
  justify-content: flex-end; /* input + button gurani desno */
  gap: 8px;
}

.coupon-inline input {
  width: 180px;
  background: #10131d;
  border: 1px solid #3a3f55;
  color: #fff;
  border-radius: 6px;
  padding: 8px 10px;
}

.coupon-inline button {
  background: #f1c40f;
  color: #111;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.coupon-inline button:hover {
  background: #d4ac0d;
}

.msg {
  margin-top: 6px;
  font-size: 0.85rem;
  text-align: right;
  text-decoration: none;
  text-transform: none;
}

.msg.ok { color: #2ecc71; }
.msg.error { color: #e74c3c; }


/* Precrtane bazne cene */
.cart-price .base,
.cart-total .base,
#cartTotalAmount .gt-base {
  text-decoration: line-through;
  opacity: 0.7;
  margin-right: 6px;
}

/* Finalne cene istaknute */
.cart-price .final,
.cart-total .final,
#cartTotalAmount .gt-final {
  font-weight: 600;
}

/* Sakrij kada nema popusta */
.hide { display: none; }

/* Po želji centriraj discount kolonu */
td.cart-discount { white-space: nowrap; text-align: center; }
