/* ============================
   PRODUCT GRID — 4 COLUMNS
   ============================ */

.product-grid {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 8px 10px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
}

@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    padding: 8px 8px 16px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 4px;
  text-align: center;
  box-shadow: none;
  transition: 0.3s ease;
  cursor: pointer;
  text-decoration: none;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: none;
  border-color: transparent;
}

.product-card img {
  width: 80%;
  max-width: 90px;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  margin: 0 auto;
  border-radius: 6px;
  border: 1px solid var(--mystic-accent);
  box-shadow: 0 0 8px rgba(157, 78, 221, 0.4);
}

.product-card-name {
  margin-top: 4px;
  font-size: 0.72rem;
  line-height: 1.2;
  color: var(--mystic-white);
  min-height: 2em;
  overflow: hidden;
}

.product-card-price {
  margin-top: 4px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--mystic-light);
}

/* ============================
   PRODUCT DETAIL PAGE — 2 COLUMN
   ============================ */

.product-page {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 768px) {
  .product-page {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* LEFT SIDE: MAIN IMAGE + THUMBNAILS */
.product-images {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-main-image {
  width: 192px;
  height: 192px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--mystic-accent);
  box-shadow: 0 0 16px rgba(157, 78, 221, 0.5);
  cursor: zoom-in;
  display: block;
}

.product-thumbnails {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.thumbnail {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--mystic-gray);
  cursor: pointer;
  transition: 0.3s ease;
  box-shadow: 0 0 6px rgba(157, 78, 221, 0.3);
}

.thumbnail:hover,
.thumbnail.active {
  border-color: var(--mystic-light);
  box-shadow: 0 0 20px rgba(157, 78, 221, 0.6);
  transform: scale(1.05);
}

/* RIGHT SIDE: PRODUCT INFO */
.product-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-info h1 {
  font-size: 1.35rem;
  color: var(--mystic-light);
  text-shadow: 0 0 8px var(--mystic-glow);
  line-height: 1.2;
}

.product-info p {
  font-size: 0.88rem;
  color: var(--mystic-gray);
  line-height: 1.5;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--mystic-light);
  text-shadow: 0 0 6px var(--mystic-glow);
}

/* UPLOADS SECTION */
.uploads-area {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--mystic-accent);
  border-radius: 7px;
  padding: 8px;
  margin-top: 8px;
}

.uploads-area label {
  display: block;
  font-size: 0.82rem;
  color: var(--mystic-light);
  margin-bottom: 6px;
  text-shadow: 0 0 6px var(--mystic-glow);
}

.uploads-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.upload-entry {
  display: flex;
  gap: 10px;
  align-items: center;
}

.upload-entry input[type="file"] {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--mystic-accent);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.9rem;
}

.upload-entry input[type="file"]::file-selector-button {
  background: linear-gradient(135deg, var(--mystic-purple), var(--mystic-accent));
  color: white;
  border: none;
  padding: 6px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(157, 78, 221, 0.4);
  transition: 0.3s ease;
}

.upload-entry input[type="file"]::file-selector-button:hover {
  box-shadow: 0 0 20px rgba(157, 78, 221, 0.7);
}

/* QUANTITY SECTION */
.quantity-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.product-price-inline {
  font-size: 1rem;
  font-weight: bold;
  color: #d4aaff;
  text-shadow: 0 0 8px rgba(180, 100, 255, 0.8);
  margin-left: 4px;
}

.quantity-field label {
  font-size: 0.82rem;
  color: var(--mystic-light);
  text-shadow: 0 0 6px var(--mystic-glow);
}

.quantity-field input {
  width: 80px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--mystic-accent);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.88rem;
  transition: 0.3s ease;
}

.quantity-field input:focus {
  border-color: var(--mystic-light);
  box-shadow: 0 0 10px rgba(157, 78, 221, 0.5);
  outline: none;
}

.btn-small {
  padding: 9px 18px;
  font-size: 0.95rem;
}

.product-status {
  margin-top: 12px;
  min-height: 24px;
  color: var(--mystic-light);
  font-size: 0.95rem;
  text-shadow: 0 0 6px var(--mystic-glow);
}

/* CUSTOMIZATION NOTES SECTION */
.customization-notes {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--mystic-accent);
  border-radius: 7px;
  padding: 8px;
  margin-top: 8px;
}

.customization-notes label {
  display: block;
  font-size: 1rem;
  color: var(--mystic-light);
  margin-bottom: 12px;
  text-shadow: 0 0 6px var(--mystic-glow);
}

.notes-hint {
  font-size: 0.82rem;
  opacity: 0.76;
}

.customization-notes textarea {
  width: 100%;
  height: 100px;
  padding: 12px;
  border-radius: 6px;
  border: 2px solid var(--mystic-accent);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  transition: 0.3s ease;
}

.customization-notes textarea:focus {
  border-color: var(--mystic-light);
  box-shadow: 0 0 10px rgba(157, 78, 221, 0.5);
  outline: none;
  background: rgba(255, 255, 255, 0.08);
}

.customization-notes textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.char-counter {
  text-align: right;
  font-size: 0.78rem;
  color: rgba(179, 136, 255, 0.7);
  margin-top: 4px;
}

/* EXTRA UPLOADS SECTION */
.extra-uploads-area {
  background: rgba(106, 13, 173, 0.15);
  border: 2px solid var(--mystic-accent);
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
}

.extra-uploads-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.extra-upload-entry {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: rgba(157, 78, 221, 0.1);
  border-radius: 6px;
}

.extra-upload-entry label {
  font-size: 0.95rem;
  color: var(--mystic-light);
  text-shadow: 0 0 4px var(--mystic-glow);
}

.extra-upload-entry input[type="file"] {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--mystic-accent);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.9rem;
}

.extra-upload-entry input[type="file"]::file-selector-button {
  background: linear-gradient(135deg, var(--mystic-purple), var(--mystic-accent));
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s ease;
}

.extra-upload-entry input[type="file"]::file-selector-button:hover {
  box-shadow: 0 0 15px rgba(157, 78, 221, 0.6);
}

.extra-upload-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-remove-upload {
  height: 40px;
  min-width: 80px;
  padding: 0 12px;
  font-size: 0.82rem;
  margin-top: 0;
}

.btn-secondary {
  font-size: 0.9rem;
}

/* Add More Uploads + Add to Cart side by side */
.product-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
}

/* CART ITEM CUSTOMIZATION & EXTRA UPLOADS DISPLAY */
.customization-meta {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--mystic-gray);
  padding: 8px;
  border-left: 3px solid var(--mystic-accent);
  padding-left: 12px;
  font-style: italic;
}