/* ============================================================
   GlowBayBD — Brand Archive (Desktop Premium Marketplace UX)
   Enqueued ONLY on product_brand taxonomy.
   ALL desktop grid/card/hero/toolbar rules are scoped to
   @media (min-width:769px) so the mobile Brand Archive
   (React gbs-grid) is UNTOUCHED and protected.
   ============================================================ */

.brand-archive{background:#fff;padding:0 0 64px;}
.ba-wrap{max-width:1320px;margin:0 auto;padding:0 28px;}

/* ---- Breadcrumb (safe on all) ---- */
.ba-breadcrumb{font-family:"Inter",sans-serif;font-size:13px;color:#9a9a9a;padding:20px 0 8px;}
.ba-breadcrumb a{color:#777;text-decoration:none;}
.ba-breadcrumb a:hover{color:#FF6B00;}
.ba-breadcrumb .ba-sep{margin:0 9px;color:#ccc;}
.ba-breadcrumb .ba-current{color:#444;font-weight:600;}

/* ---- Premium Brand Hero (card) ---- */
.ba-hero{position:relative;display:flex;align-items:center;gap:26px;padding:30px 34px;margin:8px 0 26px;
  background:linear-gradient(135deg,#fff8f1 0%,#fffdfb 60%,#ffffff 100%);
  border:1px solid #f1e3d6;border-radius:22px;overflow:hidden;flex-wrap:wrap;}
.ba-hero::after{content:"";position:absolute;right:-40px;top:-40px;width:180px;height:180px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,107,0,.08),transparent 70%);pointer-events:none;}
.ba-hero-logo{flex:0 0 auto;width:108px;height:108px;display:flex;align-items:center;justify-content:center;
  background:#fff;border:1px solid #f0e6dc;border-radius:20px;padding:16px;overflow:hidden;box-shadow:0 6px 18px rgba(0,0,0,.05);}
.ba-hero-logo img{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;display:block;}
.ba-hero-fallback{font-family:"Playfair Display",serif;font-size:48px;color:#FF6B00;font-weight:700;}
.ba-hero-meta{flex:1 1 auto;min-width:220px;}
.ba-hero-title{font-family:"Playfair Display",serif;font-size:36px;line-height:1.05;margin:0 0 10px;color:#1d1d1d;letter-spacing:-.3px;}
.ba-hero-sub{display:flex;align-items:center;gap:14px;flex-wrap:wrap;font-family:"Inter",sans-serif;margin-bottom:4px;}
.ba-hero-count{display:inline-flex;align-items:baseline;gap:6px;font-size:14px;color:#777;}
.ba-hero-count strong{font-family:"Playfair Display",serif;font-size:22px;color:#FF6B00;font-weight:700;}
.ba-hero-count .ba-pc-label{font-weight:600;color:#444;}
.ba-hero-badge{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;color:#1a8a4a;
  background:#eafaf0;border:1px solid #c7efd6;padding:5px 12px;border-radius:999px;}
.ba-hero-desc{font-family:"Inter",sans-serif;font-size:14px;color:#777;line-height:1.6;margin:12px 0 0;max-width:640px;}

/* ---- Toolbar ---- */
.ba-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
  padding:4px 0 22px;border-bottom:1px solid #f1ece6;margin-bottom:26px;}
.ba-toolbar-count{font-family:"Inter",sans-serif;font-size:15px;color:#666;font-weight:600;}
.ba-toolbar-count b{color:#1d1d1d;}
.ba-sort{display:flex;align-items:center;gap:10px;font-family:"Inter",sans-serif;}
.ba-sort label{font-size:13px;color:#999;display:inline-flex;align-items:center;gap:6px;}
.ba-sort select{font-family:"Inter",sans-serif;font-size:14px;font-weight:600;color:#333;padding:11px 38px 11px 16px;
  border:1.5px solid #f0e6dc;border-radius:12px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23bbb' d='M6 8L2 4h8z'/%3E%3C/svg%3E") no-repeat right 14px center;
  appearance:none;-webkit-appearance:none;cursor:pointer;outline:none;transition:border-color .15s,box-shadow .15s;}
.ba-sort select:focus{border-color:#FF6B00;box-shadow:0 0 0 4px rgba(255,107,0,.10);}

/* ---- Explore other brands ---- */
.ba-explore{margin-top:58px;padding-top:38px;border-top:1px solid #f1ece6;}
.ba-explore-title{font-family:"Playfair Display",serif;font-size:24px;margin:0 0 20px;color:#1d1d1d;}
.ba-explore-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;}
.ba-explore-card{display:flex;flex-direction:column;justify-content:center;gap:5px;padding:20px 18px;background:#fff;
  border:1px solid #f0e6dc;border-radius:16px;text-decoration:none;box-shadow:0 4px 14px rgba(0,0,0,.04);
  transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease;box-sizing:border-box;}
.ba-explore-card:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(255,107,0,.12);border-color:#ffd9bd;}
.ba-explore-name{font-family:"Inter",sans-serif;font-size:14px;font-weight:600;color:#222;}
.ba-explore-count{font-family:"Inter",sans-serif;font-size:12px;color:#FF6B00;font-weight:600;}

/* ============================================================
   DESKTOP-ONLY premium product grid + cards
   ============================================================ */
@media (min-width:769px){

  .brand-archive .products{display:grid;grid-template-columns:repeat(4,1fr);gap:24px;margin:0 0 34px;padding:0;list-style:none;}
  .brand-archive .products::before,
  .brand-archive .products::after{display:none !important;content:"";}
  .brand-archive li.product{margin:0;width:100% !important;}

  /* Card */
  .brand-archive li.product{position:relative;background:#fff;border:1px solid #f0e6dc;border-radius:20px;overflow:hidden;
    box-shadow:0 4px 16px rgba(0,0,0,.045);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
    display:flex;flex-direction:column;}
  .brand-archive li.product:hover{transform:translateY(-6px);box-shadow:0 18px 38px rgba(255,107,0,.15);border-color:#ffd9bd;}

  .brand-archive li.product .woocommerce-loop-product__link{display:flex;flex-direction:column;text-decoration:none;color:inherit;}

  /* Image area — premium, contained */
  .brand-archive li.product img.attachment-woocommerce_thumbnail{width:100%;height:auto;aspect-ratio:1/1;object-fit:contain;
    background:linear-gradient(180deg,#fafafa,#f5f5f7);padding:22px;box-sizing:border-box;transition:transform .25s ease;}
  .brand-archive li.product:hover img.attachment-woocommerce_thumbnail{transform:scale(1.04);}

  /* Sale badge */
  .brand-archive li.product .onsale{position:absolute;top:14px;left:14px;background:#FF6B00;color:#fff;
    font-family:"Inter",sans-serif;font-size:11px;font-weight:700;letter-spacing:.3px;padding:5px 11px;border-radius:999px;z-index:2;
    box-shadow:0 3px 8px rgba(255,107,0,.3);}

  /* Title */
  .brand-archive li.product .woocommerce-loop-product__title{font-family:"Inter",sans-serif;font-size:15px;font-weight:600;
    color:#222;line-height:1.4;padding:18px 18px 8px;margin:0;min-height:46px;}

  /* Price — dominant */
  .brand-archive li.product .price{font-family:"Inter",sans-serif;padding:0 18px 18px;font-size:15px;
    display:flex;align-items:baseline;gap:9px;flex-wrap:wrap;}
  .brand-archive li.product .price ins{color:#FF6B00;font-weight:800;text-decoration:none;font-size:19px;order:-1;}
  .brand-archive li.product .price del{color:#aab;font-size:13px;font-weight:500;}

  /* Add to cart — premium orange CTA */
  .brand-archive li.product .add_to_cart_button{display:block;margin:0 18px 18px;padding:13px 16px;border-radius:12px;
    background:#FF6B00;color:#fff;font-family:"Inter",sans-serif;font-size:14px;font-weight:700;text-align:center;
    text-decoration:none;transition:background .15s ease,transform .12s ease,box-shadow .15s ease;box-shadow:0 4px 12px rgba(255,107,0,.22);}
  .brand-archive li.product .add_to_cart_button:hover{background:#e85f00;transform:translateY(-1px);box-shadow:0 7px 16px rgba(255,107,0,.3);}
  .brand-archive li.product .add_to_cart_button:active{transform:translateY(0);}
  .brand-archive li.product .add_to_cart_button.added{background:#1a8a4a;}
  .brand-archive li.product .add_to_cart_button.loading{opacity:.7;}

  /* Pagination */
  .brand-archive .woocommerce-pagination{margin-top:16px;}
  .brand-archive .woocommerce-pagination ul.page-numbers{display:flex;gap:8px;justify-content:center;list-style:none;padding:0;flex-wrap:wrap;}
  .brand-archive .woocommerce-pagination .page-numbers{padding:11px 16px;border:1px solid #f0e6dc;border-radius:11px;
    color:#555;text-decoration:none;font-family:"Inter",sans-serif;font-size:14px;transition:all .15s;}
  .brand-archive .woocommerce-pagination .page-numbers.current,
  .brand-archive .woocommerce-pagination .page-numbers:hover{background:#FF6B00;color:#fff;border-color:#FF6B00;}

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

/* ---- Responsive desktop widths ---- */
@media (min-width:769px) and (max-width:1100px){
  .brand-archive .products{grid-template-columns:repeat(3,1fr);gap:20px;}
  .ba-explore-grid{grid-template-columns:repeat(4,1fr);}
  .ba-wrap{max-width:1080px;}
}
@media (min-width:769px) and (max-width:860px){
  .brand-archive .products{grid-template-columns:repeat(2,1fr);gap:18px;}
}

/* ---- Pagination centered on all ---- */
.brand-archive .woocommerce-pagination{text-align:center;margin-top:12px;}
.brand-archive .woocommerce-pagination ul.page-numbers{justify-content:center;}
