.shop-content ul.products li.product img,
.shop-content .shop-grid > .products > li.product img {
  display: block;
  width: 80%;
  max-width: 80%;
  height: 420px;
  min-height: 420px;
  object-fit: contain;
  object-position: center;
  border-radius: 16px;
  margin: 0 auto;
}

.shop-content .products a,
.shop-content .products .woocommerce-LoopProduct-link,
.shop-content .products .woocommerce-loop-product__title,
.shop-content .products .price,
.shop-content .products .amount {
  color: var(--text) !important;
  text-decoration: none;
}

.shop-content .products .woocommerce-loop-product__title {
  margin: 0;
  text-align: center;
  line-height: 1.35;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  color: var(--text) !important;
}

.shop-content .products .price {
  margin: 0;
  text-align: center;
}

.shop-content .products .button,
.shop-content .products a.button,
.shop-content .products button,
.shop-content .products .added_to_cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  text-align: center;
  white-space: nowrap;
}

.shop-content ul.products li.product .button,
.shop-content ul.products li.product .added_to_cart,
.shop-content ul.products li.product .woocommerce-loop-product__link + .button {
  align-self: center;
}

.shop-content .products a:hover,
.shop-content .products .woocommerce-LoopProduct-link:hover,
.shop-content .products .woocommerce-loop-product__title:hover {
  color: var(--accent) !important;
}

@media (max-width: 800px) {
  .shop-content .shop-grid > .products,
  .shop-content .woocommerce .shop-grid > .products,
  .shop-content ul.products {
    grid-template-columns: 1fr;
  }

  .shop-content ul.products li.product img,
  .shop-content .shop-grid > .products > li.product img {
    height: 280px;
  }
}

/* fallback for shop listing when the custom wrapper isn't rendered */
body.woocommerce-shop .page-content .woocommerce-result-count,
body.woocommerce-shop .page-content .woocommerce-ordering,
body.woocommerce-shop .page-content .woocommerce-breadcrumb,
body.woocommerce-shop .page-content .woocommerce-viewing {
  display: none !important;
}

