*, *::before, *::after {
  box-sizing: border-box;
}


/* ---------------------- Form styling for login, register, etc. -------------------- */
.form-container {
  border-radius: 5px;
  padding: 20px;
  height: 90%;
  margin-bottom: 2rem;
}
.message-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.alert {
    padding: 15px 25px;
    background-color: #f44336;
    color: white;
    border-radius: 5px;
    font-family: sans-serif;
    font-size: 16px;
    max-width: 400px;
    text-align: center;
}
.login-form {
  margin: auto;
  padding: 1rem;
  width: 80%;
  max-width: 500px;
  border: var(--brand-brown) 1px solid;
}
.login-form h1
.register-form h1
.customer-profile-form h1 {
  text-align: center;
  margin-bottom: 3rem !important;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--brand-brown);
  border-radius: 4px;
  resize: vertical;
}
.button-cypress {
  width: 25%;
  background-color: #2d221e;
  color: white;
}
.br {
  margin: -15px;
  padding: -15px;
}

label {
  padding: 12px 12px 12px 0;
  display: inline-block;
}

input[type="submit"] {
  background-color: var(--brand-brown);
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  float: right;
  width: 170px !important;
}

.button {
 
  background-color: var(--brand-brown);
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s ease;
  margin: 1rem 0;
}
.text-link {
  text-decoration: none;
  cursor: pointer;
}
.button:hover {
  background-color: var(--background-off-white);
  border: solid 2px var(--brand-brown);
  transform: scale(1.2);
  color: var(--brand-brown);
}
.register-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  max-width: 600px!important;
  margin: 0 auto;
  padding: 1rem;
  width: 80%;
  max-width: 900px;
  height: 90%;
  border: var(--brand-brown) 1px solid;
}

.flex {
  display: flex;
  justify-content: space-between;
}
.register {
  display: block;
  margin-top: 1rem;
  margin-left: 4rem;
}
.forgot {
  display: block;
  margin-top: 1rem;
}
.margin-10 {
  margin-bottom: 25px !important;
}
.col-50 {
  width: 35%;
}
.login-options {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
}
.box {
  padding: 7px;
  background-color: #f9f9f9;
  border: 1px solid #2d221e;
  box-shadow: #0d0c0c 0px 2px 5px;
  border-radius: 5px;
  margin: 5px 20px;
}
.box a {
  color: #2d221e;
  text-decoration: none;
}
.col-35 {
  float: left;
  width: 35%;
  margin-top: 6px;
}

.col-65 {
  float: left;
  width: 65%;
  margin-top: 6px;
}

/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}

/* Responsive layout - when the screen is less than 600px wide, make the two columns stack on top of each other instead of next to each other */

  .col-35,
  .col-65,
  input[type="submit"] {
    width: 100%;
    margin-top: 0;
  }

.contact-box-wrapper {
  display: flex;
  flex-direction: column;
  width: 80vw;
  margin: auto;
  gap: 1rem;
}
.contact-form {
  display: flex;
  flex-direction: column;
  width: 80vw;
  margin: auto;
  gap: 1rem;
}
.contact-item {
  border: solid 1px var(--brand-brown);
  padding: 1em;
  margin-bottom: 2rem;
}
.contact-form-area .section-header h2,
.contact-form-area .section-header p {
  text-align: center;
}
.contact-title {
  font-size: 1rem;
}

@media screen and (min-width: 850px) {
  .contact-box-wrapper {
    max-width: 950px;
    flex-direction: row;
    justify-content: space-between;
    width: 90vw;
    margin: auto;
  }
.contact-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.contact-icon {
 font-size: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
}

label {
  margin-bottom: 0.5rem;
  font-weight: bold;
}

#textarea {
  width: 450px !important;
  max-width: 95vw;
   border: 1px solid #949292;
  border-radius: 4px;
}
}

.full-width {
  grid-column: 1 / -1; /* spans all columns */
}


/* Cart Page Checkout Table Start ----------------------------- */
.checkout-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.checkout-table {
  width: 100%;
  border-collapse: collapse;
}
.cart-form-qty button {
  border: none!important;
}
input.qty-input {
  text-align: center;
}
button.qty-btn {
  width: 20px;
  background-color: white;
  border: none!important;
}

button.qty-btn img {
  width: 15px;
}

.cart-form-qty {
  display: flex;
  flex-wrap: nowrap;
}
.remove-button {
  margin-top: 1em;
}

/* Cart Page Checkout Table End ----------------------------- */

/* ---------------------------- Start of Checkout Page ------------------------------- */
/* Parent = checkout_grid | child = check-out-form and checkout-summary-area which has two childs mini-cart & cart-total-box */
.customer-info {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  text-align: center;
}
.shipping-address-area {
  max-width: 600px;
  text-align: center;
  margin: auto;
}
.mini-cart-item {
  display: block;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ccc;
}

