/* =========================
   FORJEN – Frontend Enhancements
   Size Selectors + Core Products
   ========================= */

/* =========================
   Size Selector (Drop)
   ========================= */

.size-selector{
  margin-bottom: 20px;
}

.size-label{
  margin-bottom: 10px;
  color: rgba(255,255,255,0.35);
}

.size-options{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  gap: 10px;
}

/* Size option buttons - Universal white theme */
.size-option{
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.50);
  padding: 12px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Work Sans', sans-serif;
}

.size-option:hover{
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.03);
}

/* Active size - white highlight instead of accent */
.size-option.active{
  border-color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.98);
}

.size-option:disabled{
  opacity: 0.3;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Shake animation for when user forgets to select size */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

/* =========================
   Core Products Section
   ========================= */

.core-section{
  border-top: 1px solid var(--line-1);
  padding: 80px 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0) 40%);
}

.core-header{
  margin-bottom: 48px;
}

.core-products-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}

.core-product-card{
  border: 1px solid var(--line-1);
  background: rgba(0,0,0,0.25);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.core-product-card:hover{
  border-color: var(--line-4);
  transform: translateY(-4px);
  background: rgba(0,0,0,0.35);
  box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}

.core-product-image{
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(255,255,255,0.01);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line-1);
  position: relative;
}

.core-product-image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.core-product-card:hover .core-product-image img{
  transform: scale(1.08);
}

.core-product-info{
  padding: 28px 24px 24px;
}

.core-product-name{
  font-size: 16px;
  letter-spacing: 0.10em;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.88);
}

.core-product-desc{
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 20px;
  color: var(--muted-1);
}

/* Size selector for core products - Universal white theme */
.core-product-size-selector{
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.core-size-option{
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.45);
  padding: 8px 14px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Work Sans', sans-serif;
  min-width: 44px;
  text-align: center;
}

.core-size-option:hover{
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.70);
  background: rgba(255,255,255,0.03);
}

/* Active size - white highlight */
.core-size-option.active{
  border-color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.95);
}

.core-product-footer{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line-1);
}

.core-product-price{
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-family: 'Oswald', sans-serif;
  color: rgba(255,255,255,0.90);
}

/* Core product button - Universal white theme */
.core-product-btn{
  border: 1px solid rgba(255,255,255,0.18);
  padding: 10px 18px;
  background: transparent;
  color: rgba(255,255,255,0.65);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
  font-family: 'Work Sans', sans-serif;
}

.core-product-btn:hover{
  border-color: rgba(255,255,255,0.40);
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.05);
}

/* =========================
   Next Drop Teaser (Locked)
   ========================= */

.next-section{
  padding: 80px 0;
  margin-top: 64px;
}
.next-section .container{
  border-top: 1px solid var(--line-1);
  padding-top: 80px;
}

.next-teaser-locked{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}

.next-locked-title{
  font-size: clamp(36px, 5vw, 72px);
  letter-spacing: 0.12em;
  line-height: 0.95;
  color: rgba(255,255,255,0.88);
  margin-top: 10px;
}

/* Request button - Universal white theme */
.request-btn{
  border: 1px solid rgba(255,255,255,0.15);
  padding: 14px 24px;
  background: transparent;
  color: rgba(255,255,255,0.65);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  font-family: 'Work Sans', sans-serif;
}

.request-btn:hover{
  border-color: rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.92);
}

.request-btn:focus-visible{
  outline: 2px solid rgba(255,255,255,0.25);
  outline-offset: 3px;
}

/* =========================
   Enhanced Buy Button States
   ========================= */

.acquire-btn.disabled{
  opacity: 0.45;
  cursor: not-allowed;
  border-color: var(--line-3);
  color: rgba(255,255,255,0.30);
}

.acquire-btn.disabled:hover{
  background: transparent;
  color: rgba(255,255,255,0.30);
  transform: none;
}

/* Live indicator */
.status-pill.live{
  border-color: var(--accent);
  background: rgba(75, 0, 110, 0.15);
  color: rgba(255,255,255,0.75);
  animation: pulse-glow 2s ease-in-out infinite;
}

.data-section.warning .data-label::after {
  content: ' • 3 DAYS LEFT';
  color: rgba(255, 187, 0, 0.8);
  font-size: 10px;
  margin-left: 8px;
}

