

/* Include padding and borders in element sizes */
*,
*::before,
*::after {
  box-sizing: border-box;
}


/*HOMEPAGE*/
body {
  margin: 0;
  background: #f5f3ef;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* SHARED BUTTON STYLES */
button {
  padding: 12px 20px;
  border: 0;
  border-radius: 6px;
  background: #ffd1cc;
  color: #553e35;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: #f6b8b2;
}

button:focus-visible {
  outline: 2px solid #3f614a;
  outline-offset: 3px;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}


/* Contact and delivery fields */
.contact-form input,
.contact-form textarea,
.delivery-details input,
.delivery-details textarea {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d8c7bc;
  border-radius: 6px;
  background: #fffaf7;
  color: #553e35;
  font: inherit;
}

.contact-form input,
.contact-form textarea {
  margin-bottom: 12px;
}


/* Main page headings */
.about > h1,
.products-heading,
.cart-page > h1 {
  color: #3f614a;
  font-family: "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  text-align: center;
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffd1cc;
  border-bottom: 2px solid #f6b8b2;
}

header nav {
  display: flex;
  align-items: center;
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 24px;
}

header nav > a:first-child {
  margin-right: auto;
}

header nav img {
  display: block;
  width: 200px;
  height: auto;
}

header nav > a:not(:first-child) {
  color: #765548;
  font-size: 20px;
  text-decoration: none;
  white-space: nowrap;
}

header nav > a:hover {
  text-decoration: underline;
}

header nav > a:focus-visible {
  outline: 2px solid #3f614a;
  outline-offset: 4px;
}

/* Smaller screens */
@media (max-width: 760px) {
  header nav {
    gap: 14px;
    padding: 10px 12px;
  }

  header nav img {
    width: 120px;
  }

  header nav > a:not(:first-child) {
    font-size: 14px;
  }
}

/* Hide the logo on phones */
@media (max-width: 480px) {
  header nav > a:first-child {
    display: none;
  }

  header nav {
    justify-content: space-between;
  }
}





/* FOOTER */
footer {
  padding: 16px 20px 12px;
  margin-top: auto;
  flex-shrink: 0;
  border-top: 2px solid #f6b8b2;
  background: #f0e6df;
  color: #5e685f;
  text-align: center;
}

footer p {
  margin: 0 0 4px;
  font-size: 14px;
}

footer .footer-brand {
  color: #3f614a;
  font-family: "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 20px;
  margin: 8px 0;
  padding: 0;
}

footer nav > a {
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  color: #765548;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 180ms ease, border-color 180ms ease;
}

footer nav > a:hover {
  color: #3f614a;
  border-bottom-color: #3f614a;
}

footer nav > a:focus-visible {
  outline: 2px solid #3f614a;
  outline-offset: 4px;
  border-radius: 2px;
}

footer > p:last-child {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid #d8c7bc;
}

footer small {
  font-size: 12px;
}

/* About Simply Blooming */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px 40px;
  max-width: 1120px;
  margin: 48px auto;
  padding: 0 24px;
}

.about > h1 {
  grid-column: 1 / -1;
  margin: 0;
  line-height: 1.3;
  letter-spacing: 0.5px;
}

.about > h1::after {
  content: "";
  display: block;
  width: 100px;
  height: 3px;
  margin: 20px auto 0;
  border-radius: 999px;
  background: #b5887a;
}

.about > p {
  margin: 0;
  color: #5e685f;
  font-size: 1.09rem; 
  line-height: 1.8;
  text-align: left;
}

.about > img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Stack the content on smaller screens */
@media (max-width: 700px) {
  .about {
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 32px auto;
  }
}

/* Featured products */
.featured {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  width: 100%;
  max-width: 800px;
  margin: 48px auto 20px;
  padding: 0 24px;
}

.featured > .product {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  border: 1px solid #eadbd3;
  border-radius: 12px;
  background: #fffaf7;
  text-align: center;
}

.featured .product > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
}

.featured .product > h2 {
  margin: 20px 0 8px;
  color: #3f614a;
  font-family: "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.3;
}

.featured .product > p {
  margin: 0 0 16px;
  color: #5e685f;
}

.featured .product > .price {
  margin-top: auto;
  color: #3f614a;
  font-size: 15px;
  font-weight: 700;
}

.featured .product > button {
  width: 100%;
}


/* Hide bouquets outside the current carousel view */
.featured > .product[hidden] {
  display: none;
}

/* Carousel navigation */
.featured-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 24px;
  margin: 0 24px 40px;
}

.featured-controls button {
  width: 140px;
  padding: 10px 16px;
  box-sizing: border-box;
}

.featured-controls a {
  color: #3f614a;
  text-underline-offset: 4px;
   flex-basis: 100%;
  text-align: center;
}

.featured-controls a:focus-visible {
  outline: 3px solid #3f614a;
  outline-offset: 4px;
}

#bouquet-status {
  flex-basis: 100%;
  margin: 0;
  color: #5e685f;
  font-size: 14px;
  text-align: center;
}


/* Stack product cards on smaller screens */
@media (max-width: 760px) {
  .featured {
    grid-template-columns: 1fr;
    margin: 32px auto 16px;
  }
}





/* PRODUCTS TAB*/