.mini-cart {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.mini-img {
  width: 80px;
  height: auto;
  object-fit: cover;
}

.mini_details {
  flex: 1;
}



.check-out-form {
  max-width: 600px;
  margin: auto;
  padding: 1rem;
  display: grid;
  gap: 1rem;
  font-family: sans-serif;
}
.checkout-out-form .form-group,
.checkout-out-form .check-out-button {
  display: flex;
  flex-direction: column;
}
.check-out-button {
  background-color: var(--brand-brown) !important;
  color: white;
  width: 250px;
  padding: 5px;
  place-self: center; /* centers both horizontally and vertically */
  align-self: end; /* pushes item to the bottom of its grid area */
}
label {
  margin-bottom: 0.3rem;
  font-weight: bold;
}
/* 📱 Responsive layout for wider screens */
@media (min-width: 600px) {
  .check-out-form {
    grid-template-columns: 1fr 1fr;
  }
}

.back-to-cart {
  grid-column: span 2;
  color: #f0686e;
  text-decoration: underline;
  margin-left: 2rem;
}

.checkout_login a {
  text-align: center;
  margin: auto;
  max-width: 80vw;
  color: black;
  text-decoration: none;
}

.login_link {
  color: red;
  font-weight: bold;
  text-decoration: none;
}

.check_button {
  background-color: var(--brand-brown);
  color: white;
  padding: 5px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 120px !important;
  transition: transform 0.3s ease;
  margin-top: 1rem;
  font-size: 12px;
}

.check_button:hover {
  background-color: var(--background-off-white);
  border: solid 2px var(--brand-brown);
  transform: scale(1.1);
  color: var(--brand-brown);
}
.checkout-main {
  display: flex;
  flex-direction: column;
  margin: auto;
  padding: 1rem;
}
.checkout-total h5,
.checkout-total h6 {
  font-size: 17px;
}
.mt-10 {
  margin: 1rem auto;
}
.checkout_grid {
  display: flex;
  flex-direction: column;
    margin: auto;
  gap: 5px;
  margin-bottom: 2em;
  width: 95vw;
  place-items: center;
}
@media (min-width: 600px) {
.checkout_grid {
flex-direction: row;


}
}
.mini-img {
  grid-area: mini_photo;
  width: 150px;
  height: auto;
  object-fit: contain;
}

.mini-product-title a {
  grid-area: mini_title;
  color: black;
  font-size: 16px;
  text-decoration: none;
}

.mini-product-price {
  margin-bottom: 1rem;
}
.payment {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media only screen and (min-width: 600px) {
  .payment {
    width: 400px;
    flex-direction: row;
    gap: 20px;
    margin-bottom: 2rem;
  }
  .checkout_grid {
    max-width: 600px;
    grid-template-columns: 400px 300px;
    margin-bottom: 2rem;
    grid-template-areas:
      "title title"
      "summary total";
  }

  .checkout_grid h2 {
    text-align: center;
    margin-bottom: 2rem;
    grid-area: title;
  }

  .checkout-total {
    grid-area: total;
  }

  .mini-cart {
    grid-area: summary;
  }

  .mini-img {
    grid-area: mini_photo;
    width: 75px;
  }
}

@media only screen and (min-width: 900px) {
  .checkout_grid {
    width: 80vw;
    grid-template-columns: 4fr 2fr 2fr;
    grid-template-areas:
      "title title title"
      "summary total";
    padding: 10px;
    gap: 2rem;
  }
}
/* customer profile */
.customer-page-content {
  display: flex;
  flex-direction: column;
  max-width: 850px;
  margin: auto;
}
h1.profile-title {
  font-size: 1.2rem;
  margin: 2rem auto;


}

.customer-profile-form .form-grid {
    display: grid;
    max-width: 400px;
    margin: auto;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.customer-profile-form .form-group {
    display: flex;
    flex-direction: column;
}

.customer-profile-form .form-group.full-row {
    grid-column: 1 / -1;
}


@media (min-width: 768px) {
    .customer-profile-form .form-grid {
        grid-template-columns: 1fr 1fr;
        max-width: 800px;

    }
}
.table-container {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.order-table {
    width: auto;
    max-width: 100%;
    border-collapse: collapse;
}
.layout {
    display: flex;
}

.layout main {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.order-table th,
.order-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

.order-table th {
  background-color: #f2f2f2;
  font-weight: bold;
}

.order-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.order-table tr:hover {
  background-color: #e6f7ff;
}

/* Mobile responsiveness */
@media screen and (max-width: 600px) {
  .order-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  width: 100%;
  margin-bottom: 1rem;
}

.order-table {
  width: 100%;

}
}

.pagination .link.active {
    font-weight: bold;
    color: #000;
    border-bottom: 2px solid #000;
}

.pagination .link.disabled {
    pointer-events: none;
    opacity: 0.5;
}
.invoice-container {
  display: flex;
  flex-direction: column;
  border: solid 1px grey;
  border-radius: 5px;
  padding: 1rem;
  margin: 2rem auto;
  max-width: 900px;
} 
.invoice-middle-flex {
  display: flex;
  flex-direction: column;
  padding-top: 2rem;
  border-top: solid 1px grey;
  padding-bottom: 2rem;
  border-bottom: grey solid 1px;
  gap: 2rem;
} 
@media screen and (min-width: 700px) {
  .invoice-middle-flex {
    flex-direction: row;
    justify-content: space-between;
  }
}

.invoice-item th,
.invoice-item td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    vertical-align: top;
    word-wrap: break-word;
}

.invoice-item th {
    background-color: #f9f9f9;
    font-weight: bold;
}
.invoice-item th:nth-child(1),
.invoice-item td:nth-child(1) {
    width: 5%;
    text-align: center;
}

.invoice-item th:nth-child(2),
.invoice-item td:nth-child(2) {
    width: 45%;
}

.invoice-item th:nth-child(3),
.invoice-item td:nth-child(3),
.invoice-item th:nth-child(4),
.invoice-item td:nth-child(4),
.invoice-item th:nth-child(5),
.invoice-item td:nth-child(5) {
    width: 15%;
    text-align: right;
}
.invoice-item tfoot {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
}