.data-section.urgent {
  animation: pulse-urgent 2s ease-in-out infinite;
}

.data-section.urgent .data-label {
  color: rgba(255, 100, 100, 0.9);
}

.data-section.urgent .data-label::after {
  content: ' • FINAL HOURS';
  color: rgba(255, 100, 100, 0.9);
  font-size: 10px;
  margin-left: 8px;
  animation: blink 1.5s infinite;
}

@keyframes pulse-urgent {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Stock urgency states */
.data-section.low .data-label::after {
  content: ' • LOW STOCK';
  color: rgba(255, 187, 0, 0.8);
  font-size: 10px;
  margin-left: 8px;
}

.data-section.critical .data-label::after {
  content: ' • NEARLY GONE';
  color: rgba(255, 100, 100, 0.9);
  font-size: 10px;
  margin-left: 8px;
}

.data-section.critical .stock-fill {
  background: linear-gradient(90deg, rgba(255, 100, 100, 0.4), rgba(255, 100, 100, 0.6));
}

/* Enhance the crumb urgency */
.crumb {
  animation: fade-in 0.6s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Add urgency badge styling */
.urgency-badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255, 100, 100, 0.15);
  border: 1px solid rgba(255, 100, 100, 0.3);
  color: rgba(255, 255, 255, 0.9);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  margin-left: 12px;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { 
    opacity: 1;
    box-shadow: 0 0 0 rgba(75, 0, 110, 0);
  }
  50% { 
    opacity: 0.85;
    box-shadow: 0 0 12px rgba(75, 0, 110, 0.3);
  }
}

/* =========================
   Loading States
   ========================= */

.loading-skeleton{
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.02) 0%,
    rgba(255,255,255,0.05) 50%,
    rgba(255,255,255,0.02) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Update these values in frontend.css */

.mark-detail {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--line-1);
}

.mark-detail-label {
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.30);
  text-transform: uppercase;
}

.mark-detail-image {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--line-1);
  transition: all 0.3s ease;
  min-height: 200px;
  width: fit-content;
}

.mark-detail-image:hover {
  background: rgba(0, 0, 0, 0.25);
  border-color: var(--line-2);
}

.mark-detail-image img {
  width: 100%;
  max-width: 220px;  /* Much smaller */
  height: auto;
  opacity: 0.95;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mark-detail-image:hover img {
  opacity: 1;
  transform: scale(1.05);
}

.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-modal.active {
  opacity: 1;
}

.image-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  cursor: pointer;
}

.image-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.image-modal-content img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  font-size: 32px;
  width: 48px;
  height: 48px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: Arial, sans-serif;
  line-height: 1;
  padding: 0;
}

.image-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 1);
}

/* Indicate images are clickable */
.image-container img,
.mark-detail-image img {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.image-container img:hover,
.mark-detail-image img:hover {
  opacity: 0.85;
}

@media (max-width: 768px) {
  .image-modal-content {
    padding: 20px;
  }
  
  .image-modal-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .mark-detail {
    margin-top: 24px;
    padding-top: 24px;
  }
  
  .mark-detail-image {
    padding: 16px;
    min-height: 160px;
  }
  
  .mark-detail-image img {
    max-width: 180px;  /* Smaller on mobile */
  }
}

@media (max-width: 1024px){
  .next-teaser-locked{ 
    flex-direction: column; 
    align-items: flex-start; 
  }
  
  .next-teaser-locked .request-btn{ 
    width: 100%; 
    padding: 16px 18px; 
  }
}

@media (max-width: 768px){
  .core-section{
    padding: 56px 0;
  }

  .core-products-grid{
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .core-product-card{
    max-width: 480px;
    margin: 0 auto;
  }

  .size-options{
    grid-template-columns: repeat(5, 1fr);
  }

  .next-locked-title{
    font-size: 36px;
  }
}

/* =========================
   Accessibility
   ========================= */

.size-option:focus-visible,
.core-size-option:focus-visible,
.core-product-btn:focus-visible{
  outline: 2px solid rgba(255,255,255,0.35);
  outline-offset: 3px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .size-option,
  .core-size-option{
    border-width: 2px;
  }
  
  .size-option.active,
  .core-size-option.active{
    border-width: 3px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}