/* ========================================
   AlloyPro Jewelry - Addon Styles
   Black & Gold Theme Extensions
   ======================================== */

/* ============================================================
   a) PRODUCT QUICK VIEW MODAL
   ============================================================ */
.quick-view-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.quick-view-overlay.active {
  opacity: 1;
  visibility: visible;
}
.quick-view-modal {
  background: #141414;
  border: 1px solid #333;
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}
.quick-view-overlay.active .quick-view-modal {
  transform: scale(1) translateY(0);
}
.qv-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none;
  border: none;
  color: #999;
  font-size: 28px;
  cursor: pointer;
  z-index: 10;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}
.qv-close:hover {
  color: #c9a96e;
  background: rgba(201, 169, 110, 0.1);
}
.qv-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.qv-image-wrap {
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  border-radius: 12px 0 0 12px;
  min-height: 300px;
}
.qv-image {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 8px;
}
.qv-info {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.qv-title {
  font-size: 1.5rem;
  color: #e8e8e8;
  font-weight: 700;
  line-height: 1.3;
}
.qv-price-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.qv-price {
  font-size: 1.6rem;
  color: #c9a96e;
  font-weight: 700;
}
.qv-price-original {
  font-size: 1rem;
  color: #666;
  text-decoration: line-through;
}
.qv-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid #333;
  padding-top: 16px;
}
.qv-detail-row {
  display: flex;
  gap: 8px;
  font-size: 0.95rem;
}
.qv-label {
  color: #999;
  min-width: 80px;
  font-weight: 500;
}
.qv-value {
  color: #e8e8e8;
}
.qv-description {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #333;
}
.qv-description p {
  color: #ccc;
  font-size: 0.9rem;
  line-height: 1.6;
}
.qv-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}
.qv-inquire-btn {
  flex: 1;
}
.qv-close-btn {
  flex: 0;
  padding: 12px 20px;
  background: transparent;
  border: 1px solid #555;
  color: #e8e8e8;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}
.qv-close-btn:hover {
  border-color: #c9a96e;
  color: #c9a96e;
}

/* ============================================================
   b) CURRENCY SWITCHER
   ============================================================ */
.currency-switcher {
  position: relative;
  display: inline-block;
}
.currency-btn {
  background: rgba(201, 169, 110, 0.1);
  border: 1px solid rgba(201, 169, 110, 0.3);
  color: #c9a96e;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  min-height: 36px;
}
.currency-btn:hover {
  background: rgba(201, 169, 110, 0.2);
  border-color: #c9a96e;
}
.currency-icon {
  font-size: 0.9rem;
}
.currency-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s;
}
.currency-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  min-width: 140px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  overflow: hidden;
}
.currency-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.currency-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  color: #e8e8e8;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}
.currency-dropdown button:hover {
  background: rgba(201, 169, 110, 0.15);
  color: #c9a96e;
}

/* ============================================================
   c) PROMOTION COUNTDOWN BANNER
   ============================================================ */
