@import url("https://fonts.googleapis.com/css2?family=National+Park:wght@200..800&display=swap");

:root {
  --rmv-clr: rgba(226, 14, 14, 0.521);
  --prm-clr: #15d68fbe;
  --blur-clr1: rgba(44, 40, 40, 0.6);
  --grad-clr: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0)
  );
}

html,
body {
  scrollbar-width: none;
}
* {
  font-family: "Lato", sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.container {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  z-index: -10;
  background-color: black;
}

.background {
  background-image: url("https://i.pinimg.com/originals/90/70/32/9070324cdfc07c68d60eed0c39e77573.gif");
  background-size: cover;
  background-position: center;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.checkout-wrapper {
  display: flex;
  justify-content: center;
  align-items: center; /* Changed from flex-start for better stacking behavior */
  gap: 40px;
  margin-top: 5.5rem;
  padding-bottom: 2.5rem;
  flex-wrap: wrap;
}

.payment-wrapper,
.cart-wrapper {
  background-color: rgba(39, 39, 39, 0.596);
  backdrop-filter: blur(20px);
  padding: 25px;
  border-radius: 10px;
  color: whitesmoke;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  min-height: 70vh;
  transition: all 225ms ease-in-out;
}

.payment-wrapper:hover,
.cart-wrapper:hover {
  background-color: rgba(44, 40, 40, 0.33);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

.payment-wrapper {
  width: 500px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-height: 85vh;
  padding-bottom: 20px;
  max-height: 90vh + fit-content; /* Note: ' + fit-content' is not standard CSS, browser might ignore it or treat as 90vh */
  align-items: center;
  position: relative;
}

.cart-wrapper {
  min-height: 85vh;
  overflow-y: auto;
  max-height: 85vh;
  width: 400px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cart-wrapper::-webkit-scrollbar {
  width: 8px;
}

.cart-wrapper::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.cart-wrapper::-webkit-scrollbar-thumb {
  background-color: var(--prm-clr, #15d68fbe);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.cart-wrapper::-webkit-scrollbar-thumb:hover {
  background-color: #00ff37;
}

.cart-wrapper {
  scrollbar-width: thin;
  scrollbar-color: var(--prm-clr, #15d68fbe) rgba(0, 0, 0, 0.1);
}

button {
  background-color: var(--prm-clr);
  border: none;
  color: rgb(255, 230, 230);
  border-radius: 5.25px;
  padding: 5px 8.5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

input::placeholder {
  text-align: center;
  font-weight: medium;
}

input {
  font-size: 18px;
  padding: 8px;
  border: none;
  outline: none;
  border-radius: 10.5px;
  width: 100%;
  box-shadow: 0 2px 8px rgba(44, 40, 40, 0.15),
    0 1.5px 3px rgba(8, 255, 24, 0.08);
  transition: box-shadow 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 225ms ease-in-out;
}
input:focus {
  box-shadow: 0 4px 25px rgba(0, 255, 85, 0.356),
    0 2px 8px rgba(44, 40, 40, 0.18);

  outline: none;
}
input[type="tel"] {
  text-align: center;
}
input[placeholder="Delivery Address"] {
  text-align: center;
}
input[placeholder="CVV"],
input[placeholder="MM/YY"] {
  text-align: center;
}
input[placeholder="CVV"] {
  width: 10px; /* This is very small and might cause issues */
}
.in-area-row {
  display: flex;
  gap: 15px;
  width: 100%; /* Ensure it takes full width of parent */
}

fieldset {
  border: 1px solid rgb(255, 253, 251);
  border-radius: 8px;
  padding: 15px;
  margin: 10px 0;
  width: 100%;
}

legend {
  color: black;
  background-color: rgb(253, 251, 248);
  border-radius: 10px;
  font-size: 16px;
  padding: 0 10px;
}

.card-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card-details input {
  flex: 1;
  min-width: 0;
  align-self: center;
}
.mm-yy-cvv-row {
  display: flex;
  gap: 15px;
  width: 100%;
}

.cart-items-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 12px;
  border-radius: 6px;
  font-weight: bold;
  gap: 15px;
  transition: all 225ms ease-in-out;
}
.cart-item:hover {
  background-color: rgba(17, 16, 16, 0.192);
}

.item-name {
  flex-grow: 1;
  word-break: break-word;
  line-height: 1.4;
}

.item-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 120px;
}

.item-controls .price-tag {
  color: #ffffff;
  font-size: 0.95em;
  padding-bottom: 4px;
  text-align: center;
}
.item-controls .remove-btn {
  font-weight: bold;
  background-color: var(--rmv-clr);
  padding: 4px 10px;
  font-size: 0.9em;
  border-radius: 4px;
  text-align: center;
  min-width: 90px;
}

.remove-btn {
  font-weight: 800;
  background-color: var(--rmv-clr);
}
.remove-btn:hover {
  background-color: rgba(244, 13, 13, 0.753);
}

#ic {
  transition: all 225ms ease-in-out;
}
#ic:hover {
  color: var(--prm-clr);
}

.in-area-row-column {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-direction: column;
  flex: 1; /* Allow columns to share space */
  min-width: 0; /* Prevent overflow in flex containers */
}

.secure {
  font-size: 12px;
  font-weight: bolder;
  margin-top: auto;
  padding-top: 10px;
  text-align: center;
  width: 100%;
  flex-shrink: 0;
}

.payment-header {
  margin-bottom: 10px;
}
.pay-btn:hover {
  background-color: #00ffa1bf;
}

i.bx-minus-circle {
  color: var(--rmv-clr);
  transition: all 150ms ease-in-out;
  font-size: 26px;
  line-height: 1;
}
i.bx-minus-circle:hover {
  color: rgba(226, 14, 14, 0.89);
  cursor: pointer;
}
i.bx-plus-circle {
  transition: all 150ms ease-in-out;
  color: var(--prm-clr);
  font-size: 26px;
  line-height: 1;
}
i.bx-plus-circle:hover {
  cursor: pointer;
  color: #00ff37;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quantity {
  min-width: 20px;
  text-align: center;
  font-size: 1.1em;
  line-height: 1;
}
.total-section {
  transform: translateY(-35%);
  margin-top: 20px;
  padding: 15px;
  border-radius: 15px;
  color: whitesmoke;
  background-color: rgba(39, 39, 39, 0.596);
  backdrop-filter: blur(15px);
  transition: all 225ms ease-in-out;
  /* border-top: 1px solid rgba(255, 255, 255, 0.418); */
}
.total-section:hover {
  background-color: rgba(44, 40, 40, 0.33);
  backdrop-filter: blur(25px);
}
.total-row {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
  font-weight: bold;
}

button[type="submit"].pay-btn {
  margin-bottom: 10px;
  margin-top: 10px;
  width: 55px;
}

.remove-all-btn {
  align-self: center;
  width: 50%;
  padding: 7px 10px;
  max-width: 350px;
  font-weight: bold;
  transition: all 125ms ease-in-out;
  background-color: rgba(226, 14, 14, 0.3);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.9);
}

.remove-all-btn:hover {
  background-color: rgba(226, 14, 14, 0.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  color: rgb(255, 255, 255);
}
.cart-wrapper-header {
  text-align: center;
}
.return-btn {
  color: rgba(255, 255, 255, 0.9);
  background-color: rgba(17, 73, 158, 0.3);
  backdrop-filter: blur(10px);
  width: 170px;
  padding: 7px 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: all 125ms ease-in-out;
  align-self: center;
  font-weight: 700;
  margin-top: 10px;
}

.return-btn:hover {
  color: rgb(255, 255, 255);
  background-color: rgba(17, 73, 158, 0.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.price-tag {
  color: #ffffff;
  padding: 0.25rem;
  border: 1px solid white;
  border-radius: 100px;
  padding-left: 0.7em;
  padding-right: 0.7em;
  background-color: rgb(44 40 40 / 22%);
}

.payment-error {
  color: #ff6b6b;
  font-size: 0.9em;
  text-align: center;
  width: 100%;
  padding: 8px;
  background-color: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 4px;
  margin-bottom: 10px;
}

.empty-cart-message {
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}

#shield-icon {
  --fa-animation-duration: 2.5s;
  font-size: 1.5em;
  color: var(--prm-clr, #15d68fbe);
  margin-top: 5px;
  flex-shrink: 0;
}

/* --- START OF RESPONSIVE STYLES --- */

/* Medium devices (tablets, etc., less than 992px) */
@media (max-width: 991.98px) {
  .checkout-wrapper {
    flex-direction: column;
    align-items: center;
    margin-top: 2.5rem;
    gap: 25px;
  }

  .payment-wrapper,
  .cart-wrapper {
    width: 90%;
    max-width: 550px; /* Constrain max width for larger of small screens */
    min-height: auto; /* Allow height to adjust to content */
    max-height: none; /* Remove fixed vh max-height */
  }

  .cart-wrapper {
    max-height: 70vh; /* Still allow cart to scroll, but less aggressively */
  }

  .total-section {
    width: 90%;
    max-width: 550px;
    transform: translateY(0); /* Reset vertical transform */
    margin-top: 0; /* Gap handled by checkout-wrapper */
  }
}

/* Small devices (landscape phones, small tablets, less than 768px) */
@media (max-width: 767.98px) {
  .checkout-wrapper {
    margin-top: 1.5rem;
    padding-bottom: 1.5rem;
    gap: 20px;
  }

  .payment-wrapper,
  .cart-wrapper,
  .total-section {
    width: 95%;
    padding: 20px;
  }

  .payment-wrapper {
    gap: 12px;
  }

  .cart-wrapper {
    max-height: 60vh;
  }

  .in-area-row {
    flex-direction: column;
    gap: 12px;
  }
  .in-area-row .in-area-row-column {
    width: 100%;
  }
  .in-area-row .in-area-row-column input {
    width: 100%;
  }

  .mm-yy-cvv-row {
    /* Could stack if needed, but let's try to keep them in a row with flex properties */
  }
  .mm-yy-cvv-row input[placeholder="MM/YY"] {
    flex-grow: 1; /* Allow MM/YY to take more space */
  }
  .mm-yy-cvv-row input[placeholder="CVV"] {
    width: 80px; /* Override the 10px width to be usable */
    flex-grow: 0;
    flex-shrink: 0;
  }

  fieldset {
    padding: 12px;
  }

  .item-controls {
    min-width: 100px;
    gap: 6px;
  }
  .item-controls .remove-btn {
    min-width: 80px;
    padding: 5px 8px;
  }

  .removeall-return-row {
    display: flex;
    flex-direction: column; /* Stack buttons */
    gap: 10px;
    align-items: center; /* Center stacked buttons */
  }
  .remove-all-btn,
  .return-btn {
    width: 80%; /* Make buttons take more width */
    max-width: 280px; /* But cap their max width */
  }

  button {
    padding: 8px 12px;
    font-size: 15px;
  }
  button[type="submit"].pay-btn {
    width: 120px; /* Give Pay button a bit more width */
  }

  input {
    font-size: 16px;
    padding: 10px;
  }

  h2.payment-header,
  h2.cart-wrapper-header {
    font-size: 1.3rem;
  }

  .total-row span {
    font-size: 0.95rem;
  }

  .secure {
    font-size: 11px;
  }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
  .checkout-wrapper {
    gap: 15px;
    margin-top: 1rem;
  }

  .payment-wrapper,
  .cart-wrapper,
  .total-section {
    padding: 15px;
    width: 95%; /* Ensure it doesn't touch screen edges */
  }
  .cart-wrapper {
    max-height: 55vh;
  }

  .cart-item {
    flex-direction: column;
    align-items: stretch; /* Make children of cart-item full width */
    gap: 10px;
  }
  .item-name {
    text-align: center;
    margin-bottom: 5px;
  }
  .item-controls {
    align-items: center; /* Center the controls block */
    width: 100%;
  }
  .quantity-control {
    justify-content: center;
  }

  .mm-yy-cvv-row input[placeholder="CVV"] {
    width: 70px; /* Slightly adjust for very small screens if needed */
  }

  button[type="submit"].pay-btn {
    width: 100px;
    padding: 10px 15px; /* Better touch target */
  }
  .remove-all-btn,
  .return-btn {
    font-size: 0.9rem;
    padding: 8px 10px;
  }

  legend {
    font-size: 15px;
  }
  input {
    font-size: 15px;
  }
  h2.payment-header,
  h2.cart-wrapper-header {
    font-size: 1.2rem;
  }
}

/* --- END OF RESPONSIVE STYLES --- */

/* Page Finished at 01:12AM at 2025-05-8 By HumanAhmed :)*/
