/*=============================================
=            CSS VARIABLES & RESET            =
=============================================*/
:root {
  --clr-bg: #fff;
  --clr-primary: #333;
  --clr-secondary: #555;
  --clr-accent: #222;
  --clr-overlay: rgba(0,0,0,0.5);

  --radius: 8px;
  --gap: 1rem;
  --padding: 1rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/*=============================================
=               PRODUCT GRID                  =
=============================================*/
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap);
  padding: var(--padding);
}

/*=============================================
=             PRODUCT CARD STYLING             =
=============================================*/
.product-card {
  background: var(--clr-bg);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--radius);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* fixed 1:1 image container */
.product-card .img-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 aspect */
  overflow: hidden;
}

.product-card .img-wrap img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* content area */
.product-card .card-content {
  padding: var(--padding);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5em;
  color: var(--clr-primary);
}

.product-card p {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #ddd;
  margin-bottom: 0.5em;
}

.product-card p.price {
  font-weight: bold;
  color: var(--clr-accent);
}

.product-card .product-sizes,
.product-card .product-colours {
  color: #ccc; /* Slightly brighter for the value */
  font-weight: 500;
  letter-spacing: 0.5px;
}



/*=============================================
=               MODAL STYLING                  =
=============================================*/

/* Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--clr-overlay);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Modal Box */
.modal-content {
  display: flex;
  width: 90vw;
  max-width: 800px;
  height: 90vh;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--clr-bg);
}

/* Left Pane */
.modal-left {
  flex: 0 0 60%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 16px;
}

/* Main Image */
#modalMainImage {
  flex: 1 1 auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 12px;
  min-height: 0;
}

/* Thumbnails */
.thumbnails {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.thumbnail {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
}

.thumbnail.active {
  border-color: var(--clr-primary);
}

/* Right Pane */
.modal-right {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  padding: 16px;
  overflow-y: auto;
}

/* Close Button */
#closeModal {
  margin-top: auto;
  align-self: flex-end;
  padding: 8px 16px;
  border: none;
  background: var(--clr-primary);
  color: var(--clr-bg);
  border-radius: 4px;
  cursor: pointer;
}


/* --------------------
   ATTRIBUTE CONTAINERS
   -------------------- */
.attributes {
  margin-top: 0.75rem;
}

.attributes strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: var(--clr-primary);
}
.attributes strong {
  color: #555;  /* or use #fff for pure white */
}


/* ---- BADGES for Colours & Sizes ---- */
.badge {
  display: inline-block;
  background: rgba(0,0,0,0.05);
  color: var(--clr-primary);
  border-radius: var(--radius);
  padding: 4px 8px;
  margin: 2px 6px 2px 0;
  font-size: 0.85rem;
  line-height: 1;
}

.badge.size-badge {
  color: #fff;  /* ✅ Add this for white text */
  background: rgba(255, 255, 255, 0.15);
}
/* ————————————————————————————————
   Override for beige badges (darker)
   ———————————————————————————————— */
.badge.colour-badge[style*="beige"] {
  /* darker than plain beige so the default white text shows */
  background-color: #d3cbb8 !important;
}

/* ————————————————————————————————
   Override for white badges (black text)
   ———————————————————————————————— */
.badge.colour-badge[style*="white"] {
  /* ensure any white badge gets black text */
  color: #000 !important;
}

#modalProductDescription {
  font-size: 0.9rem;
  margin-top: 0.75rem;
  color: var(--clr-secondary);
  line-height: 1.4;
}

.modal-content {
  display: flex;
  flex-direction: row;
  gap: 2rem;
}

.modal-left {
  flex: 1;
}

.modal-right {
  flex: 1;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #000;
}

#modalProductName {
  font-size: 1.4rem;
  font-weight: 700;
  color: #FFD700; /* bright gold */
  margin-bottom: 1rem;
}

#modalProductSizes,
#modalProductColours {
  font-size: 0.95rem;
  color: #ccc; /* subtle grey */
  margin-bottom: 0.5rem;
}

#modalProductDescription {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #f0f0f0;
  margin-top: 1.5rem;
  text-align: center;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}


.modal-content {
  background-color: #000;
  color: #fff;
  display: flex;
  flex-direction: row;
  gap: 2rem;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  max-width: 1000px;
  width: 90%;
  animation: fadeInModal 0.4s ease-in-out;
}

@keyframes fadeInModal {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
