@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato/Lato-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins/Poppins-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: light;
}

@font-face {
  font-family: 'Prata';
  src: url('../fonts/Prata/Prata-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

/* ==============================
   Global Reset & Base Styles
   ============================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Poppins', sans-serif;
  background: #fffcfa;
  color: #333;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==============================
   Breadcrumbs
   ============================== */
#breadcrumbs {
  width: 100%;
  font-size: 16px;
  color: #666;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 20px 0 0 50px;
}

#breadcrumbs::-webkit-scrollbar {
  display: none;
}

#breadcrumbs a {
  color: #333;
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

#breadcrumbs a:hover {
  color: #000;
  text-decoration: underline;
}

#breadcrumbs span {
  color: #6b6b6b;
  flex-shrink: 0;
}

#breadcrumbs span:last-child {
  display: inline-block;
  max-width: 160px;   /* adjust as needed */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

/* ==============================
   Product Grid & Page
   ============================== */
#product-grid {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 40px 20px;
}

/* Product page card */
.product-page {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 1200px;
  background-color: #fff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  gap: 40px;
}

/* Product image */
.product-page img {
  width: 500px;
  height: 500px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  display: block;
  margin: 0 auto;
}

/* Product text */
.product-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  gap: 20px;
  padding: 60px 20px 60px 20px;
}

.product-text h1 {
  font-size: 2rem;
  color: #2c3e50;
}

.product-text p {
  font-size: 1rem;
  color: #34495e;
}

/* ==============================
   Prev/Next Buttons
   ============================== */
.nav-buttons {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 1rem;
  font-size: 1.2rem;
  z-index: 3;
}

.nav-buttons button {
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 20px;
  padding: 0.4rem 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  color: #333;
}

.nav-buttons button:hover {
  background: #666;
  color: #fff;
  border-color: #666;
}

/* ==============================
   Back to Shop Link
   ============================== */
.back-link {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.7rem 1.5rem;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.95rem;
  border: 1px solid #bbb;
  background: #fff;
  color: #333;
  transition: all 0.25s ease;
}

.back-link:hover {
  background: #666;
  color: #fff;
}

/* ==============================
   Size Selector
   ============================== */
.product-sizes {
  margin: 1.5em 0;
}

.product-sizes h4 {
  font-size: 1rem;
  margin-bottom: 0.8em;
  font-weight: 500;
  color: black;
}

.product-sizes label {
  display: inline-block;
  margin-right: 10px;
  cursor: pointer;
}

.product-sizes input[type="radio"] {
  display: none;
}

.product-sizes input[type="radio"] + span {
  display: inline-block;
  padding: 0.6em 1.2em;
  font-size: 0.95rem;
  border: 1px solid #bbb;
  border-radius: 20px;
  background: #fff;
  color: #333;
  transition: all 0.25s ease;
  user-select: none;
}

.product-sizes input[type="radio"]:checked + span {
  background: #666;
  color: #fff;
  border-color: #666;
}

.product-sizes input[type="radio"]:hover + span {
  border-color: #333;
}

/* ==============================
   Color Selector
   ============================== */
.product-colors label {
  display: inline-block;
  margin-right: 10px;
  cursor: pointer;
}

.product-colors input[type="radio"] {
  display: none;
}

.color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #ccc;
  display: inline-block;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.color-option {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 10px;
}

.color-name-display {
  margin-top: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  color: #333;
}

.swatches {
  margin-top: 10px;
}
input[type="radio"]:checked + .color-swatch {
  border-color: #333;
  transform: scale(1.15);
}

/* ==============================
   Responsive Layout
   ============================== */
@media (max-width: 1024px) {
  .product-page {
    max-width: 900px;
  }
  .product-page img {
    width: 400px;
    height: 400px;
  }
}

@media (max-width: 768px) {
  .product-page {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  .product-page img {
    width: 300px;
    height: 300px;
  }
  .product-text {
    width: 100%;
  }
  .product-text h1 {
    font-size: 1.5rem;
  }
  .product-text p {
    font-size: 1rem;
    text-align: justify;
  }
  .nav-buttons {
    position: static;       
    justify-content: center;      
    font-size: 1.8rem;      
    margin-bottom: 5px;
  }
  #breadcrumbs {
    flex-wrap: nowrap;
    gap: 4px;
    font-size: 15px;
    text-align: center;
    padding: 30px 5px 0 5px;
  }
}

@media (max-width: 500px) {
  .product-page img {
    width: 250px;
    height: 250px;
  }

  .product-text {
    padding-top: 10px;
    width: 100%; /* make it fluid */
    padding-left: 15px;
    padding-right: 15px;
  }

  .product-text p {
    font-size: 0.95rem;
    text-align: justify;        
    text-align-last: left;        
    line-height: 1.6;           
    width: 100%;               
  }

  .product-text h1 {
    font-size: 1.2rem;
    text-align: center;
    line-height: 1.4;
    width: 100%;                
  }

  .product-page {
    padding: 10px;
  }

  #product-grid {
    padding: 10px;
  }

  #breadcrumbs {
    padding-top: 10px;
    font-size: 0.85rem;
  }

  .product-sizes h4 {
    font-size: 0.95rem;
  }

  .product-sizes input[type="radio"] + span {
    font-size: 0.85rem;
  }

  .product-sizes {
    margin-bottom: 0;
  }

  .back-link {
    font-size: 0.85rem;
    margin-bottom: 5px;
  }
}
/* Purchase note */
.purchase-note {
  font-size: 0.95rem;
  color: #666;
  margin: 0.8rem 0;
}
.purchase-note a {
  color: #7a6a60;
  text-decoration: underline;
}