body.woocommerce-shop .page-content :is(.shop-grid > .products, .woocommerce .shop-grid > .products, ul.products) {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

body.woocommerce-shop .page-content :is(.shop-grid > .products > li.product, ul.products > li.product) {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: 20px;
  background: rgba(14, 14, 18, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 32px rgba(0, 0, 0, 0.3);
}

body.woocommerce-shop .page-content :is(ul.products li.product > a, .shop-grid > .products > li.product > a, ul.products li.product .woocommerce-LoopProduct-link) {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

body.woocommerce-shop .page-content :is(ul.products li.product img, .shop-grid > .products > li.product img) {
  display: block;
  width: 80%;
  max-width: 80%;
  height: 420px;
  min-height: 420px;
  object-fit: contain;
  object-position: center;
  border-radius: 16px;
  margin: 0 auto;
}

body.woocommerce-shop .page-content .products a,
body.woocommerce-shop .page-content .products .woocommerce-LoopProduct-link,
body.woocommerce-shop .page-content .products .woocommerce-loop-product__title,
body.woocommerce-shop .page-content .products .price,
body.woocommerce-shop .page-content .products .amount {
  color: var(--text) !important;
  text-decoration: none;
}

body.woocommerce-shop .page-content .products .woocommerce-loop-product__title {
  margin: 0;
  text-align: center;
  line-height: 1.35;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  color: var(--text) !important;
}

body.woocommerce-shop .page-content .products .price {
  margin: 0;
  text-align: center;
}

body.woocommerce-shop .page-content .products .button,
body.woocommerce-shop .page-content .products a.button,
body.woocommerce-shop .page-content .products button,
body.woocommerce-shop .page-content .products .added_to_cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  text-align: center;
  white-space: nowrap;
}

body.woocommerce-shop .page-content ul.products li.product .button,
body.woocommerce-shop .page-content ul.products li.product .added_to_cart,
body.woocommerce-shop .page-content ul.products li.product .woocommerce-loop-product__link + .button {
  align-self: center;
  margin-top: auto;
}

body.woocommerce-shop .page-content .products a:hover,
body.woocommerce-shop .page-content .products .woocommerce-LoopProduct-link:hover,
body.woocommerce-shop .page-content .products .woocommerce-loop-product__title:hover {
  color: var(--accent) !important;
}

@media (max-width: 800px) {
  body.woocommerce-shop .page-content :is(.shop-grid > .products, .woocommerce .shop-grid > .products, ul.products) {
    grid-template-columns: 1fr;
  }

  body.woocommerce-shop .page-content :is(ul.products li.product img, .shop-grid > .products > li.product img) {
    height: 280px;
    min-height: 280px;
  }
}

/* Force exact casing on shop titles instead of uppercase */
body.woocommerce-shop .page-content .products .woocommerce-loop-product__title,
.shop-grid .product h2,
.page-content .products .product h2 {
  text-transform: none !important;
}

/* Fix for WooCommerce clearfix pseudo-elements becoming grid items and pushing products to the right */
body.woocommerce-shop .page-content ul.products::before,
body.woocommerce-shop .page-content ul.products::after {
  display: none !important;
  content: none !important;
}

/* Ensure the grid items are centered if the row isn't fully populated */
body.woocommerce-shop .page-content :is(.shop-grid > .products, .woocommerce .shop-grid > .products, ul.products) {
  justify-content: center;
}

/* WooCommerce Notices (Success, Error, Info) Dark Theme Styling */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
  background: rgba(14, 14, 18, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-top: 3px solid var(--accent) !important;
  color: var(--text) !important;
  border-radius: 14px;
  margin-bottom: 32px !important;
  padding: 16px 24px !important;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.woocommerce-message::before,
.woocommerce-error::before,
.woocommerce-info::before {
  color: var(--accent) !important;
}

/* "View cart" or other buttons inside the notice */
.woocommerce-message .button,
.woocommerce-error .button,
.woocommerce-info .button {
  background: linear-gradient(135deg, #ffcc33, #f0a500) !important;
  color: #111 !important;
  border-radius: 999px !important;
  border: none !important;
  font-weight: 700 !important;
  padding: 10px 24px !important;
  box-shadow: none !important;
  text-transform: none !important;
  line-height: 1.2 !important;
  float: right; /* To align with the native layout correctly */
  margin-top: -4px !important; /* Visual vertical center adjust */
}

.woocommerce-message .button:hover,
.woocommerce-error .button:hover,
.woocommerce-info .button:hover {
  opacity: 0.95 !important;
}


/* Enforce absolute link colors sitewide - kill WP default blues */
main a:not(.btn):not(.button) {
    color: var(--accent) !important;
    text-decoration: none !important;
}

main a:not(.btn):not(.button):hover {
    filter: brightness(1.15);
    text-decoration: underline !important;
}

h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    color: var(--text) !important;
}

h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
    color: var(--accent) !important;
}


/* Force responsive resizing on all raw iframes */
.post-content iframe {
  max-width: 100% !important;
  border-radius: 12px;
}


/* =========================================================================
   SupportCandy Dark Mode Variables & Overrides
   ========================================================================= */

/* Strip background blocks and force dark panels */
.wpsc-ticket-list,
.wpsc-ticket-container,
.wpsc-form,
.wpsc-frontend-wrap,
#wpsc_tickets_container {
    background: transparent !important;
    background-color: transparent !important;
    color: var(--text) !important;
}

/* Force dark panels for actual cards/headers inside SupportCandy */
.wpsc-panel, 
.wpsc-ticket-reply, 
.wpsc-ticket-history,
.wpsc-ticket-header,
.wpsc-tabs .wpsc-tab-nav {
    background: rgba(14, 14, 18, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    color: var(--text) !important;
}

/* Headings and labels */
.wpsc-frontend-wrap h1,
.wpsc-frontend-wrap h2,
.wpsc-frontend-wrap h3,
.wpsc-frontend-wrap h4,
.wpsc-frontend-wrap label,
.wpsc-frontend-wrap span.wpsc-label,
.wpsc-frontend-wrap .wpsc-title,
.wpsc-frontend-wrap .wpsc-staff-name {
    color: var(--text) !important;
}

/* Inputs, Textareas, Selects */
.wpsc-frontend-wrap input[type=text],
.wpsc-frontend-wrap input[type=email],
.wpsc-frontend-wrap input[type=password],
.wpsc-frontend-wrap input[type=number],
.wpsc-frontend-wrap input[type=search],
.wpsc-frontend-wrap select,
.wpsc-frontend-wrap textarea,
.wpsc-input-tag,
.wpsc-frontend-wrap .select2-container--default .select2-selection--single,
.wpsc-frontend-wrap .select2-container--default .select2-selection--multiple {
    background-color: #0a0b10 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
}

.wpsc-frontend-wrap input:focus,
.wpsc-frontend-wrap select:focus,
.wpsc-frontend-wrap textarea:focus {
    border-color: rgba(255, 204, 51, 0.85) !important;
    box-shadow: 0 0 0 3px rgba(255, 204, 51, 0.15) !important;
    outline: none !important;
}

/* Buttons */
.wpsc-frontend-wrap button,
.wpsc-frontend-wrap input[type=submit],
.wpsc-btn,
.wpsc-button {
    background: linear-gradient(135deg, #ffcc33, #f0a500) !important;
    color: #111 !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
    border: none !important;
    padding: 10px 24px !important;
    cursor: pointer !important;
    transition: filter 0.2s ease !important;
    text-shadow: none !important;
}

.wpsc-frontend-wrap button:hover,
.wpsc-frontend-wrap input[type=submit]:hover,
.wpsc-btn:hover,
.wpsc-button:hover {
    filter: brightness(1.08) !important;
}

/* Ticket List Table Rows */
.wpsc-frontend-wrap table, 
.wpsc-frontend-wrap th, 
.wpsc-frontend-wrap td {
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--text) !important;
}

.wpsc-frontend-wrap table th {
    background: rgba(255, 255, 255, 0.04) !important;
}

.wpsc-frontend-wrap table tbody tr {
    background: transparent !important;
}
.wpsc-frontend-wrap table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02) !important;
}
.wpsc-frontend-wrap table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Thread Replies */
.wpsc-ticket-reply.wpsc-staff-reply {
    border-left: 4px solid var(--accent) !important;
}

