/* ===== SHOP PAGE ===== */

/* Remove default padding for shop pages */
body.post-type-archive-product .site-main,
body.tax-product_cat .site-main,
body.tax-product_tag .site-main {
  padding: 0 !important;
  max-width: none !important;
}

/* Override WooCommerce default wrapper constraints */
body.post-type-archive-product .woocommerce,
body.tax-product_cat .woocommerce,
body.tax-product_tag .woocommerce {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ===== PAGE LAYOUT ===== */
.shop-page-wrapper {
  display: flex;
  gap: 2rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* ===== SIDEBAR ===== */
.shop-sidebar {
  width: 280px;
  flex-shrink: 0;
}

.shop-sidebar .sidebar-badge {
  background: var(--gb-white);
  border: 1px solid var(--gb-border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  margin-top: 1.5rem;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.shop-sidebar .royal-mint-logo {
  max-width: 80px;
  margin-bottom: 0.75rem;
}

.shop-sidebar .badge-label {
  font-size: 0.9rem;
  color: var(--gb-text);
  margin: 0;
  line-height: 1.4;
}

.shop-sidebar .sidebar-link-box {
  background: var(--gb-white);
  border: 1px solid var(--gb-border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  margin-top: 1.5rem;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.shop-sidebar .sidebar-link-box .doc-image {
  max-width: 100px;
  margin-bottom: 0.5rem;
}

.shop-sidebar .sidebar-link-box a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--gb-navy);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.shop-sidebar .sidebar-link-box a:hover {
  color: var(--gb-gold);
}

.shop-sidebar .sidebar-link-box svg {
  flex-shrink: 0;
  color: var(--gb-gold);
}

.shop-sidebar .sidebar-promo {
  background: var(--gb-white);
  border: 1px solid var(--gb-border);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1.5rem;
  text-align: center;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.shop-sidebar .sidebar-promo h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--gb-navy);
}

.shop-sidebar .sidebar-promo p {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  color: var(--gb-text);
}

.shop-sidebar .sidebar-promo .btn-gold {
  display: inline-block;
  background: var(--gb-gold);
  color: var(--gb-navy);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
}

.shop-sidebar .sidebar-promo .btn-gold:hover {
  background: var(--gb-navy);
  color: var(--gb-white);
}

/* ===== MAIN CONTENT ===== */
.shop-main {
  flex: 1;
  min-width: 0;
}

/* Breadcrumb */
.shop-main .woocommerce-breadcrumb {
  font-size: 0.875rem;
  color: var(--gb-text);
  margin-bottom: 1.5rem;
  padding: 0;
}

.shop-main .woocommerce-breadcrumb a {
  color: var(--gb-navy);
}

.shop-main .woocommerce-breadcrumb a:hover {
  color: var(--gb-gold);
}

/* ===== SHOP SECTIONS ===== */
.shop-section {
  margin-bottom: 3rem;
}

.shop-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gb-navy);
}

.shop-section .section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gb-navy);
  margin: 0;
}

.shop-section .section-header .view-all {
  color: var(--gb-navy);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.shop-section .section-header .view-all:hover {
  color: var(--gb-gold);
}

/* ===== CATEGORY/ARCHIVE VIEW ===== */
.shop-header {
  margin-bottom: 2rem;
}

.shop-header .shop-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gb-navy);
  margin-bottom: 0.5rem;
}

.shop-header .term-description {
  color: var(--gb-text);
  line-height: 1.7;
}

/* Result count and ordering */
.shop-main .woocommerce-result-count {
  float: left;
  font-size: 0.9rem;
  color: var(--gb-text);
  margin: 0 0 1rem;
  line-height: 2.5;
}

.shop-main .woocommerce-ordering {
  float: right;
  margin-bottom: 1rem;
}

.shop-main .woocommerce-ordering select {
  padding: 0.5rem 1rem;
  border: 1px solid var(--gb-border);
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Products grid */
.shop-main ul.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  clear: both;
}

/* Remove WooCommerce float clearing pseudo-elements */
.shop-main ul.products::before,
.shop-main ul.products::after,
.shop-section .woocommerce ul.products::before,
.shop-section .woocommerce ul.products::after {
  display: none !important;
  content: none !important;
}

/* Override WooCommerce float/width grid system */
.shop-main ul.products li.product,
.shop-section .woocommerce ul.products li.product {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  background: var(--gb-white);
  border: 1px solid var(--gb-border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.shop-main ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.shop-main ul.products li.product a.woocommerce-LoopProduct-link {
  display: block;
  text-decoration: none;
}

.shop-main ul.products li.product img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  margin-bottom: 0.75rem;
  border-radius: 4px;
  background: #f9f9f9;
}

.shop-main ul.products li.product .woocommerce-loop-product__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gb-navy);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.shop-main ul.products li.product .price {
  font-size: 1rem;
  font-weight: 700;
}

/* Price amount: gold */
.shop-main ul.products li.product .price .woocommerce-Price-amount {
  color: var(--gb-gold);
}

/* "from" prefix: small, dark, normal weight */
.shop-main ul.products li.product .gbpm-from-price-prefix {
  color: var(--gb-text);
  font-size: 0.85rem;
  font-weight: 400;
}

.shop-main ul.products li.product .price del {
  color: #999;
  font-weight: 400;
  font-size: 0.875rem;
}

.shop-main ul.products li.product .price ins {
  text-decoration: none;
  color: var(--gb-gold);
}

/* Hide add to cart buttons */
.shop-main ul.products li.product .button,
.shop-main ul.products li.product .add_to_cart_button,
.shop-main ul.products li.product .added_to_cart {
  display: none !important;
}

/* Pagination */
.shop-main .woocommerce-pagination {
  margin-top: 2rem;
  text-align: center;
}

.shop-main .woocommerce-pagination ul {
  display: inline-flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.shop-main .woocommerce-pagination ul li {
  margin: 0;
}

.shop-main .woocommerce-pagination ul li a,
.shop-main .woocommerce-pagination ul li span {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--gb-border);
  border-radius: 4px;
  color: var(--gb-navy);
  text-decoration: none;
}

.shop-main .woocommerce-pagination ul li a:hover {
  background: var(--gb-navy);
  color: var(--gb-white);
  border-color: var(--gb-navy);
}

.shop-main .woocommerce-pagination ul li span.current {
  background: var(--gb-navy);
  color: var(--gb-white);
  border-color: var(--gb-navy);
}

/* No products found */
.shop-main .woocommerce-info {
  padding: 1.5rem;
  background: #f5f5f5;
  border-radius: 8px;
  text-align: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .shop-main ul.products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .shop-page-wrapper {
    flex-direction: column;
    padding: 1.5rem;
  }

  .shop-sidebar {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .shop-sidebar > * {
    flex: 1;
    min-width: 200px;
    margin-top: 0 !important;
  }

  .shop-main ul.products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .shop-page-wrapper {
    padding: 1rem;
  }

  .shop-sidebar {
    flex-direction: column;
  }

  .shop-sidebar > * {
    min-width: 100%;
  }

  .shop-main ul.products {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .shop-section .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .shop-section .section-header h2 {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .shop-main ul.products {
    grid-template-columns: 1fr;
  }

  .shop-main .woocommerce-result-count,
  .shop-main .woocommerce-ordering {
    float: none;
    text-align: center;
    margin-bottom: 1rem;
  }
}
