/* Global Reset and Basic Setup */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f8f8f8;
  color: #2f272d;
}

/* Header Styling */
header {
  padding: 1rem;
  background: #2f272d;
  color: #fff;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Header container styles */
#header-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px; /* Add space between the images and text */
  margin-top: 20px;
}

/* Favicon image styles */
.favicon {
  width: 48px; /* Adjust the size as needed */
  height: 48px;
}

/* Mirror the right image */
.favicon.right {
  transform: scaleX(-1); /* Horizontal mirroring */
}


/* Main Content Wrapper */
main {
  max-width: 1200px;
  margin: 2rem auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 1rem;
}

nav {
  max-width: 1200px;
  margin: 2rem auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 0 1rem;
  align-items: end;
}

/* Sorting Button Container */
#toggle-sort-btn {
  display: block;
  margin: 0 auto 1.5rem;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  background-color: #2f272d;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  text-align: center;
}

#toggle-sort-btn:hover {
  background-color: #555;
}

#sorting-controls {
  width: 400px;
  margin-top: 1rem;
}

/* CTA Container */
#subscribe-cta {
  display: flex;
  flex-flow: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  width: 400px;
}

#qr-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#open-modal-btn {
  padding: 0.6rem 1rem;
  background-color: #2f272d;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

#open-modal-btn:hover {
  background-color: #555;
}

/* Modal Overlay */
#substack-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#substack-iframe {
  width: 100%;
  max-width: 600px; /* so it doesn't look crazy wide on huge screens */
  height: 300px;     /* same as #substack-footer */
  border: none;
  background-color: #fff; /* or #f8f8f8, etc. */
  display: block;
}

#close-substack {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

/* Modal Content */
#modal-content {
  position: relative;
  background: #0B100A;
  padding: 1rem;
  border-radius: 6px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#close-modal-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: white;
}

/* Product Cards */
.product-card {
  position: relative;
  width: 300px;
  margin: 1rem;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.product-card:hover {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

.product-image {
  object-fit: cover;
  display: block;
}

.product-content {
  padding: 1rem;
}

.product-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.icon-wrapper {
  display: flex;
  gap: 4px;
}

.icon {
  width: 24px;
  height: 24px;
}

.button-container {
  display: flex;
  justify-content: space-evenly;
  margin-top: 1rem;
}

.external-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 8px;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
  color: #fff;
}

.ebay-link {
  background-color: navajowhite;
}

.wallapop-link {
  background-color: #00ADA9;
}

.brand-icon {
  display: block;
  width: 24px;
  height: 24px;
}

.external-link:hover {
  opacity: 0.8;
}

/* SOLD OUT Styling */
.sold-out {
  position: relative;
  opacity: 0.6;
}

.sold-out-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 0, 0, 0.85);
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 1.2rem;
  text-transform: uppercase;
  pointer-events: none;
}

/* RESERVED Styling */
.reserved {
  position: relative;
  opacity: 0.8;
}

.reserved-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 165, 0, 0.85);
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 1.2rem;
  text-transform: uppercase;
  pointer-events: none;
}