/* =========================================================
   Header Branding
   Applies to: .header-inner, .custom-logo, .site-header::after
   Purpose: Position logo and render the rainbow divider under the header.
   ========================================================= */

/* Align logo container content to the left. */
.header-inner {
  justify-content: flex-start;
}

/* Increase logo size while preserving aspect ratio. */
.custom-logo {
  max-height: 150px;
  width: auto;
}

/* Reduce logo size on smaller screens. */
@media (max-width: 700px) {
  .custom-logo {
    max-height: 72px;
  }
}

/* Add spacing and anchor the pseudo-element divider. */
.site-header {
  position: relative;
  margin-bottom: 12px;
}

/* Gradient divider displayed below the header. */
.site-header::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(980px, calc(100% - 36px));
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    #003f5b,
    #2b4b7d,
    #5f5195,
    #98509d,
    #cc4c91,
    #f25375,
    #ff6f4e,
    #ff9913
  );
}

/* Slim divider height on mobile. */
@media (max-width: 600px) {
  .site-header::after {
    height: 5px;
  }
}

/* =========================================================
   Product Page Card + Typography
   Applies to: .container and WooCommerce product text/controls.
   Purpose: Keep the product area readable and visually card-like.
   ========================================================= */

/* Main product card container. */
.container {
  margin-top: 16px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  color: #000000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

/* Enforce dark text inside the product card and descendants. */
.container,
.container h1,
.container h2,
.container h3,
.container h4,
.container h5,
.container h6,
.container p,
.container span,
.container li,
.container div {
  color: #000000;
}

/* Product title color. */
.woocommerce div.product .product_title {
  color: #000000;
}

/* Product price color. */
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: #000000;
}

/* Product short description and tab panel text color. */
.woocommerce-product-details__short-description,
.woocommerce div.product .woocommerce-tabs .panel {
  color: #000000;
}

/* Default and active tab link color. */
.woocommerce div.product .woocommerce-tabs ul.tabs li a,
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
  color: #000000 !important;
}

/* WooCommerce button contrast on product and generic button controls. */
.woocommerce div.product form.cart .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: #000000;
  color: #ffffff;
  border: none;
}

/* Darken button background on hover. */
.woocommerce div.product form.cart .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  background: #222222;
}

/* Hide SKU/category/tag metadata block on single product pages. */
.woocommerce div.product .product_meta {
  display: none;
}

/* Hide Reviews tab when product is shown on main/landing page (front, home, landing-soon). */
.front-page .woocommerce-tabs .reviews_tab,
.front-page .woocommerce-tabs #tab-reviews,
.home .woocommerce-tabs .reviews_tab,
.home .woocommerce-tabs #tab-reviews,
.page-slug-landing-soon .woocommerce-tabs .reviews_tab,
.page-slug-landing-soon .woocommerce-tabs #tab-reviews {
  display: none !important;
}

/* =========================================================
   Product Gallery Tweaks
   Applies to: .woocommerce div.product div.images and thumbnail elements.
   Purpose: Add spacing and subtle rounding around gallery thumbnails.
   ========================================================= */

/* Add internal spacing around the image gallery block. */
.woocommerce div.product div.images {
  padding: 16px;
  box-sizing: border-box;
}

/* Add vertical breathing room around thumbnail strip. */
.woocommerce div.product div.images .flex-control-thumbs {
  padding: 12px 0;
}

/* Add spacing between each thumbnail tile. */
.woocommerce div.product div.images .flex-control-thumbs li {
  padding: 6px;
  box-sizing: border-box;
}

/* Round thumbnail image corners slightly. */
.woocommerce div.product div.images .flex-control-thumbs img {
  border-radius: 8px;
}

/* =========================================================
   Section Divider
   Applies to: .section-divider
   Purpose: Reusable rainbow divider between page sections.
   ========================================================= */

/* Standalone gradient divider element between content sections. */
.section-divider {
  height: 10px;
  margin: 26px auto;
  width: min(980px, calc(100% - 36px));
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    #003f5b,
    #2b4b7d,
    #5f5195,
    #98509d,
    #cc4c91,
    #f25375,
    #ff6f4e,
    #ff9913
  );
}

