/* ===== detail.css – Tottenham Hotspur Theme ===== */
/* Navy (#132257) · Light Blue (#A9C0FF) – premium product detail page */

/* ----- RESET & VARIABLES ----- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy: #132257;
  --navy-dark: #0e1b3f;
  --navy-light: #1e3a8a;
  --light-blue: #A9C0FF;
  --light-blue-light: #c2d4ff;
  --light-blue-dark: #8aa9e6;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  --transition: all 0.2s ease;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.5;
}

/* ===== APP CONTAINER ===== */
.app-container {
  max-width: 1280px;
  margin: 0 auto;
  background: white;
  box-shadow: var(--shadow-sm);
}

/* ===== MOBILE HEADER ===== */
.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: white;
  border-bottom: 1px solid var(--gray-200);
}

.back-btn,
.share-btn {
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-700);
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
}
.back-btn:hover,
.share-btn:hover {
  background: var(--gray-100);
  color: var(--navy);
}

.seller-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.seller-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--gray-100);
  border: 2px solid var(--light-blue);
}

.seller-details {
  display: flex;
  flex-direction: column;
}

.seller-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gray-800);
}

.listing-time {
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* ===== MEDIA GALLERY ===== */
.media-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--gray-100);
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.media-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
}
.media-slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.media-content {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--gray-100);
}

.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 10;
}
@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.touch-area {
  position: absolute;
  top: 0;
  width: 30%;
  height: 100%;
  z-index: 5;
  cursor: pointer;
}
.touch-area.prev { left: 0; }
.touch-area.next { right: 0; }

.media-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  z-index: 10;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  transition: all 0.2s;
  cursor: pointer;
}
.dot.active {
  background: var(--navy);
  transform: scale(1.2);
}

.thumbnail-strip {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  background: white;
  border-top: 1px solid var(--gray-200);
}
.thumbnail-strip::-webkit-scrollbar {
  display: none;
}

.thumbnail {
  flex: 0 0 60px;
  height: 60px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
}
.thumbnail.active {
  border-color: var(--navy);
}
.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumbnail .video-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Video poster */
.video-poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.2);
  color: white;
  font-size: 3rem;
  opacity: 1;
  transition: opacity 0.3s;
  pointer-events: none;
}
.video-poster i {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* ===== PRODUCT INFO CARDS ===== */
.product-info-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.price-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.price-amount {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}

/* Buttons */
.btn {
  display: block;
  width: 100%;
  padding: 0.875rem;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--navy);
  color: white;
  box-shadow: 0 4px 10px rgba(19,34,87,0.3);
}
.btn-primary:hover {
  background: var(--navy-dark);
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--navy);
  color: var(--navy);
}
.btn-outline:hover {
  background: var(--light-blue-light);
  transform: scale(1.02);
}

/* Seller section */
.seller-card {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.seller-avatar-lg {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--gray-100);
  border: 2px solid var(--light-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--navy);
}
.seller-meta {
  flex: 1;
}
.seller-name-lg {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}
.seller-stats {
  display: flex;
  gap: 1rem;
}
.seller-stat {
  font-size: 0.875rem;
  color: var(--gray-600);
}
.seller-stat span {
  font-weight: 700;
  color: var(--gray-900);
}

.action-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}
.action-btn {
  flex: 1;
  padding: 0.75rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
  text-align: center;
  text-decoration: none;
  transition: var(--transition);
}
.action-btn-primary {
  background: var(--navy);
  color: white;
  box-shadow: 0 2px 6px rgba(19,34,87,0.2);
}
.action-btn-primary:hover {
  background: var(--navy-dark);
  transform: translateY(-2px);
}
.action-btn-secondary {
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
}
.action-btn-secondary:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--light-blue-light);
}

/* Description & Shipping */
.description-card,
.shipping-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}
.section-title {
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-title i {
  color: var(--light-blue);
}
.description-text {
  font-size: 0.95rem;
  color: var(--gray-700);
  line-height: 1.6;
  white-space: pre-wrap;
}
.shipping-list {
  list-style: none;
}
.shipping-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-600);
}
.shipping-list i {
  color: var(--navy);
  width: 20px;
}

/* ===== RELATED ITEMS SECTION ===== */
.related-section {
  padding: 2rem 1rem;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
}
.related-header {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 640px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1024px) {
  .related-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
.related-item {
  text-decoration: none;
  color: inherit;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}
.related-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--light-blue);
}
.related-media {
  aspect-ratio: 1 / 1;
  background: var(--gray-100);
  position: relative;
  overflow: hidden;
}
.related-media img,
.related-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.related-item:hover .related-media img,
.related-item:hover .related-media video {
  transform: scale(1.05);
}
.related-media .video-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 2rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  pointer-events: none;
}
.related-info {
  padding: 0.75rem;
}
.related-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.related-price {
  color: var(--navy);
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}
.related-shop {
  font-size: 0.75rem;
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== FULLSCREEN MODAL ===== */
.fullscreen-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 1000;
  backdrop-filter: blur(8px);
}
.fullscreen-modal.active {
  display: block;
}
.fullscreen-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fullscreen-content img,
.fullscreen-content video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.fullscreen-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 0.5rem;
  z-index: 1010;
}
.fullscreen-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.fullscreen-btn:hover {
  background: rgba(255,255,255,0.4);
  transform: scale(1.05);
}
.fullscreen-dots {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  z-index: 1010;
}
.fullscreen-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: var(--transition);
}
.fullscreen-dot.active {
  background: white;
  transform: scale(1.2);
}

/* ===== DESKTOP LAYOUT ===== */
.desktop-breadcrumb {
  max-width: 1280px;
  margin: 1rem auto;
  padding: 0 2rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}
.desktop-breadcrumb a {
  color: var(--gray-500);
  text-decoration: none;
  transition: var(--transition);
}
.desktop-breadcrumb a:hover {
  color: var(--navy);
}
.desktop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

/* ===== UTILITIES ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

/* Mobile-only / desktop-only */
.mobile-only { display: block; }
.desktop-only { display: none; }
@media (min-width: 1024px) {
  .mobile-only { display: none; }
  .desktop-only { display: block; }
}