/* Catalog wrapper */
.ral-catalog {
  font-family: inherit; /* inherit your site's font */
  color: inherit;       /* inherit your site's text color */
  padding: 20px;
  background: inherit;  /* <--- this makes it match your site's theme */
}


.ral-catalog h1 {
  text-align: center;
  margin-bottom: 30px;
}

.ral-catalog h2 {
  margin: 25px 0 15px;
  color: inherit;          /* match website theme */
  font-family: inherit;    /* match website font */
  font-size: inherit;      /* match website heading size */
  font-weight:bold;    /* match website heading weight */
}


/* Grid */
.ral-catalog .ral-color-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* exactly 5 columns */
  gap: 12px;
  justify-content: center; /* centers the grid if there is extra space */
  margin: 0 auto 40px auto; /* optional: center horizontally and spacing below */
}


.ral-catalog .ral-color-swatch {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70px;
  border-radius: 6px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s;
}

.ral-catalog .ral-color-swatch:hover {
  transform: scale(1.05);
}

/* Force 4 columns on mobile */
@media (max-width: 600px) {
  .ral-catalog .ral-color-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .ral-catalog .ral-color-swatch {
    height: 60px;
    font-size: 11px;
  }
  .ral-catalog .ral-modal-content {
    width: 90%;
  }
}

/* Modal */
.ral-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
}

.ral-modal-content {
  background: #fff;
  color: #000;
  padding: 20px;
  border-radius: 8px;
  width: 320px;
  text-align: center;
}

.ral-modal-content h2 {
  margin: 0 0 10px;
}

.ral-color-preview {
  height: 80px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.ral-close-btn {
  background: #222;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
}

.ral-modal-actions { 
  display: flex; 
  gap: 8px; 
  justify-content: center; 
  margin-top: 10px; 
}

.ral-buy-btn {
  background: #222;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
}
.ral-buy-btn:hover { opacity: 0.9; }

.ral-color-item {
    width: 50px;
    height: 50px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    display: inline-block;
}

.ral-show-more-btn {
    display: block;
    margin: 10px auto;
    padding: 8px 12px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
