/* ================= CART SIDEBAR ================= */


.cart-sidebar {
  position: fixed;
  top: 80px;
  right: -420px;
  width: 400px;
  max-width: 90%;
  height: calc(100vh - 80px);
  background: #fff;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  transition: 0.4s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.active {
  right: 0;
}

.cart-sidebar.active {
  right: 0;
}

/* ================= OVERLAY ================= */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 999;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ================= CART HEADER ================= */

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px;
  border-bottom: 1px solid #eee;
}

.cart-header h2 {
  color: #c1121f;
}

.close-cart {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
}

/* ================= CART BODY ================= */

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 25px;
}

.empty-cart {
  text-align: center;
  color: #777;
  margin-top: 80px;
}

/* ================= CART ITEM ================= */

.cart-item {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: 0.3s ease;
}

.cart-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.cart-item p {
  font-size: 18px;
  font-weight: 600;
  color: #222;
}

.cart-item .price {
  font-size: 17px;
  color: #777;
  font-weight: 500;
}

/* ================= QUANTITY ================= */

.qty-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-controls button {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #c1121f;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.25s;

  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.qty-controls button:hover {
  background: #a31212;
}

.qty-controls input {
  width: 60px;
  height: 38px;
  border: 1px solid #ddd;
  border-radius: 10px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  outline: none;
}

/* ================= REMOVE ================= */

.remove-btn {
  width: 42px;
  height: 42px;
  align-self: flex-end;
  border: none;
  border-radius: 12px;
  background: #f8d7da;
  color: #c1121f;
  cursor: pointer;
  transition: 0.3s;
}

.remove-btn:hover {
  background: #c1121f;
  color: #fff;
}

/* ================= FOOTER ================= */

.cart-footer {
  padding: 25px;
  border-top: 1px solid #eee;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 22px;
  font-weight: 700;
}

.checkout-btn {
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: 15px;
  background: #c1121f;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s;
}

.checkout-btn:hover {
  background: #a31212;
}

/* ================= CHECKOUT MODAL ================= */

.checkout-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);

    display: flex;
    justify-content: center;
    align-items: flex-start;

    padding: 100px 20px 30px;
    overflow-y: auto;
    box-sizing: border-box;

    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;

    z-index: 2000;
}

.checkout-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.checkout-box {
    background: #fff;
    width: 100%;
    max-width: 500px;

    padding: 35px;
    border-radius: 22px;

    box-shadow: 0 25px 60px rgba(0, 0, 0, .18);

    transform: scale(.95);
    transition: transform .3s ease;
}

.checkout-modal.show .checkout-box {
    transform: scale(1);
}

/* ================= TITLE ================= */

.checkout-box h2 {
    text-align: center;
    color: #c1121f;
    font-size: 30px;
    margin-bottom: 25px;
}

/* ================= INPUTS ================= */

.checkout-box input,
.checkout-box textarea {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 15px;

    border: 1px solid #ddd;
    border-radius: 10px;

    font-size: 16px;
    font-family: inherit;

    outline: none;
    transition: .25s;
    box-sizing: border-box;
}

.checkout-box input:focus,
.checkout-box textarea:focus {
    border-color: #c1121f;
    box-shadow: 0 0 0 3px rgba(193,18,31,.12);
}

.checkout-box textarea {
    resize: vertical;
    min-height: 100px;
}

/* ================= SUMMARY ================= */

.checkout-summary {
    margin: 20px 0;
    padding: 18px;

    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #eee;
}

.checkout-summary p {
    margin: 8px 0;
    font-size: 16px;
}

.checkout-summary strong {
    font-size: 20px;
    color: #111;
}

/* ================= NOTICE ================= */

.delivery-note {
    margin-top: 12px;
    padding: 12px;
    background: #fff8e6;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

/* ================= BUTTONS ================= */

.checkout-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.checkout-actions button {
    flex: 1;
    padding: 15px;

    border: none;
    border-radius: 12px;

    font-size: 16px;
    font-weight: 600;

    cursor: pointer;
    transition: .25s;
}

#cancel-order {
    background: #f3f4f6;
    color: #444;
}

#cancel-order:hover {
    background: #e5e7eb;
}

#send-order {
    background: #25D366;
    color: white;
}

#send-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37,211,102,.35);
}

.hidden {
    display: none;
}


/* ================= PLACE ORDER BUTTON ================= */

#place-order-btn {
  width: 100%;
  margin-top: 25px;
  padding: 18px 24px;

  border: none;
  border-radius: 16px;

  background: linear-gradient(135deg, #25d366, #1ebe5d);
  color: #fff;

  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;

  cursor: pointer;
  transition: all 0.35s ease;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;

  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.35);
}

#place-order-btn:hover {
  transform: translateY(-4px);
  background: linear-gradient(135deg, #1ebe5d, #18a84f);
  box-shadow: 0 15px 35px rgba(37, 211, 102, 0.45);
}

#place-order-btn:active {
  transform: scale(0.98);
}

#place-order-btn i {
  font-size: 22px;
}