/* shop/shop.css — Enhanced Shop Layout (5th Iteration) */

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */

.shop5-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 2rem;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.shop5-nav-left,
.shop5-nav-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.shop5-nav-link {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9A7EB0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.shop5-nav-link:hover,
.shop5-nav-link.active {
  color: #d4af37;
}

.shop5-nav-cart {
  position: relative;
}

.shop5-cart-badge {
  position: absolute;
  top: -8px;
  right: -14px;
  background: #d4af37;
  color: #0d1117;
  font-family: 'Poppins', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop5-nav-user {
  font-family: 'Poppins', sans-serif;
  font-size: 0.7rem;
  color: #e0d8ec;
}

.shop5-nav-right .shop5-nav-link {
  cursor: pointer;
}

/* ==========================================================================
   CONTAINER
   ========================================================================== */

.shop5-container {
  max-width: 1280px;
  margin: 120px auto 60px;
  padding: 0 2rem;
  text-align: center;
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */

.shop5-header {
  margin-bottom: 3rem;
}

.shop5-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  background: linear-gradient(180deg, #F5E6A0 0%, #C9973E 60%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.shop5-subtitle {
  font-family: 'Cinzel', serif;
  color: #9A7EB0;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

/* ==========================================================================
   CATEGORY FILTER BAR
   ========================================================================== */

.shop5-filters {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.shop5-filter-btn {
  position: relative;
  isolation: isolate;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 1.4rem;
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.35s ease;
}

.shop5-filter-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(201, 151, 62, 0.35);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  z-index: -2;
  transition: all 0.35s ease;
}

.shop5-filter-btn::after {
  content: '';
  position: absolute;
  top: 1px; left: 1px; right: 1px; bottom: 1px;
  background: var(--color-bg);
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
  z-index: -1;
  transition: all 0.35s ease;
}

@media (hover: hover) {
  .shop5-filter-btn:hover {
    color: var(--color-primary);
    transform: translateY(-2px);
  }

  .shop5-filter-btn:hover::before {
    background: linear-gradient(180deg, #F5E6A0 0%, #C9973E 100%);
  }
}

.shop5-filter-btn.active {
  color: var(--color-bg);
  transform: translateY(-2px);
}

.shop5-filter-btn.active::before {
  background: linear-gradient(180deg, #F5E6A0 0%, #C9973E 100%);
}

.shop5-filter-btn.active::after {
  background: linear-gradient(180deg, #F5E6A0 0%, #C9973E 100%);
}

/* ==========================================================================
   PRODUCT GRID
   ========================================================================== */

.shop5-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  justify-items: center;
}

/* ==========================================================================
   PRODUCT CARD — Magic Metal Corners
   ========================================================================== */

.shop5-product-card {
  position: relative;
  width: 100%;
  max-width: 280px;
  background-color: #0d1117;
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease;

  /* Golden corner elements via 8 linear-gradients */
  background-image:
    /* Bal felső — horizontal */
    linear-gradient(#d4af37, #d4af37),
    /* Bal felső — vertical */
    linear-gradient(#d4af37, #d4af37),
    /* Jobb felső — horizontal */
    linear-gradient(#d4af37, #d4af37),
    /* Jobb felső — vertical */
    linear-gradient(#d4af37, #d4af37),
    /* Bal alsó — horizontal */
    linear-gradient(#d4af37, #d4af37),
    /* Bal alsó — vertical */
    linear-gradient(#d4af37, #d4af37),
    /* Jobb alsó — horizontal */
    linear-gradient(#d4af37, #d4af37),
    /* Jobb alsó — vertical */
    linear-gradient(#d4af37, #d4af37));

  background-repeat: no-repeat;

  background-size:
    20px 2px, 2px 20px,
    20px 2px, 2px 20px,
    20px 2px, 2px 20px,
    20px 2px, 2px 20px;

  background-position:
    0 0, 0 0,
    100% 0, 100% 0,
    0 100%, 0 100%,
    100% 100%, 100% 100%;
}

.shop5-product-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 8px 24px rgba(0, 229, 255, 0.15),
    0 0 12px rgba(212, 175, 55, 0.2);
}

/* ==========================================================================
   IMAGE WRAPPER
   ========================================================================== */

.shop5-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  overflow: hidden;
}

.shop5-product-img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.2));
}

.shop5-product-card:hover .shop5-product-img {
  transform: scale(1.06);
  filter: drop-shadow(0 0 18px rgba(0, 229, 255, 0.35));
}

/* Quick view overlay on image hover */
.shop5-quick-view {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: auto;
  cursor: pointer;
  z-index: 2;
}

.shop5-quick-view span {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #F5E6A0;
  border: 1px solid rgba(201, 151, 62, 0.6);
  padding: 0.5rem 1.2rem;
  border-radius: 3px;
}

@media (hover: hover) {
  .shop5-product-card:hover .shop5-quick-view {
    opacity: 1;
  }
}

/* Mobile: always visible as subtle top bar */
@media (hover: none) {
  .shop5-quick-view {
    opacity: 1;
    background: rgba(0, 0, 0, 0.4);
    height: 40px;
  }
}

/* Card body content */
.shop5-card-body {
  padding: 0;
  width: 100%;
  text-align: center;
}

.shop5-product-title {
  font-family: 'Cinzel', serif;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.shop5-product-tier {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  color: #9A7EB0;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}

.shop5-price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 20px;
}

.shop5-product-price {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #d4af37;
  margin: 0;
}

.shop5-product-tag {
  font-family: 'Poppins', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0d1117;
  background: #d4af37;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}

/* ==========================================================================
   BUY BUTTON — Cyan Outline Style
   ========================================================================== */

.shop5-buy-btn {
  width: 100%;
  background-color: transparent;
  color: #00e5ff;
  border: 1px solid #00e5ff;
  padding: 12px;
  font-family: 'Cinzel', serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.shop5-buy-btn:hover {
  background-color: rgba(0, 229, 255, 0.05);
  box-shadow: inset 0 0 8px rgba(0, 229, 255, 0.3);
}

.shop5-buy-btn:active {
  transform: translateY(0);
}

.shop5-buy-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   ADD TO CART BUTTON
   ========================================================================== */

.shop5-cart-add-btn {
  width: 100%;
  background-color: transparent;
  color: #d4af37;
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 8px;
  margin-top: 8px;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.shop5-cart-add-btn:hover {
  background-color: rgba(212, 175, 55, 0.08);
  border-color: #d4af37;
}

/* ==========================================================================
   SPINNER
   ========================================================================== */

.shop5-spinner {
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-left-color: #000;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: shop5-spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes shop5-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.shop5-hidden {
  display: none !important;
}

/* ==========================================================================
   ERROR MESSAGE
   ========================================================================== */

.shop5-error-message {
  color: #ff4d4d;
  margin-top: 2rem;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-weight: bold;
}

/* ==========================================================================
   PRODUCT COUNT INDICATOR
   ========================================================================== */

.shop5-count {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}

.shop5-count strong {
  color: var(--color-primary);
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */

.shop5-empty {
  grid-column: 1 / -1;
  padding: 4rem 2rem;
  text-align: center;
}

.shop5-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.shop5-empty p {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  letter-spacing: 0.08em;
}

/* ==========================================================================
   RESPONSIVE — TABLET
   ========================================================================== */

@media (max-width: 1024px) {
  .shop5-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* ==========================================================================
   RESPONSIVE — MOBILE
   ========================================================================== */

@media (max-width: 768px) {
  .shop5-container {
    margin-top: 100px;
    padding: 0 1rem;
  }

  .shop5-title {
    font-size: 1.4rem;
  }

  .shop5-subtitle {
    font-size: 0.72rem;
    margin-bottom: 2rem;
  }

  .shop5-filters {
    gap: 0.5rem;
    margin-bottom: 2rem;
  }

  .shop5-filter-btn {
    font-size: 0.62rem;
    padding: 0.45rem 1rem;
    letter-spacing: 0.06em;
  }

  .shop5-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }

  .shop5-product-card {
    max-width: 100%;
    padding: 16px;
  }

  .shop5-card-body {
    padding: 0;
  }

  .shop5-product-title {
    font-size: 1rem;
  }

  .shop5-product-price {
    font-size: 1.1rem;
  }

  .shop5-buy-btn {
    font-size: 0.78rem;
    padding: 0.65rem;
  }
}

/* ==========================================================================
   RESPONSIVE — SMALL MOBILE
   ========================================================================== */

@media (max-width: 480px) {
  .shop5-product-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .shop5-product-card {
    max-width: 360px;
  }

  .shop5-filters {
    flex-direction: column;
    align-items: center;
  }

  .shop5-filter-btn {
    width: 80%;
    max-width: 240px;
  }

  .shop5-modal {
    flex-direction: column;
    max-width: 95vw;
    max-height: 90vh;
  }

  .shop5-modal-img-wrapper {
    width: 100%;
    max-height: 40vh;
  }

  .shop5-modal-body {
    width: 100%;
    padding: 1rem 1.2rem;
  }

  .shop5-modal-title {
    font-size: 1rem;
  }

  .shop5-modal-desc {
    font-size: 0.75rem;
  }

  .shop5-modal-price {
    font-size: 1.1rem;
  }
}

/* ==========================================================================
   MODAL OVERLAY
   ========================================================================== */

.shop5-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.shop5-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.shop5-modal {
  position: relative;
  display: flex;
  background: rgba(20, 20, 20, 0.97);
  border: 1px solid rgba(201, 151, 62, 0.3);
  border-radius: 8px;
  max-width: 720px;
  max-height: 80vh;
  overflow: hidden;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s ease;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 30px rgba(201, 151, 62, 0.1);
}

.shop5-modal-overlay.open .shop5-modal {
  transform: scale(1) translateY(0);
}

/* Close button */
.shop5-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(201, 151, 62, 0.3);
  background: rgba(0, 0, 0, 0.7);
  color: #F5E6A0;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.shop5-modal-close:hover {
  background: rgba(201, 151, 62, 0.2);
  border-color: var(--color-primary);
}

/* Modal image */
.shop5-modal-img-wrapper {
  width: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: #0a0814;
}

.shop5-modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Modal body */
.shop5-modal-body {
  width: 50%;
  padding: 2rem 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
  overflow-y: auto;
  max-height: 80vh;
}

.shop5-modal-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #F5E6A0 0%, #C9973E 60%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  margin: 0 0 0.4rem;
}

.shop5-modal-tier {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: #9A7EB0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.shop5-modal-desc {
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  color: #c8b8d8;
  line-height: 1.75;
  letter-spacing: 0.02em;
  margin: 0 0 1.2rem;
  flex-shrink: 0;
}

.shop5-modal-price {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #f5e6a0;
  margin: 0 0 1.6rem;
}

.shop5-modal-buy-btn {
  width: 100%;
  padding: 0.8rem;
  background: linear-gradient(135deg, #c9973e, #f5e6a0);
  color: #000;
  border: none;
  border-radius: 4px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.3s ease, transform 0.2s ease;
}

.shop5-modal-buy-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.shop5-modal-buy-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   MODAL RESPONSIVE — TABLET
   ========================================================================== */

@media (max-width: 1024px) {
  .shop5-modal {
    max-width: 600px;
  }
}