/* Reduce divider thickness and spacing on mobile. */
@media (max-width: 600px) {
  .section-divider {
    height: 5px;
    margin: 24px auto;
  }
}

/* =========================================================
   Resource Links Card
   Applies to: .resource-card, .resource-links, .resource-link
   Purpose: Style the link card shown beneath product content.
   ========================================================= */

/* Wrapper card for downloadable/resource links. */
.resource-card {
  max-width: var(--max);
  margin: 26px auto 0;
  padding: 16px;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: var(--radius);
}

/* Horizontal/wrapping row that contains resource links. */
.resource-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Individual resource link pill/button. */
.resource-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #a0a0a0;
  color: #000;
  font-size: 18px;
  text-decoration: none;
  transition: transform 120ms ease, background 120ms ease;
}

/* Hover state for resource links. */
.resource-link:hover {
  background: #ededed;
  transform: translateY(-1px);
}

/* Icon sizing inside resource links. */
.resource-link .icon {
  font-size: 32px;
  line-height: 1;
}

/* Stack resource links on narrow screens. */
@media (max-width: 600px) {
  .resource-card {
    margin-top: 12px;
    padding: 14px;
  }

  .resource-link {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* =========================================================
   Featured Post Card
   Applies to: .resource-post-card and nested post/media/content elements.
   Purpose: Show one WordPress post under resource links with image left and text right.
   ========================================================= */

/* Wrapper card: same width as .container, spacing above product listing. */
.resource-post-card {
  max-width: var(--max);
  margin: 0 auto 36px;
  padding: 18px 18px 20px;

  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: var(--radius);
}

/* Two-column layout for image + text content. */
.resource-post {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 18px;
  align-items: start;
}

/* Clickable media column for the post thumbnail. */
.resource-post-media {
  display: block;
  text-decoration: none;
}

/* Post thumbnail sizing and presentation. */
.resource-post-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid #d8d8d8;
}

/* Text column that holds title, excerpt, and CTA. */
.resource-post-content {
  min-width: 0;
}

/* Post title line and spacing. */
.resource-post-title {
  margin: 0 0 10px;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.15;
}

/* Title link styling. */
.resource-post-title a {
  color: #000;
  text-decoration: none;
}

.resource-post-title a:hover {
  text-decoration: underline;
}

/* Post excerpt typography and spacing. */
.resource-post-excerpt {
  color: #111;
  font-size: 17px;
  line-height: 1.55;
}

/* Keep excerpt paragraph spacing tight if WP wraps text in <p>. */
.resource-post-excerpt p {
  margin: 0;
}

/* Read-more call to action beneath excerpt text. */
.resource-post-readmore {
  display: inline-block;
  margin-top: 14px;
  padding: 9px 14px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  text-decoration: none;
}

.resource-post-readmore:hover {
  background: #222;
}

/* Stack image above text on narrower screens. */
@media (max-width: 700px) {
  .resource-post-card {
    padding: 14px;
    margin-bottom: 40px;
  }

  .resource-post {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .resource-post-title {
    font-size: 24px;
  }

  .resource-post-excerpt {
    font-size: 16px;
  }
}

/* =========================================================
   Header Cart UI
   Applies to: .header-bar, .rad-cart-toggle, .rad-cart-panel*
   Purpose: Layout and style the slide-out mini-cart controls.
   ========================================================= */

/* Header utility row that contains logo/nav/cart groups. */
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

/* Left and right sub-containers within the header bar. */
.header-left,
.header-right {
  display: flex;
  align-items: center;
}

/* Cart toggle button in the header. */
.rad-cart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Cart toggle hover state. */
.rad-cart-toggle:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Text label next to cart icon/count. */
.rad-cart-text {
  font-size: 14px;
}

/* Numeric cart badge count bubble. */
.rad-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ffffff;
  color: #000000;
  font-size: 12px;
  line-height: 1;
}

/* Full-page dimming overlay behind the cart drawer. */
.rad-cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

/* Slide-out cart panel container. */
.rad-cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  width: min(420px, 92vw);
  height: 100vh;
  background: #ffffff;
  color: #000000;
  transform: translateX(100%);
  transition: transform 220ms ease;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.35);
}