.promo-banner {
  background: linear-gradient(135deg, #1a1000 0%, #0a0a0a 50%, #1a0a00 100%);
  border-top: 1px solid rgba(201, 169, 110, 0.3);
  border-bottom: 1px solid rgba(201, 169, 110, 0.3);
  padding: 24px 0;
  position: relative;
  overflow: hidden;
}
.promo-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at center, rgba(201, 169, 110, 0.05) 0%, transparent 70%);
  pointer-events: none;
}
.promo-content {
  display: flex;
  align-items: center;
  gap: 32px;
  position: relative;
  z-index: 1;
}
.promo-text {
  flex: 1;
}
.promo-badge {
  display: inline-block;
  background: linear-gradient(135deg, #c9a96e, #8b7355);
  color: #0a0a0a;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.promo-title {
  font-size: 1.4rem;
  color: #e8e8e8;
  font-weight: 700;
  margin-bottom: 4px;
}
.promo-desc {
  color: #999;
  font-size: 0.9rem;
}
.promo-countdown {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.countdown-item {
  text-align: center;
  background: rgba(201, 169, 110, 0.1);
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  min-width: 60px;
}
.countdown-item span:first-child {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #c9a96e;
  font-variant-numeric: tabular-nums;
}
.countdown-label {
  font-size: 0.65rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.countdown-sep {
  color: #c9a96e;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0 2px;
}
.promo-cta {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ============================================================
   d) SUBSCRIBE BOX
   ============================================================ */
.subscribe-box {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.subscribe-content h3 {
  color: #c9a96e;
  font-size: 1.5rem;
  margin-bottom: 8px;
  font-weight: 700;
}
.subscribe-content p {
  color: #999;
  margin-bottom: 24px;
  font-size: 0.95rem;
}
.subscribe-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}
.subscribe-input {
  flex: 1;
  padding: 12px 16px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  color: #e8e8e8;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  min-height: 44px;
}
.subscribe-input:focus {
  outline: none;
  border-color: #c9a96e;
}
.subscribe-input::placeholder {
  color: #666;
}
.subscribe-btn {
  white-space: nowrap;
  min-height: 44px;
}
.subscribe-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #38a169;
  font-size: 0.95rem;
  margin-top: 12px;
}

/* ============================================================
   e) RECENTLY VIEWED
   ============================================================ */
.recently-viewed-header h3 {
  color: #c9a96e;
  font-size: 1.3rem;
  margin-bottom: 20px;
  font-weight: 700;
}
.recently-viewed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
.rv-card {
  background: #141414;
  border: 1px solid #222;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}
.rv-card:hover {
  border-color: #c9a96e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201, 169, 110, 0.15);
}
.rv-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: #0a0a0a;
}
.rv-card-info {
  padding: 10px;
}
.rv-card-info h4 {
  font-size: 0.8rem;
  color: #e8e8e8;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rv-price {
  color: #c9a96e;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ============================================================
   f) BLOG PAGE STYLES
   ============================================================ */
.blog-hero {
  padding: 120px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, #0a0a0a 0%, #141414 100%);
}
.blog-hero-title {
  font-size: 2.2rem;
  color: #c9a96e;
  font-weight: 700;
  font-family: Georgia, 'Times New Roman', serif;
  margin-bottom: 12px;
}
.blog-hero-subtitle {
  color: #999;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 16px;
}
.blog-filter-section {
  padding: 24px 0;
  border-bottom: 1px solid #222;
}
.blog-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.filter-btn {
  padding: 8px 20px;
  background: transparent;
  border: 1px solid #333;
  color: #999;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
  min-height: 44px;
}
.filter-btn:hover {
  border-color: #c9a96e;
  color: #c9a96e;
}
.filter-btn.active {
  background: #c9a96e;
  border-color: #c9a96e;
  color: #0a0a0a;
  font-weight: 600;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.blog-card {
  background: #141414;
  border: 1px solid #222;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
}
.blog-card:hover {
  border-color: rgba(201, 169, 110, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.blog-card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}
.blog-card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(201, 169, 110, 0.9);
  color: #0a0a0a;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.blog-card-content {
  padding: 20px;
}
.blog-card-title {
  font-size: 1.1rem;
  color: #e8e8e8;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-excerpt {
  color: #999;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #222;
}
.blog-card-date {
  color: #666;
  font-size: 0.8rem;
}
.blog-card-readmore {
  color: #c9a96e;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Blog Empty State */
.blog-empty {
  text-align: center;
  padding: 60px 20px;
}
.blog-empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}
.blog-empty h3 {
  color: #e8e8e8;
  margin-bottom: 8px;
}
.blog-empty p {
  color: #999;
}

/* Blog Modal */
.blog-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 40px 20px;
  backdrop-filter: blur(4px);
}
.blog-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.blog-modal {
  background: #141414;
  border: 1px solid #333;
  border-radius: 12px;
  max-width: 800px;
  width: 100%;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.blog-modal-overlay.active .blog-modal {
  transform: translateY(0);
}
.blog-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(10, 10, 10, 0.8);
  border: 1px solid #333;
  color: #999;
  font-size: 24px;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}
.blog-modal-close:hover {
  color: #c9a96e;
  border-color: #c9a96e;
}
.blog-modal-body {
  padding: 40px;
}
.blog-detail-cover {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 24px;
}
.blog-detail-title {
  font-size: 1.8rem;
  color: #e8e8e8;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}
.blog-detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #333;
  color: #999;
  font-size: 0.9rem;
}
.blog-detail-category {
  background: rgba(201, 169, 110, 0.15);
  color: #c9a96e;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
}
.blog-detail-content {
  color: #ccc;
  line-height: 1.8;
  font-size: 1rem;
}
.blog-detail-content p {
  margin-bottom: 16px;
}
.blog-detail-content h2,
.blog-detail-content h3 {
  color: #e8e8e8;
  margin: 24px 0 12px;
}
.blog-detail-content img {
  border-radius: 8px;
  margin: 16px 0;
}
.blog-detail-content a {
  color: #c9a96e;
  text-decoration: underline;
}

/* ============================================================
   g) MOBILE BOTTOM TAB BAR (for admin)
   ============================================================ */
@media (max-width: 768px) {
  .bottom-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0a0a0a;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 0;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
    z-index: 9999;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.5);
  }
  .bottom-tab-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #999;
    font-size: 0.65rem;
    padding: 4px 8px;
    min-height: 44px;
    justify-content: center;
    transition: color 0.2s;
  }
  .bottom-tab-bar a.active,
  .bottom-tab-bar a:hover {
    color: #c9a96e;
  }
  .bottom-tab-bar a .tab-icon {
    font-size: 1.2rem;
  }
}
.bottom-tab-bar {
  display: none;
}
@media (max-width: 768px) {
  .bottom-tab-bar {
    display: flex;
  }
  /* Add padding to body when bottom tab is present */
  body.has-bottom-tabs {
    padding-bottom: 70px;
  }
}