/* Status Badges */
.wpsc-status-badge {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-radius: 4px !important;
}

/* Modal and Drawers */
.wpsc-modal-content {
    background-color: rgba(20, 20, 25, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text) !important;
}

/* Hide default SupportCandy user-profile & logout elements */
.wpsc-ticket-list .wpsc-user-profile-menu,
.wpsc-header .wpsc-user-menu,
.wpsc-user-icon,
.wpsc-user-menu-item-logout,
.wpsc-logout-btn,
.wpsc-my-profile-link {
    display: none !important;
}

/* Nuke SupportCandy's "header action container" if it just houses profile links */
.wpsc-header-right > .wpsc-user-profile {
    display: none !important;
}

/* Also kill standard CSS selectors SupportCandy uses for top-right logout options */
ul.wpsc-user-menu {
    display: none !important;
}





/* Robust bbPress Container Clear Fix */
#bbpress-forums,
#bbpress-forums ul,
#bbpress-forums li {
  overflow: visible !important;
}
#bbpress-forums ul.bbp-lead-topic::after,
#bbpress-forums ul.bbp-topics::after,
#bbpress-forums ul.bbp-forums::after,
#bbpress-forums ul.bbp-replies::after,
#bbpress-forums ul.bbp-search-results::after,
#bbpress-forums li.bbp-header::after,
#bbpress-forums li.bbp-body::after,
#bbpress-forums li.bbp-footer::after {
  content: "";
  display: table;
  clear: both;
}
.bbp-forum-info, .bbp-topic-title { float: left; width: 55%; box-sizing: border-box; }
.bbp-topic-voice-count, .bbp-topic-reply-count, .bbp-forum-topic-count, .bbp-forum-reply-count { float: left; width: 10%; box-sizing: border-box; text-align: center; }
.bbp-topic-freshness, .bbp-forum-freshness { float: left; width: 25%; box-sizing: border-box; text-align: center; }

/* Final stabilizers: homepage first frame + shop card width */
body.home .hero {
  min-height: 72vh !important;
  padding: 72px 40px 56px !important;
}

body.home .section {
  padding: 48px 40px 40px !important;
}

body.woocommerce-shop .shop-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 360px)) !important;
  justify-content: center !important;
}

body.woocommerce-shop .shop-grid .product {
  width: 100% !important;
  max-width: 360px !important;
}

body.woocommerce-shop .shop-grid .product img {
  height: 300px !important;
  min-height: 0 !important;
  max-height: 320px !important;
}

@media (max-width: 960px) {
  body.home .hero {
    min-height: 62vh !important;
    padding: 56px 24px 40px !important;
  }

  body.woocommerce-shop .shop-grid {
    grid-template-columns: minmax(280px, 360px) !important;
  }
}

/* Shop: single product should stay compact, not stretched */
body.woocommerce-shop ul.products li.product:only-child,
body.woocommerce-shop .shop-grid > .products > li.product:only-child {
  width: min(360px, 92vw) !important;
  max-width: 360px !important;
  flex: 0 0 auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 24px !important;
}

body.woocommerce-shop ul.products li.product:only-child .button,
body.woocommerce-shop .shop-grid > .products > li.product:only-child .button,
body.woocommerce-shop ul.products li.product:only-child .added_to_cart,
body.woocommerce-shop .shop-grid > .products > li.product:only-child .added_to_cart {
  width: auto !important;
  align-self: center !important;
  padding: 12px 28px !important;
}

/* Final home hero viewport fit: keep Explore below fold on first frame */
body.home .hero {
  min-height: calc(100dvh - 100px) !important;
  padding: 64px 40px 48px !important;
}

body.admin-bar.home .hero {
  min-height: calc(100dvh - 132px) !important;
}

@media (max-width: 782px) {
  body.home .hero {
    min-height: calc(100dvh - 88px) !important;
    padding: 48px 24px 36px !important;
  }

  body.admin-bar.home .hero {
    min-height: calc(100dvh - 134px) !important;
  }
}

/* Shop final: true single-item centering + compact size */
body.woocommerce-shop ul.products {
  justify-content: center !important;
  justify-items: center !important;
}

body.woocommerce-shop ul.products li.product:only-child {
  justify-self: center !important;
  width: min(320px, 92vw) !important;
  max-width: 320px !important;
  padding: 18px !important;
  margin: 0 auto !important;
}

body.woocommerce-shop ul.products li.product:only-child img {
  height: 260px !important;
  max-height: 280px !important;
}