/* Activate overlay and panel when JS adds .cart-open to <html>. */
.cart-open .rad-cart-overlay {
  opacity: 1;
  pointer-events: auto;
}

.cart-open .rad-cart-panel {
  transform: translateX(0);
}

/* Panel header row with title and close button. */
.rad-cart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e5e5;
}

/* Cart panel title text. */
.rad-cart-panel-title {
  font-size: 16px;
  font-weight: 700;
}

/* Close button within cart panel header. */
.rad-cart-close {
  background: transparent;
  border: 0;
  font-size: 18px;
  cursor: pointer;
}

/* Scrollable body region of the cart panel. */
.rad-cart-panel-body {
  flex: 1;
  overflow: auto;
  padding: 14px 16px;
}

/* Force mini-cart text to remain readable on white panel background. */
.rad-cart-panel .woocommerce-mini-cart,
.rad-cart-panel .woocommerce-mini-cart-item,
.rad-cart-panel .woocommerce-mini-cart__total,
.rad-cart-panel .woocommerce-mini-cart__buttons {
  color: #000;
}

/* Base mini-cart action button styling in the panel. */
.rad-cart-panel .woocommerce-mini-cart__buttons a.button {
  background: #000;
  color: #fff;
  border: 0;
  border-radius: 12px;
}

/* Panel footer action row. */
.rad-cart-panel-footer {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid #e5e5e5;
}

/* Equal-width footer buttons. */
.rad-cart-panel-footer .button {
  flex: 1 1 50%;
  text-align: center;
}

/* Stack and space mini-cart action buttons under subtotal. */
.rad-cart-panel .woocommerce-mini-cart__buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  background: #f0f0f0;
  color: #000000;
}

/* Increase touch target and readability for mini-cart buttons. */
.rad-cart-panel .woocommerce-mini-cart__buttons a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  min-height: 32px;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.1;
  border-radius: 14px;
  white-space: nowrap;
}

/* =========================================================
   Contact Form Styles
   Applies to: .rad-contact-form and success/error states.
   Purpose: Style the [rad_contact_form] shortcode markup.
   ========================================================= */

/* Grid layout for form fields. */
.rad-contact-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

/* Field label text above inputs. */
.rad-contact-form label span {
  display: block;
  margin-bottom: 6px;
  color: #000;
  font-size: 13px;
}

/* Input and textarea controls within the contact form. */
.rad-contact-form input,
.rad-contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font: inherit;
}

/* Shared alert box spacing/shape for success and error messages. */
.rad-contact-success,
.rad-contact-error {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
}

/* Successful form submission state. */
.rad-contact-success {
  background: #eefcf2;
  border: 1px solid #bfe8c8;
  color: #0b5f22;
}

/* Failed form submission state. */
.rad-contact-error {
  background: #fff0f0;
  border: 1px solid #f2b3b3;
  color: #7a0b0b;
}

/* Submit button style for contact form. */
.rad-contact-submit {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: #000;
  color: #fff;
}

/* =========================================================
   Header Navigation Styles
   Applies to: .header-nav, .rad-menu and links.
   Purpose: Base desktop menu look (mobile behavior is inline CSS in PHP).
   ========================================================= */

/* Spacing between logo/cart area and nav list. */
.header-nav {
  margin-left: 18px;
}

/* Horizontal nav list layout. */
.rad-menu {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Nav link visual style. */
.rad-menu a {
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Nav link hover state. */
.rad-menu a:hover {
  background: rgba(0, 0, 0, 0.22);
}

/* =========================================================
   Contact Info Block
   Applies to: .contact-info-block and child items/links.
   Purpose: Style informational email/contact cards on the contact page.
   ========================================================= */

/* Responsive grid wrapper for contact info entries. */
.contact-info-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: var(--radius);
}

/* Individual contact info entry text styling. */
.contact-info-item {
  font-size: 20px;
  color: #000;
}

/* Bold label line inside each contact info entry. */
.contact-info-item strong {
  display: block;
  margin-bottom: 4px;
}

/* Contact link appearance. */
.contact-info-item a {
  color: #000;
  text-decoration: none;
}

/* Underline contact links on hover. */
.contact-info-item a:hover {
  text-decoration: underline;
}