/* ============================================================
   h) CERTIFICATE DISPLAY
   ============================================================ */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.cert-card {
  background: #141414;
  border: 1px solid #222;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
}
.cert-card:hover {
  border-color: rgba(201, 169, 110, 0.3);
  box-shadow: 0 4px 16px rgba(201, 169, 110, 0.1);
}
.cert-image {
  height: 180px;
  overflow: hidden;
  background: #0a0a0a;
}
.cert-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}
.cert-icon {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: #0a0a0a;
}
.cert-info {
  padding: 16px;
}
.cert-name {
  color: #e8e8e8;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.cert-issuer {
  color: #c9a96e;
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.cert-date,
.cert-number {
  color: #999;
  font-size: 0.8rem;
}

/* ============================================================
   i) RESPONSIVE ENHANCEMENTS
   ============================================================ */

/* Tablet (768px and below) */
@media (max-width: 768px) {
  /* Quick View - stack image and info */
  .qv-content {
    grid-template-columns: 1fr;
  }
  .qv-image-wrap {
    border-radius: 12px 12px 0 0;
    min-height: 200px;
    padding: 20px;
  }
  .qv-info {
    padding: 24px;
  }
  .qv-title {
    font-size: 1.25rem;
  }
  .qv-actions {
    flex-direction: column;
  }
  .qv-close-btn {
    width: 100%;
    text-align: center;
  }

  /* Promo Banner - stack */
  .promo-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  .promo-title {
    font-size: 1.2rem;
  }
  .countdown-item {
    min-width: 48px;
    padding: 6px 8px;
  }
  .countdown-item span:first-child {
    font-size: 1.2rem;
  }

  /* Blog Grid - single column */
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-hero-title {
    font-size: 1.6rem;
  }
  .blog-hero-subtitle {
    font-size: 0.95rem;
  }
  .blog-modal-body {
    padding: 24px 16px;
  }
  .blog-detail-title {
    font-size: 1.4rem;
  }

  /* Subscribe */
  .subscribe-form {
    flex-direction: column;
  }
  .subscribe-btn {
    width: 100%;
  }

  /* Cert Grid */
  .cert-grid {
    grid-template-columns: 1fr;
  }

  /* Recently Viewed */
  .recently-viewed-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }

  /* Navbar mobile */
  .nav-right {
    gap: 6px;
  }
  .currency-switcher {
    order: -1;
  }
  .currency-btn {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  /* Touch-friendly sizing */
  .btn {
    min-height: 44px;
  }
  .filter-btn {
    min-height: 44px;
  }

  /* Blog filter scrollable */
  .blog-filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .blog-filter-bar::-webkit-scrollbar {
    display: none;
  }
  .filter-btn {
    flex-shrink: 0;
  }
}

/* Small mobile (480px and below) */
@media (max-width: 480px) {
  .quick-view-modal {
    border-radius: 8px;
  }
  .qv-image-wrap {
    min-height: 160px;
    padding: 16px;
  }
  .qv-info {
    padding: 16px;
  }
  .qv-price {
    font-size: 1.3rem;
  }

  .blog-card-image {
    height: 160px;
  }
  .blog-card-content {
    padding: 14px;
  }

  .promo-banner {
    padding: 16px 0;
  }
  .countdown-item {
    min-width: 40px;
    padding: 4px 6px;
  }
  .countdown-item span:first-child {
    font-size: 1rem;
  }

  .recently-viewed-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
  }
  .rv-card img {
    height: 90px;
  }
}

/* ============================================================
   j) DATA-PRICE-USD ELEMENT STYLING
   ============================================================ */
[data-price-usd] {
  transition: color 0.2s;
}