.products-heading {
  margin: 32px 24px;
}

.image-gallery {
 display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 30px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 24px;
  line-height: 1.3;}

.card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 12px;
 
}

.card-details {
  color: #5e685f;
}

.card-details h4,
.card-details .price {
  color: #3f614a;
}


/* One column on smaller screens */
@media (max-width: 900px) {
  .image-gallery {
    grid-template-columns: 1fr;
  }
}

/* Stack the image above the text on phones */
@media (max-width: 480px) {
  .card {
    grid-template-columns: 1fr;
  }

  .card > img {
    width: 100%;
    height: 240px;
    object-fit: cover;
  }

  .card button {
    width: 100%;
  }
}





/*CONTACT-PAGE TAB*/

.contact-page {
  --forest: #294b3b;
  --text: #505b52; 
  --border: #d8dfd3;
  
  max-width: 1100px;
  padding: clamp(28px, 5vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 25px 30px;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

/*tretch from the first vertical grid line to the last vertical grid line*/
.contact-page h2 {
  grid-column: 1 / -1; 
  margin: 0 0 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);

  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

.contact-page p {
  margin-top: 0;
  font-size: 17px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.contact-page .store-location {
  text-align: left;
}

.contact-page strong {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--forest);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-page a {
  color: var(--forest);
  text-decoration: underline;
  text-decoration-color: #8a9d87;
  text-underline-offset: 4px;
}

.contact-form-section {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 40px;
  padding: 24px;
  color: #5e685f;
}

.contact-form-section h2 {
  margin: 0 0 24px;
  color: #3f614a;
  font-family: "Times New Roman", serif;
  font-size: 30px;
  font-weight: 400;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-form label {
  color: #3f614a;
  font-weight: 600;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  align-self: flex-start;
}


.contact-form input:focus-visible,
.contact-form textarea:focus-visible{
  outline: 2px solid #3f614a;
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .contact-page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .contact-page {
    grid-template-columns: minmax(0, 1fr);
    margin: 24px auto;
    gap: 28px;
    border-radius: 14px;
  }

  .contact-page h2 {
    margin-bottom: 0;
  }
}





/* YOUR CART TAB */
.cart-page {
  width: 100%;
  max-width: 1100px;
  margin: 32px auto 48px;
  padding: 0 24px;
  color: #5e685f;
}

.cart-page > h1 {
  margin: 0 0 32px;
}

/* Bouquets on the left, delivery form on the right */
.cart-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 32px;
}

.cart-items {
  min-width: 0;
  display: grid;
  gap: 20px;
}

.cart-items > p {
  margin: 0;
}

.cart-items > a {
  color: #3f614a;
  text-underline-offset: 4px;
}

/* Selected bouquets */
.cart-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  padding: 20px;
  border: 1px solid #eadbd3;
  border-radius: 12px;
  background: #fffaf7;
}

.cart-item > img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item-details {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cart-item-details h2 {
  margin: 0 0 12px;
  color: #3f614a;
  font-family: "Times New Roman", serif;
  font-size: 24px;
  line-height: 1.3;
}

.cart-item-details p {
  margin: 0 0 8px;
}

.cart-item-details .cart-item-total {
  margin-bottom: 0;
  color: #3f614a;
  font-weight: 700;
}

/* Delivery form */
.delivery-details {
  min-width: 0;
  margin: 0;
  padding: 24px;
  border: 1px solid #eadbd3;
  border-radius: 12px;
  background: #fffaf7;
}

.delivery-details legend {
  max-width: 100%;
  padding: 0 8px;
  color: #3f614a;
  font-family: "Times New Roman", serif;
  font-size: 26px;
  line-height: 1.3;
}

.form-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.delivery-details label {
  color: #3f614a;
  font-weight: 600;
}


.delivery-details textarea {
  min-height: 120px;
  resize: vertical;
}

/* City and postal code */
.delivery-details .form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

/* Payment button */
#continue-payment {
  width: 100%;
}


.cart-page input:focus-visible,
.cart-page textarea:focus-visible,
.cart-page a:focus-visible {
  outline: 2px solid #3f614a;
  outline-offset: 3px;
}

/* Stack the cart and delivery form on smaller screens */
@media (max-width: 850px) {
  .cart-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .cart-page {
    padding: 0 16px;
  }

  .cart-item {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .cart-item > img {
    height: 110px;
  }

  .cart-item-details h2 {
    font-size: 21px;
  }

  .delivery-details {
    padding: 20px 16px;
  }

  .delivery-details .form-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}

/* Cart quantity and removal controls */
.cart-quantity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.cart-quantity label {
  color: #3f614a;
  font-weight: 600;
}

.cart-quantity input {
  width: 76px;
  padding: 8px;
  border: 1px solid #d8c7bc;
  border-radius: 6px;
  background: #ffffff;
  color: #553e35;
  font: inherit;
}

.remove-item {
  margin-top: 12px;
  padding: 8px 12px;
}

/* Order total */
.order-summary {
  margin: 8px 0 24px;
  padding-top: 16px;
  border-top: 1px solid #d8c7bc;
}

.order-summary p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 12px;
}

.order-summary .order-total {
  color: #3f614a;
  font-size: 20px;
  font-weight: 700;
}
