/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      2.0
 Text Domain:  bricks
*/

:root {
  --spacing-sm: 12px;
  --spacing-md: 24px;
  --radius: 8px;
  --color-primary: #0073e6;
}

/* ==========================================================================
   1. GLOBAL STYLES & TYPOGRAPHY
   ========================================================================== */

/* Set global font to Century Gothic */
body {
  font-family: 'Century Gothic', sans-serif;
}

/* Adjust H1 font size to 25px */
h1 {
  font-size: 25px;
}
h2 {
  font-size: 20px;
}

img,
video {
  max-width: 100%;
  height: auto;
}

/* Added new img rule with border-radius from your snippet */
img {
  max-width:100%; height:auto;
  border-radius: var(--radius);
}

/* Added new blockquote style from your snippet */
blockquote {
  border-left: 3px solid var(--color-primary);
  padding-left: var(--spacing-sm);
}

/* Tooltip, Empty Element */
.tooltip {
  display: none !important;
}
.wc-block-grid__product a:empty {
  display: none !important;
}

/* Apply Century Gothic font to product short description elements */
.product-short-description,
.product-short-description * {
  font-family: "Century Gothic", sans-serif;
}


/* ==========================================================================
   2. FONT FACE DECLARATIONS
   ========================================================================== */
@font-face {
  font-family: 'COPPERPLATE';
  src: url('https://www.totebagscanvas.com/wp-content/uploads/COPPERPLATE.TTF') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DIDOT BOLD';
  src: url('https://www.totebagscanvas.com/wp-content/uploads/DIDOT-BOLD.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Monogram-Stripes-test';
  src: url('https://www.totebagscanvas.com/wp-content/uploads/Monogram-Stripes-test.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Drawbertson';
  src: url('https://www.totebagscanvas.com/wp-content/uploads/Drawbertson.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Century Gothic';
  src: url('https://www.totebagscanvas.com/wp-content/uploads/century-gothic.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Century Gothic Bold';
  src: url('https://www.totebagscanvas.com/wp-content/uploads/century-gothic-bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: '0446-Bold';
  src: url('https://www.totebagscanvas.com/wp-content/uploads/0446-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   3. LAYOUT CONTAINERS & SECTIONS
   ========================================================================== */

/* --- Section Containers (Product Descriptions) --- */
/* Updated with your new .section-block definition */
.section-block {
  padding: var(--spacing-md);
  border-radius: var(--radius);
  background-color: #fff;
  margin: var(--spacing-md) auto;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  max-width: 1200px;
}

/* Updated with your new .product-h1 definition */
.product-h1 {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  text-align: center;
  margin-bottom: var(--spacing-md);
}

/* Updated with your new .product-h2 definition */
.product-h2 {
  font-size: clamp(1.25rem, 4vw, 2rem);
  text-align: center;
  margin-bottom: var(--spacing-sm);
}

/* --- Video & Text Flex Layouts (Top Section) --- */
/* Updated with your new .cosmetic-flex-wrapper definition */
.cosmetic-flex-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

/* Updated with your new .cosmetic-video, .cosmetic-text definition */
.cosmetic-video,
.cosmetic-text {
  flex: 1 1 300px;
}

/* Updated with your new .cosmetic-iframe-wrapper definition */
.cosmetic-iframe-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
}

/* Updated with your new .cosmetic-iframe-wrapper iframe definition (identical to old) */
.cosmetic-iframe-wrapper iframe {
  position: absolute;
  top:0; left:0;
  width:100%; height:100%;
  border:0;
}

/* Existing media query for cosmetic-flex-wrapper - should still work with new flex definitions */
@media (max-width: 768px) {
  .cosmetic-flex-wrapper {
    flex-direction: column;
  }
  .cosmetic-video,
  .cosmetic-text {
    width: 100%; /* This might be overridden by flex: 1 1 300px if parent isn't truly column and items can still flex. However, with flex-direction: column, this should make them full width. */
  }
}

/* --- Text & Image Sections (Product Descriptions) --- */
/* Updated with your new .text-image-section definition */
.text-image-section {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  /* Kept align-items: stretch from original for consistency if intended */
  align-items: stretch;
}

/* Updated with your new .text-image-section .text, .image definition */
.text-image-section .text,
.text-image-section .image {
  flex: 1 1 300px;
  padding: var(--spacing-sm);
  /* Kept box-sizing from original, as it's important for flex item sizing with padding */
  box-sizing: border-box;
  /* Kept min-width from original for baseline size before stacking if needed */
  min-width: 280px; /* Adjust or remove if the 300px flex-basis is sufficient */
}

/* Kept original specific image styling within .text-image-section */
.text-image-section .image img {
  width: 100%;
  max-width: 450px;    /* prevents it from getting too wide */
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius);  /* Use new CSS variable, was 8px */
}

/* Kept original media query for .text-image-section */
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;  /* full-width stacking on mobile */
  }
  .text-image-section .image,
  .text-image-section .text {
    width: 100%; /* Complements flex-direction: column */
    min-width: unset;
    padding: var(--spacing-sm) 0; /* Use new CSS variable for vertical padding */
  }
  .text-image-section .image img {
    max-width: 100%;
  }
}

/* --- Checkerboard Sections --- */
.checkerboard-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  max-width: 1200px;
  margin: 30px auto;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Reverse every even section for checkerboard effect */
.checkerboard-section:nth-child(even) {
  flex-direction: row-reverse;
}

/* Content & Media Containers */
.checkerboard-content,
.checkerboard-media {
  flex: 1 1 50%;
  padding: 25px;
  box-sizing: border-box;
}

/* Media elements */
.checkerboard-media img,
.checkerboard-media iframe {
  width: 100%;
  height: auto;
  border-radius: 6px; /* Consider var(--radius) if consistency is desired */
  display: block;
  object-fit: cover;
}

/* Responsive Video (maintaining 16:9 aspect ratio) */
.checkerboard-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: 6px; /* Consider var(--radius) */
}

.checkerboard-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Text Content (for better readability) */
.checkerboard-content h2,
.checkerboard-content h1 {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
}

.checkerboard-content p,
.checkerboard-content ul {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0.6rem;
}

.checkerboard-content ul {
  padding-left: 20px;
  list-style-type: disc;
}

@media (max-width: 768px) {
  .checkerboard-section {
    flex-direction: column;
  }

  .checkerboard-content,
  .checkerboard-media {
    flex: 1 1 100%;
    padding: 15px;
  }

  .checkerboard-content h2,
  .checkerboard-content h1 {
    font-size: 1.5rem;
  }

  .checkerboard-content p,
  .checkerboard-content ul {
    font-size: 0.95rem;
  }
}

/* --- Global Content Area Width & Padding --- */
/* --- REPLACE '.site-main-content-wrapper' with YOUR ACTUAL SELECTOR --- */
.site-main-content-wrapper { /* <--- EXAMPLE SELECTOR - CHANGE THIS! */
  max-width: 1280px; /* Desired max content width */
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;  /* Inner spacing */
  padding-right: 20px; /* Inner spacing */
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 767px) {
  .site-main-content-wrapper { /* <--- USE THE SAME SELECTOR HERE */
    padding-left: 15px; /* Adjust mobile padding */
    padding-right: 15px;
  }
}
/* Optional: Handling FULL WIDTH sections INSIDE the main wrapper */
/*
.site-main-content-wrapper .section-full-width {
  margin-left: -20px; margin-right: -20px; padding-left: 0; padding-right: 0;
}
@media (max-width: 767px) {
  .site-main-content-wrapper .section-full-width { margin-left: -15px; margin-right: -15px; }
}
*/

/* --- Product Short Description Container/Elements --- */
/* Container styling */
.product-short-description {
  display: inline-block;
  vertical-align: middle;
}

/* Title styling */
.product-title {
  font-size: 25px;
  margin: 0 0 0.5em 0;
}

/* Summary paragraph styling */
.product-summary {
  color: black;
  line-height: 1.5;
  margin: 0 0 1em 0;
  padding-left: 40px;
  text-align: left;
}

/* Features list styling */
.product-features {
  list-style-type: disc;
  margin: 0 0 1em 40px;
  padding: 0;
}

/* Modal trigger link styling */
.product-options-link {
  margin-top: 1em;
  text-align: center;
}

.product-options-link a {
  text-decoration: none;
  color: var(--color-primary); /* Use new CSS variable */
  font-weight: bold;
}

.product-options-link a:hover {
  text-decoration: underline;
}

/* Add Padding to Long Description */
.bgtcs-long-description {
  padding: 20px 30px; /* 20px Top/Bottom, 30px Left/Right */
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .bgtcs-long-description {
    padding-left: 15px;
    padding-right: 15px;
  }
}



/* ==========================================================================
   4. STAGGS CONFIGURATOR & OPTIONS
   ========================================================================== */

/* --- 4.1 Option Groups, Monogram Scroll & Input Fields (General Staggs) --- */
.option-group-wrapper {
  margin-bottom: 10px; /* Base margin, may be overridden later by specific rule */
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.option-group-options {
  flex-direction: row !important;
  /* gap: 0 !important; */ /* Kept commented as per your existing CSS to avoid conflict with more specific icon gap */
}
/* MODIFIED FOR LIVE SITE - Staggs Configurator - Option Icons Max Width */
.option-group-options.icons {
  gap: 3.2px !important;
  padding: 8px 0 !important;
  max-width: 960px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.option-group-options.icons label,
.option-group-options label { /* General label styling for options */
  border: 2px solid transparent !important;
  padding: 2px !important;
  border-radius: 1px !important;
  transition: all 0.2s ease-in-out !important;
  background-color: #fff !important;
}
.option-group-options.icons input[type="radio"]:checked + span,
.option-group-options input[type="radio"]:checked + span { /* Styling for selected option */
  border-color: #6B4226 !important;
  background-color: #f5f5f5 !important;
}

/* --- 4.1.1 Option Group Spacing Adjustments --- */
/* Tighten up option-group spacing */
.option-group {
  margin-bottom: -30px !important;
}
/* Collapse header spacing */
.option-group-header {
  margin-bottom: 0 !important;
}
/* Add extra space below each option group wrapper - This overrides the earlier margin-bottom: 10px */
.option-group-wrapper {
  margin-bottom: 250px !important;
}

/* --- 4.2 Scrollable Options Wrapper & Arrows --- */
.monogrammed-scroll-wrapper {
  position: relative !important;
  width: 1200px !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}
.monogrammed-scrollable {
  display: flex !important;
  flex-wrap: nowrap;
  justify-content: flex-start !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-behavior: smooth !important;
  padding-bottom: 10px !important;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.monogrammed-scrollable label {
  flex: 0 0 auto !important;
}
.monogrammed-scroll-button {
  position: absolute !important;
  top: 60% !important;
  transform: translateY(-50%) !important;
  background-color: rgba(0,0,0,0.5) !important;
  color: #fff !important;
  border: none !important;
  width: 40px !important;
  height: 40px !important;
  font-size: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 100 !important; /* Ensure scroll buttons are above most things */
  border-radius: 50% !important;
}
.monogrammed-scroll-button.monogrammed-left {
  left: -2rem !important;
}
.monogrammed-scroll-button.monogrammed-right {
  right: -2rem !important;
}
.monogrammed-scroll-button:hover {
  background-color: rgba(0,0,0,0.7) !important;
}
.monogrammed-scroll-button:focus {
  outline: 2px solid #fff !important;
}
.monogrammed-scrollable::-webkit-scrollbar {
  height: 18px !important;
}
.monogrammed-scrollable::-webkit-scrollbar-track {
  background: #f0f0f0 !important;
  border-radius: 6px !important;
}
.monogrammed-scrollable::-webkit-scrollbar-thumb {
  background: #888 !important;
  border-radius: 6px !important;
}
.monogrammed-scrollable::-webkit-scrollbar-thumb:hover {
  background: #555 !important;
}
.monogrammed-scrollable {
  scrollbar-width: auto;
}

/* --- 4.3 Text Input Options (User Monogram Input) --- */
.option-group-options.text-input {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 20px !important;
  margin-top: 20px !important;
  padding-bottom: 0 !important;
  max-width: 600px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.option-group-options.text-input label {
  flex: 0 1 80px !important;
  box-sizing: border-box !important;
  margin-bottom: 10px !important;
  text-align: center !important;
  font-weight: bold !important;
  cursor: pointer !important;
  padding: 0 !important;
  border: none !important;
  transition: border-color 0.3s ease !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  position: relative !important;
}
.input-field-wrapper { /* Wrapper for each text input box */
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  width: 80px !important;
  height: 80px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}
.option-group-options.text-input input[type="text"] {
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  text-align: center !important;
  border: 2px solid #ccc !important;
  border-radius: 5px !important;
  background-color: #f9f9f9 !important;
  font-size: 2em !important;
  text-transform: uppercase !important;
  line-height: normal !important;
  min-height: 0 !important;
}
.option-group-options.text-input input[type="text"]:focus {
  border-color: #6B4226 !important;
  outline: none !important;
}

/* --- 4.4 Responsive Adjustments for Staggs Configurator --- */
@media (max-width: 760px) {
  .staggs-configurator,
  .staggs-container,
  .staggs-product-options,
  .option-group-wrapper,
  .monogrammed-scroll-wrapper,
  .monogrammed-scrollable,
  .swiper-slide {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .monogrammed-scroll-wrapper {
    padding: 0 20px !important;
    width: auto !important;
  }
  .option-group-options.text-input,
  .option-group-options.icons {
    max-width: 100% !important;
  }
  .monogrammed-scroll-button {
    width: 20px !important;
    height: 20px !important;
    font-size: 12px !important;
  }
  .option-group-options.text-input {
    gap: 15px !important;
  }

  /* Mobile Sticky Preview */
  .staggs-product-view.fix-mobile-view {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0;
    height: auto !important;
    z-index: 9999; /* High z-index for sticky preview */
    width: 100% !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .staggs-product-view.fix-mobile-view img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }
  .staggs-product-options .gallery-spacer { /* Hide Staggs gallery spacer on mobile */
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
} /* End @media (max-width: 760px) */

/* --- 4.5 Hiding Specific Preview Overlays & Wrappers --- */
/* Hide specific Staggs-generated text input preview wrappers on the main image */
.staggs-view-gallery__image .preview-text-input-wrapper.preview-text-input-bundle,
.staggs-view-gallery__image .preview-text-input-wrapper.preview-text-input-single {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important; /* Ensure they don't affect layout */
  z-index: -1 !important;       /* Push them behind */
}
/* Also hide specific known problematic static overlay IDs */
#13168_wrapper,
#13170_wrapper {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  z-index: -1 !important;
}
/* Specifically hide the single text input preview only when inside BSM's #preview_slide_0 */
#preview_slide_0 .preview-text-input-wrapper.preview-text-input-single {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* --- 4.6 Maintain Consistent Input Field Sizes (Staggs Text Inputs) --- */
@media (max-width: 500px) {
  .input-field-wrapper { /* This styles the wrapper around each text input box */
    width: 80px !important;
    height: 80px !important;
    flex: 0 0 80px !important; /* Prevent shrinking in flex */
  }
}

/* --- 4.7 Monogram System Wrapper & Preview (BSM Plugin Integration) --- */
.monogram-system-wrapper { /* Container for BSM custom SVG monogram overlay */
  position: relative;
  width: 100%;
  max-width: 960px; /* Match Staggs desktop preview width */
  margin: 0 auto;
}
.preview-container { /* This is #preview_slide_0 (added by BSM) */
  position: relative;
  width: 100%;
  height: 600px; /* Match Staggs desktop preview height */
  overflow: hidden; /* Crucial for containing absolutely positioned SVGs */
}

/* Default styling for SVGs directly inside .preview-container (e.g., monogram_stripe_svg) */
.preview-container > svg {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important; /* Allow clicks to pass through */
    z-index: 8 !important; /* Default z-index: above base image, potentially below some Staggs UI */
}

/* Specific override for the Leather Patch SVG - ensuring it's on top */
/* This selector is more specific than '.preview-container > svg' */
#preview_slide_0 svg#patch_engraving_svg {
    /* Inherits common display, position, size from '.preview-container > svg' if not overridden */
    /* Or explicitly state them for clarity/safety: */
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    /* Key Fix: Higher z-index for the patch to ensure visibility */
    z-index: 10 !important;
}
/* If monogram_stripe_svg needs a different z-index than 8, you can add a specific rule: */
/*
#preview_slide_0 svg#monogram_stripe_svg {
    z-index: 9 !important;
}
*/

/* --- 4.8 Centered Options (General Staggs) --- */
.centered-options {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  overflow: visible !important;
  padding-bottom: 0 !important;
}
.centered-options label {
  flex: 0 1 auto !important;
}

/* --- 4.9 "Start Designing" Button Example (General Staggs) --- */
.start-designing-button {
  background-color: #000;
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius);
  text-transform: uppercase;
  font-weight: bold;
}

/* --- 4.10 Staggs Product View Overrides (Base Appearance) --- */
.staggs-product-view.staggs-product-view-image.border-rounded,
.staggs-product-view .product-view-inner,
.staggs-product-view .staggs-view-gallery,
.staggs-product-view .staggs-view-gallery__images,
.staggs-product-view .staggs-preview-actions {
  background-color: #fff !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}
.staggs-product-view .staggs-view-gallery__image img[id^="preview_"] { /* Base Staggs product images */
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  margin: 0 auto !important;
  object-fit: contain; /* Ensure the whole image is visible */
}

/* --- 4.11 Disable Swiper Interaction (Dragging/Swiping) for Staggs Preview --- */
#staggs-preview .swiper-wrapper {
    pointer-events: none !important;
}
#staggs-preview .swiper-button-prev,
#staggs-preview .swiper-button-next { /* Hide default Swiper nav buttons */
    display: none !important;
}
body.single-product .product-view-nav--thumbnails { /* Hide default gallery thumbnails */
  display: none !important;
}

/* --- 4.12 Desktop Preview Width Fix & Layout (Staggs) --- */
@media (min-width: 761px) {
  .staggs-product-view.staggs-product-view-image {
    width: 960px !important;
    min-width: 960px !important;
    position: relative !important; /* Override sticky on desktop */
    left: auto !important;
    right: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    flex-shrink: 0 !important;
    float: none !important;
    min-height: 600px; /* Match BSM preview container height */
  }
  .staggs-product-view.staggs-product-view-image #staggs-preview { /* Swiper container */
       width: 100% !important;
       height: 600px !important; /* Match BSM preview container height */
  }
   .staggs-product-view.staggs-product-view-image #preview_slide_0 { /* Active Staggs slide (if BSM #preview_slide_0 is also the Staggs slide) */
       width: 100% !important;
       height: 100% !important;
       flex-shrink: 0;
   }
  .staggs-configurator-main.align-right {
     /* Adjust if needed to ensure proper layout with forced preview width */
  }
} /* End @media (min-width: 761px) */

/* --- 4.13 Personalization/Monogram Style Icon Sizing (Staggs Options) --- */
div[data-step-name="personalization-style"] .option-group-options.icons svg,
div[data-step-name="monogram-style"] .option-group-options.icons svg {
  width: 70px !important;
  height: 70px !important;
}
div[data-step-name="personalization-style"] .option-group-options.icons,
div[data-step-name="monogram-style"] .option-group-options.icons {
  gap: 1px !important;
}

/* --- 4.14 i0001 Note & New Pattern Label (Staggs Options) --- */
.i0001-note {
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  padding: 2px 4px;
  border: 1px solid;
  border-radius: var(--radius);
  text-align: center;
}
.new-pattern-label {
  display: block;
  font-size: 0.9em;
  color: #000000;
  margin-top: 2.4px;
}



/* ==========================================================================
   5. WOOCOMMERCE STYLES (CART, CHECKOUT, BUTTONS, BLOCKS)
   ========================================================================== */

/* --- Consistent Button Styling (Pantone 282C: #004E7F) --- */

/* Add to Cart buttons (Single Product, Loop) */
button.single_add_to_cart_button,
.woocommerce a.button.add_to_cart_button,
.woocommerce button.button.add_to_cart_button,
.woocommerce input.button.add_to_cart_button {
    background-color: #004E7F !important;
    border-color: #004E7F !important;
    color: #fff !important;
    border-radius: var(--radius) !important; /* Use new CSS variable */
    padding: 0.7em 1.2em !important; /* Ensure padding consistency */
    text-decoration: none !important;
    display: inline-flex; /* Use flex for potential icon/text alignment */
    align-items: center;
    justify-content: center;
}
button.single_add_to_cart_button:hover,
.woocommerce a.button.add_to_cart_button:hover,
.woocommerce button.button.add_to_cart_button:hover,
.woocommerce input.button.add_to_cart_button:hover {
    background-color: #003366 !important; /* A slightly darker shade */
    border-color: #003366 !important;
}

/* "View cart" button inside WC Message */
.woocommerce-message a.button.wc-forward {
  background-color: #fff !important; /* White pill inside blue message */
  color: #004E7F !important;
  border: 1px solid #fff !important;
  border-radius: var(--radius) !important; /* Use new CSS variable */
  padding: 6px 12px !important;
  text-decoration: none !important;
  display: inline-block;
  margin-left: 1em; /* space from preceding text */
}
.woocommerce-message a.button.wc-forward:hover {
  background-color: #e1e1e1 !important;
  color: #004E7F !important;
  border-color: #e1e1e1 !important;
}

/* Cart Block "Proceed to Checkout" */
.wc-block-cart__submit-button.contained {
  background-color: #004E7F !important;
  border-color: #004E7F !important;
  color: #fff !important;
  border-radius: var(--radius) !important; /* Use new CSS variable */
  padding: 0.7em 1.2em !important;
}
.wc-block-cart__submit-button.contained:hover {
  background-color: #003366 !important;
  border-color: #003366 !important;
}

/* Checkout Block "Return to Cart" & "Place Order" */
.wc-block-components-checkout-return-to-cart-button,
.wc-block-components-checkout-place-order-button.contained {
  background-color: #004E7F !important;
  border-color: #004E7F !important;
  color: #fff !important;
  border-radius: var(--radius) !important; /* Use new CSS variable */
  padding: 0.7em 1.2em !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wc-block-components-checkout-return-to-cart-button:hover,
.wc-block-components-checkout-place-order-button.contained:hover {
  background-color: #003366 !important; /* darker shade */
  border-color: #003366 !important;
}
/* Force the little arrow (SVG path) to be white */
.wc-block-components-checkout-return-to-cart-button svg path {
  fill: #fff !important;
}

/* Classic Cart Buttons ("Update Cart", "Apply Coupon") */
table.shop_table.cart .button {
  background-color: #004E7F !important;
  border-color: #004E7F !important;
  color: #fff !important;
  border-radius: var(--radius) !important; /* Use new CSS variable */
  padding: 0.7em 1.2em !important;
}
table.shop_table.cart .button:hover {
  background-color: #003366 !important;
  border-color: #003366 !important;
}

/* Classic Checkout "Place Order" Button */
.checkout-button { /* This often targets the place order button container/link */
  background-color: #004E7F !important;
  border-color: #004E7F !important;
  color: #fff !important;
  border-radius: var(--radius) !important; /* Use new CSS variable */
  padding: 0.7em 1.2em !important;
  display: inline-block; /* Ensure it behaves like a button */
  text-align: center;
}
.checkout-button:hover {
  background-color: #003366 !important;
  border-color: #003366 !important;
}

/* ==========================================================================
   NEW - Custom Coupon/Gift Card UI on Cart Page
   ========================================================================== */

/* --- START: Custom Coupon/Gift Card UI on Cart Page (Checkbox Toggle Version) --- */

/* Parent TD for all actions: coupon UI and update button */
.woocommerce-cart-form table.cart td.actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.5em;
    padding-top: 1em;
    padding-bottom: 1em;
}

/* Main container for your entire custom coupon UI (checkboxes, note, input fields) */
.woocommerce-cart-form table.cart td.actions .bgtcs-promo-selection-container {
    max-width: 480px;
    width: 100%;
    box-sizing: border-box;
    order: -1; /* Puts this block before the update_cart button in flex order */
    text-align: left;
}

/* Container for the "Have a Discount Code?" and "Have a Gift Card?" checkboxes */
.woocommerce-cart-form table.cart td.actions .bgtcs-promo-checkbox-group {
    margin-bottom: 15px;
    text-align: center;  /* Center the checkbox labels within this group */
}

.woocommerce-cart-form table.cart td.actions .bgtcs-promo-checkbox-group label {
    font-size: 1em;
    color: #333;
    cursor: pointer;
    display: inline-block;
    margin-right: 10px;
    margin-left: 10px;
    vertical-align: middle;
}
.woocommerce-cart-form table.cart td.actions .bgtcs-promo-checkbox-group label:first-of-type {
    margin-left: 0;
}
.woocommerce-cart-form table.cart td.actions .bgtcs-promo-checkbox-group label:last-of-type {
    margin-right: 0;
}

.woocommerce-cart-form table.cart td.actions .bgtcs-promo-checkbox-group input[type="checkbox"] {
    margin-right: 5px;
    vertical-align: middle;
}

/* The INSTRUCTIONAL note that appears if BOTH checkboxes are checked */
.woocommerce-cart-form table.cart td.actions .bgtcs-promo-selection-container p.bgtcs-coupon-instruction-note#bgtcs-apply-sequentially-note {
    font-size: 0.9em;
    color: #1e5f73;
    margin-top: 0;
    margin-bottom: 15px;
    padding: 10px 15px;
    border: 1px solid #b8e0e8;
    border-left-width: 4px;
    border-radius: var(--radius); /* Use new CSS variable */
    background-color: #e7f6f9;
    text-align: center;
    line-height: 1.5;
    box-sizing: border-box;
}

/* Common wrapper for both Discount Code and Gift Card input sections */
.woocommerce-cart-form table.cart td.actions .bgtcs-promo-input-wrapper {
     display: block;
     clear: both;
     margin-bottom: 15px;
     box-sizing: border-box;
}
.woocommerce-cart-form table.cart td.actions .bgtcs-promo-input-wrapper:last-of-type {
    margin-bottom: 0;
}

/* Styling for the H3 titles ("Discount Code", "Gift Card Code") inside the wrappers */
.woocommerce-cart-form table.cart td.actions .bgtcs-promo-input-wrapper .bgtcs-area-title {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.1em;
    color: #333;
    font-weight: 600;
    text-align: center;
}

/* Styling for the group containing an input field and its apply button */
.woocommerce-cart-form table.cart td.actions .bgtcs-promo-input-wrapper .bgtcs-input-button-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Styling for the text input fields */
.woocommerce-cart-form table.cart td.actions .bgtcs-promo-input-wrapper .bgtcs-input-button-group input.input-text {
    flex-grow: 1;
    font-family: 'Century Gothic', sans-serif; /* Make sure this font is available or adjust */
    font-size: 1em;
    border-radius: var(--radius); /* Use new CSS variable */
    padding-top: 0.7em;
    padding-bottom: 0.7em;
    padding-left: 0.9em;
    padding-right: 0.9em;
    border: 1px solid #ccc;
    box-sizing: border-box;
    line-height: normal;
    height: auto;
    vertical-align: middle;
    min-width: 0;
}

/* Styling for the "Apply" buttons within the input groups */
/* (These buttons should inherit styling from your existing table.shop_table.cart .button rule) */
.woocommerce-cart-form table.cart td.actions .bgtcs-promo-input-wrapper .bgtcs-input-button-group button.button {
    white-space: nowrap;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Screen reader text */
.woocommerce-cart-form table.cart td.actions .bgtcs-promo-input-wrapper .bgtcs-input-button-group label.screen-reader-text {
    border: 0; clip: rect(1px, 1px, 1px, 1px); -webkit-clip-path: inset(50%); clip-path: inset(50%);
    height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}

/* "Update cart" button styling */
.woocommerce-cart-form table.cart td.actions button[name="update_cart"] {
    max-width: 480px;
    width: 100%;
    box-sizing: border-box;
}
/* --- END: Custom Coupon/Gift Card UI on Cart Page (Checkbox Toggle Version) --- */


/* Center the "Proceed to Checkout" button (located in .cart_totals) */
.cart_totals .wc-proceed-to-checkout {
    text-align: center;
    margin-top: 1.5em;
    margin-bottom: 1em;
    clear: both;
}

.cart_totals .wc-proceed-to-checkout a.checkout-button.button {
    display: inline-block;
}
/* ==========================================================================
   END - Custom Coupon/Gift Card UI
   ========================================================================== */

/* --- WooCommerce Messages --- */
.woocommerce-message {
  background-color: #004E7F !important; /* Pantone 282C */
  color: #fff !important;               /* White text inside */
  border-radius: var(--radius) !important; /* Use new CSS variable */
  padding: 1em 1.5em !important;        /* Room for text & close link */
  margin: 1em 0 !important;             /* Space above/below */
  border: none !important;              /* Remove default border */
  box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
}
/* Links inside the notice */
.woocommerce-message a:not(.button) { /* Exclude the button styled separately */
  color: #fff !important;
  text-decoration: underline; /* optional to show it's a link */
  font-weight: bold;          /* optional emphasis */
}


/* --- Cart & Checkout Layout Adjustments --- */

/* Increase product thumbnail size on classic cart (desktop) */
@media only screen and (min-width: 768px) {
  table.shop_table.cart td.product-thumbnail img {
      width: 284px !important;  /* 4x the original 48px? Adjust as needed */
      height: auto !important;   /* maintain aspect ratio */
  }
}

/* Style variation list (<dl>) in classic cart as a grid */
.woocommerce table.shop_table .variation {
  display: grid;
  grid-template-columns: auto 1fr;  /* label col, value col */
  grid-column-gap: 1em;
  align-items: start; /* or center, if you prefer */
}
.woocommerce table.shop_table .variation dt {
  font-weight: bold;
  margin: 0.3em 0;  /* some breathing room */
}
.woocommerce table.shop_table .variation dd {
  margin: 0.3em 0;
}

/* Hide Specific Variation Lines in Classic Cart */
body.woocommerce-cart .variation-PersonalizationStyle,
body.woocommerce-cart .variation-First,
body.woocommerce-cart .variation-Middle,
body.woocommerce-cart .variation-Last {
  display: none !important;
}

/* Hide Specific Meta in Cart Block details list */
li.wc-block-components-product-details__personalization-style,
li.wc-block-components-product-details__monogram-style {
  display: none !important;
}
/* Hide Specific Meta in Order Details page */
.woocommerce-order-details .wc-item-meta li:has(strong.wc-item-meta-label:contains("Personalization style")),
.woocommerce-order-details .wc-item-meta li:has(strong.wc-item-meta-label:contains("Monogram style")) {
  display: none !important;
}

/* Add Padding to Cart & Checkout on Mobile */
@media only screen and (max-width: 767px) {
  /* Classic Cart */
  .woocommerce-cart,
  body.woocommerce-cart .woocommerce,
  .woocommerce-cart .woocommerce-cart-form {
    padding-left: 20px;
    padding-right: 20px;
  }
  /* Checkout Block */
  .wp-block-woocommerce-checkout {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* --- Product Loop / Shortcode Grid --- */
/* Force shortcode output to display as a grid */
.woocommerce ul.products {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem; /* Adjust spacing between products as needed */
	list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce ul.products li.product {
    flex: 0 0 calc(25% - 1rem); /* Four products per row - Adjust % as needed */
}
/* Adjust product grid columns for responsiveness (Classic WC) */
@media (max-width: 992px) { /* Example breakpoint */
    .woocommerce ul.products li.product {
        flex-basis: calc(33.333% - 1rem); /* 3 per row */
    }
}
@media (max-width: 768px) {
    .woocommerce ul.products li.product {
        flex-basis: calc(50% - 1rem); /* 2 per row */
    }
}
@media (max-width: 480px) {
    .woocommerce ul.products li.product {
        flex-basis: calc(100% - 1rem); /* 1 per row */
    }
}

/* --- Search Results Image Sizing --- */
.search-results .product img,
.search .product img {
  max-width: 50% !important;
  height: auto;
}

/* ==========================================================================
   6. BARRINGTON GIFTS CUSTOM TEMPLATE STYLES (MODALS, PRODUCT GRIDS)
   ========================================================================== */

/* --- 6.1 PRODUCT GRID (BGTCS) --- */

/* Grid Container */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Default: 3 columns */
  gap: 14px; /* Default gap */
  margin: 20px auto; /* Add some vertical spacing */
}
/* Responsive Grid Columns */
@media (max-width: 768px) { /* Tablets and smaller */
  .product-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    gap: 10px; /* Slightly smaller gap */
  }
}
@media (max-width: 480px) { /* Smaller mobile */
  .product-grid {
    grid-template-columns: repeat(2, 1fr); /* Keep 2 columns or change to 1fr if needed */
    gap: 8px; /* Even smaller gap */
  }
}

/* --- 6.1.1 Lazy Load Placeholder --- */
.bgtcs-product-item-lazy-placeholder {
  display: block;
  aspect-ratio: 760 / 475; /* Adjust based on typical image - RESERVES SPACE */
  background-color: #f0f0f0;
  border-radius: var(--radius); /* Use new CSS variable */
  width: 100%;
  height: auto;
}

/* --- 6.1.2 Grid Item Styling (After Load) --- */
.product-grid .bgtcs-product-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Align content to top */
  width: 100%;
  height: auto; /* Let content determine height */
  box-sizing: border-box;
  cursor: pointer;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border-radius: var(--radius); /* Use new CSS variable */
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.product-grid .bgtcs-product-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* Link Inside Item (Handles Click) */
.product-grid .bgtcs-product-item a.bgtcs-open-product-group-modal,
.product-grid .bgtcs-product-item a.bgtcs-product-link { /* Cover both link types */
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Fill item height */
  text-decoration: none;
  color: inherit;
  padding: 10px; /* Padding inside the clickable area */
}

/* Image inside Item */
.product-grid .bgtcs-product-item img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain; /* Ensure full image is visible */
  margin: 0 auto 0.5em auto; /* Center horizontal, SMALLER space below */
  border-radius: var(--radius); /* Use new CSS variable, was 4px */
  flex-shrink: 0;
}

/* Product Name (H3) inside Item */
.product-grid .bgtcs-product-item h3 {
  margin: 0;
  padding: 0 5px;
  font-size: 14px; /* Base size */
  font-weight: 600;
  line-height: 1.2; /* Tighter line height */
  margin-bottom: 0.15em; /* TIGHTER margin below heading */
  color: #333;
  flex-shrink: 0;
}

/* Price Paragraph inside Item */
.product-grid .bgtcs-product-item .price {
    margin: 0;
    padding: 0 5px;
    font-size: 1em;
    font-weight: bold;
    line-height: 1.2; /* Tighter line height */
    color: inherit;
    margin-top: auto; /* Push price to bottom within flex container */
    flex-shrink: 0;
}
.product-grid .bgtcs-product-item .price .woocommerce-Price-amount {
  margin: 0; padding: 0; display: inline-block;
}

/* Cleanup */
.product-grid .add_to_cart_button,
.product-grid .wp-block-button__link.add_to_cart_button,
.product-grid .add-to-cart-container {
  display: none !important; /* Hide native ATC buttons in grid */
}
/* Hide default WC Block elements if using Blocks (keep price) */
.product-grid .wc-block-grid__product-image,
.product-grid .wc-block-grid__product-title,
.product-grid .wc-block-grid__product-add-to-cart {
   /* display: none !important; */ /* Uncomment if you use WC Blocks & want to hide these */
}
.product-grid .wc-block-grid__product-price { /* Style default WC block price if used */
  text-align: center !important; margin: 8px auto 0 auto; display: block !important; font-weight: bold;
}
/* Remove potential unwanted paragraphs/breaks */
.product-grid > p { display: contents; }
.product-grid .bgtcs-product-item > a > br { display: none; }
.product-grid .bgtcs-product-item > a > p:empty { display: none; margin: 0; padding: 0; }


/* --- 6.2 PRODUCT GROUP MODAL ('.bgtcs-modal') --- */
.bgtcs-modal {
  position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.65); display: none; /* JS toggles */
  overflow-y: auto;
}
.bgtcs-modal.fade {
  opacity: 0; transform: translateY(-20px); transition: opacity 0.3s ease, transform 0.3s ease;
}
.bgtcs-modal.fade.show { opacity: 1; transform: translateY(0); }
.bgtcs-modal .bgtcs-modal-dialog {
  background: #fff; width: 90%; max-width: 700px; margin: 5% auto; padding: 0;
  border-radius: var(--radius); /* Use new CSS variable */
  position: relative; box-sizing: border-box;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
/* Optional: Wider dialog if video is present */
/* .bgtcs-modal.has-video .bgtcs-modal-dialog { max-width: 900px; } */
.bgtcs-modal .bgtcs-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem; padding-right: 50px; /* Space for close */
  border-bottom: 1px solid #dee2e6; position: relative;
}
.bgtcs-modal .bgtcs-modal-title {
  font-size: 1.8rem; font-weight: 600; line-height: 1.3; margin: 0;
  text-align: center; flex-grow: 1;
}
.bgtcs-modal .bgtcs-modal-body {
  padding: 1.5rem; max-height: calc(90vh - 120px); overflow-y: auto;
  box-sizing: border-box;
}
.bgtcs-modal .bgtcs-modal-body .loading-message {
  text-align: center; padding: 2rem; font-style: italic; color: #666;
}
.bgtcs-modal .bgtcs-modal-footer {
  display: flex; align-items: center; justify-content: flex-end; padding: 0.75rem 1.5rem;
  border-top: 1px solid #dee2e6; background-color: #f8f9fa;
  border-bottom-right-radius: var(--radius); /* Use new CSS variable */
  border-bottom-left-radius: var(--radius); /* Use new CSS variable */
}
.bgtcs-modal .bgtcs-modal-footer:empty { display: none; }
.bgtcs-modal .bgtcs-modal-header .modal-close-button {
  border: none; background: rgba(0, 0, 0, 0.1); padding: 0; margin: 0;
  color: #555; font-family: sans-serif; font-size: 16px; line-height: 1;
  font-weight: bold; cursor: pointer; opacity: 0.7;
  transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  border-radius: 50%; width: 30px; height: 30px; display: flex;
  align-items: center; justify-content: center; text-align: center;
  position: absolute; top: 10px; right: 10px;
}
.bgtcs-modal .bgtcs-modal-header .modal-close-button:hover {
  opacity: 1; background-color: rgba(0, 0, 0, 0.2); color: #000;
}

/* Product Grid Inside Modal */
#bgtcs-product-group-modal .bgtcs-modal-body ul.products.bgtcs-modal-product-grid {
  display: grid !important; list-style: none !important; padding: 0 !important;
  margin: 0 0 1.5em 0 !important; gap: 1.5em;
}
#bgtcs-product-group-modal .bgtcs-modal-body ul.products.columns-1 { grid-template-columns: 1fr !important; }
#bgtcs-product-group-modal .bgtcs-modal-body ul.products.columns-2 { grid-template-columns: repeat(2, 1fr) !important; gap: 1.25em; }
#bgtcs-product-group-modal .bgtcs-modal-body ul.products.columns-3 { grid-template-columns: repeat(3, 1fr) !important; gap: 1em; }
#bgtcs-product-group-modal .bgtcs-modal-body ul.products.columns-4 { grid-template-columns: repeat(4, 1fr) !important; gap: 0.75em; }

/* Individual Product Item Inside Modal */
#bgtcs-product-group-modal .bgtcs-modal-body ul.products li.bgtcs-modal-item {
  width: auto !important; float: none !important; margin: 0 !important;
  padding: 0 !important; box-sizing: border-box; text-align: center;
}
#bgtcs-product-group-modal .bgtcs-modal-body ul.products li.bgtcs-modal-item img {
  max-width: 100%; height: auto; border-radius: var(--radius); /* Use new CSS variable, was 4px */ display: block;
  margin: 0 auto 8px auto; border: 1px solid #eee; /* Optional border */
}
#bgtcs-product-group-modal .bgtcs-modal-body ul.products li.bgtcs-modal-item h3.woocommerce-loop-product__title {
  font-size: 0.85em; line-height: 1.3; margin: 0.5em 0; font-weight: 500; color: #333;
}

/* Video Container Inside Modal */
.bgtcs-modal-body .bgtcs-modal-video-wrapper,
.bgtcs-modal-video-container { /* Shared class */
  position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
  max-width: 100%; background-color: #000; margin: 1.5em auto 0 auto; border-radius: var(--radius); /* Use new CSS variable, was 4px */
}
.bgtcs-modal-body .bgtcs-modal-video-wrapper iframe,
.bgtcs-modal-video-container iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}


/* --- 6.3 SINGLE PRODUCT PAGE MODALS ('.bgtcs-sp-modal') --- */
.bgtcs-sp-modal {
  display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.65); overflow-y: auto; pointer-events: auto;
}
.bgtcs-sp-modal.fade { opacity: 0; transition: opacity 0.3s ease; }
.bgtcs-sp-modal.fade.show { display: block; opacity: 1; }
.bgtcs-sp-modal__dialog {
  position: relative; width: 90%; max-width: 960px; /* MODIFIED from 600px */ margin: 5% auto;
  pointer-events: none; box-sizing: border-box;
}
.bgtcs-sp-modal__dialog--lg { max-width: 800px; } /* This could be 960px too if preferred for --lg */
.bgtcs-sp-modal.show .bgtcs-sp-modal__dialog { pointer-events: auto; }
.bgtcs-sp-modal__content {
  position: relative; display: flex; flex-direction: column; width: 100%;
  background-color: #fff; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: var(--radius); /* Use new CSS variable */
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2); box-sizing: border-box;
}
.bgtcs-sp-modal__header {
  display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem;
  border-bottom: 1px solid #dee2e6; position: relative; padding-right: 50px;
}
.bgtcs-sp-modal__title {
  margin: 0; line-height: 1.4; font-size: 1.6rem; font-weight: 500;
  flex-grow: 1; text-align: center; box-sizing: border-box;
}
.bgtcs-sp-modal__body {
  position: relative; flex: 1 1 auto; padding: 1.5rem; overflow-y: auto;
  max-height: calc(80vh - 110px);
}
.bgtcs-sp-modal__footer {
  display: flex; align-items: center; justify-content: flex-end; padding: 0.75rem 1.5rem;
  border-top: 1px solid #dee2e6; background-color: #f8f9fa;
  border-bottom-right-radius: calc(var(--radius) - 1px); /* Use new CSS variable */
  border-bottom-left-radius: calc(var(--radius) - 1px); /* Use new CSS variable */
}
.bgtcs-sp-modal__footer:empty { display: none; }
.bgtcs-sp-modal__footer > * { margin: 0.25rem; }
/* Close Buttons ('X' in header, Button in footer) */
.bgtcs-sp-modal__close { cursor: pointer; border: none; background: none; padding: 0; transition: opacity 0.2s ease, color 0.2s ease; opacity: 1; }
/* Header 'X' specific styles */
.bgtcs-sp-modal__header .bgtcs-sp-modal__close {
    border: none; background: rgba(0, 0, 0, 0.1); color: #555; font-family: sans-serif;
    font-size: 16px; line-height: 1; font-weight: bold; padding: 0; cursor: pointer;
    opacity: 0.7; transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    border-radius: 50%; width: 30px; height: 30px; display: flex; align-items: center;
    justify-content: center; text-align: center; position: absolute; top: 10px; right: 10px;
}
.bgtcs-sp-modal__header .bgtcs-sp-modal__close:hover { opacity: 1; background-color: rgba(0, 0, 0, 0.2); color: #000; }
/* Footer button specific styles */
.bgtcs-sp-modal__footer .bgtcs-sp-modal__close { padding: 8px 18px !important; background-color: #6c757d !important; color: #fff !important; border-radius: var(--radius) !important; /* Use new CSS variable */ font-size: 0.9em !important; transition: background-color 0.2s ease !important; opacity: 1 !important; font-weight: normal; line-height: normal; }
.bgtcs-sp-modal__footer .bgtcs-sp-modal__close:hover { background-color: #5a6268 !important; color: #fff !important; }
/* Image Modal Specific Content */
.bgtcs-sp-modal--images .bgtcs-modal-image-item { margin-bottom: 20px; text-align: center; }
.bgtcs-sp-modal--images .bgtcs-modal-gallery-image { max-width: 100%; height: auto; border-radius: var(--radius); /* Use new CSS variable, was 3px */ box-shadow: 0 2px 4px rgba(0,0,0,0.1); }


/* --- 6.4 SINGLE PRODUCT PAGE BUTTONS & CONTAINER --- */
.bgtcs-sp-button-container {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-top: 15px; justify-content: center; /* Center buttons */
  margin-bottom: 0 !important; /* Avoid double margin with ATC */
}
.bgtcs-sp-button-container .button { /* Target buttons inside */
   margin: 0; /* Reset default margins */
}
/* Unified Button Styling (Info, Images, uses Add To Cart style) */
.bgtcs-more-info-button,
.bgtcs-view-images-button {
  background-color: #004E7F !important; color: #FFFFFF !important; border: none !important;
  padding: 10px 20px !important; border-radius: var(--radius) !important; /* Use new CSS variable */ cursor: pointer !important;
  font-size: 0.95em !important; font-weight: 600 !important; text-align: center !important;
  transition: background-color 0.2s ease !important; line-height: normal !important;
  vertical-align: middle !important; display: inline-block !important; margin: 0 !important;
  text-decoration: none !important;
}
.bgtcs-more-info-button:hover,
.bgtcs-view-images-button:hover {
  background-color: #003a61 !important; color: #FFFFFF !important;
}
/* Price inside Add To Cart Button */
.single_add_to_cart_button span.amount {
  color: #FFFFFF !important; font-weight: normal !important; font-size: 0.9em !important;
  background: none !important; padding: 0 !important; margin: 0 !important;
}
/* Container for MOVED Add To Cart Section */
.bgtcs-moved-atc-section {
  margin-top: 20px !important; width: 100% !important; clear: both;
}
.bgtcs-moved-atc-section .button-wrapper { /* Assuming a wrapper inside */
   text-align: center; padding-top: 10px;
}


/* --- 6.5 GENERAL MODAL HELPERS --- */
body.modal-open {
  overflow: hidden; /* Prevent body scroll when ANY modal is open */
}


/* ==========================================================================
   7. COLLECTION LINKS GRID STYLES
   ========================================================================== */
.bgtcs-collection-links-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 columns */
  gap: 20px;
  margin: 30px 0;
  padding: 0;
  list-style: none;
}
.bgtcs-collection-link-item {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius); /* Use new CSS variable, was 5px */
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.bgtcs-collection-link-item:hover,
.bgtcs-collection-link-item:focus {
  transform: scale(1.03);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  z-index: 10;
}
.bgtcs-collection-link-item:focus-visible {
  outline: 2px solid var(--color-primary); /* Use new CSS variable */
  outline-offset: 2px;
}
.bgtcs-collection-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 2800 / 1500; /* Force aspect ratio */
  border-radius: var(--radius); /* Use new CSS variable, was 5px */
}
.bgtcs-collection-title {
  position: absolute;
  bottom: 0; left: 0; width: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  padding: 10px 15px;
  text-align: center;
  font-size: 1.1em;
  font-weight: bold;
  box-sizing: border-box;
  opacity: 0; /* Hidden by default */
  transition: opacity 0.3s ease;
}
.bgtcs-collection-link-item:hover .bgtcs-collection-title,
.bgtcs-collection-link-item:focus .bgtcs-collection-title {
  opacity: 1; /* Show title on hover/focus */
}
@media (max-width: 768px) {
  .bgtcs-collection-links-container {
    grid-template-columns: 1fr; /* 1 column */
    gap: 25px;
  }
  /* Optional: Show titles by default on mobile */
  /* .bgtcs-collection-title { opacity: 1; } */
}

/* ==========================================================================
   8. SHARED PAGE STYLES (Pickleball, Leather Gifts etc.)
   ========================================================================== */

/* --- 8.1 General Page Setup --- */
.bgtcs-pickleball-page-content,
.bgtcs-leather-page-content {
  max-width: 1200px;
  margin-left: auto; margin-right: auto;
  padding: 0 15px;
}
.bgtcs-leather-page-content { /* Specific margin for leather */
  margin-top: 30px; margin-bottom: 30px;
}

/* --- 8.2 Header Image Styling --- */
.bgtcs-page-header-image img {
  display: block; width: 100%; height: auto; margin-bottom: 30px;
  /* Default image border-radius will apply from global img rule */
}
.bgtcs-leather-page-content .bgtcs-page-header-image img {
   margin-bottom: 40px; /* Larger margin for leather header */
}

/* --- 8.3 Section Title Styling (If Used) --- */
.bgtcs-section-title {
  text-align: center; font-size: 1.8em; margin-top: 40px; margin-bottom: 25px;
  padding-bottom: 10px; border-bottom: 1px solid #eee; color: #333;
}

/* --- 8.4 General Product Grid Styling --- */
/* Uses the grid defined in section 6.1 */
.bgtcs-pickleball-page-content .bgtcs-product-grid,
.bgtcs-leather-page-content .bgtcs-product-grid {
   margin-bottom: 40px; /* Consistent spacing below grids */
}
.bgtcs-leather-page-content .bgtcs-product-grid {
   gap: 30px; /* Larger gap for leather grid */
   margin-bottom: 50px;
}

/* Column Layouts applied to .bgtcs-product-grid */
/* .grid-cols-2, .grid-cols-3, .grid-cols-4 classes adjust columns defined in 6.1 */
.bgtcs-product-grid.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.bgtcs-product-grid.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.bgtcs-product-grid.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* --- 8.5 Product Item & Placeholder Styling (Inherited from 6.1.2) --- */
/* Add specific overrides if needed for these pages */
.bgtcs-leather-page-content .bgtcs-product-grid .product-item { /* Assuming .product-item is .bgtcs-product-item */
  border-color: #eaeaea; /* Slightly different border for leather */
}
.bgtcs-pickleball-page-content .bgtcs-product-grid .product-item { /* Assuming .product-item is .bgtcs-product-item */
  border-color: #f0f0f0; /* Lighter border for pickleball */
  padding: 15px; /* Specific padding for pickleball items */
  transition: transform 0.25s ease-in-out, box-shadow 0.25s ease-in-out;
}
.bgtcs-pickleball-page-content .bgtcs-product-grid .product-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}
/* Filler item (if used) */
.bgtcs-product-grid .filler-item { visibility: hidden; border: none; background: none; }

/* --- 8.6 Modal Styling (Inherited from 6.2 & 6.3) --- */
/* No changes needed here unless page-specific modal tweaks are required */

/* --- 8.7 Informational Text Sections Styling --- */
.bgtcs-info-sections {
  margin-top: 60px; border-top: 2px solid #eee; padding-top: 40px;
}
.bgtcs-info-section {
  margin-bottom: 50px; padding-bottom: 30px; border-bottom: 1px solid #f5f5f5;
}
.bgtcs-info-section:last-child { border-bottom: none; margin-bottom: 0; }
.bgtcs-info-section h1 { font-size: 2em; text-align: center; margin-bottom: 25px; color: #222; }
.bgtcs-info-section h2 { font-size: 1.6em; margin-bottom: 20px; color: #333; }
.bgtcs-info-section p,
.bgtcs-info-section ul,
.bgtcs-info-section ol { font-size: 1rem; line-height: 1.7; color: #555; margin-bottom: 1.5em; }
.bgtcs-info-section ul, .bgtcs-info-section ol { margin-left: 25px; }
.bgtcs-info-section li { margin-bottom: 0.8em; }
.bgtcs-info-section--text-image { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; }
.bgtcs-info-section--text-image .bgtcs-info-text,
.bgtcs-info-section--text-image .bgtcs-info-image { flex: 1; min-width: 280px; }
.bgtcs-info-section .bgtcs-info-image img { display: block; max-width: 100%; height: auto; border-radius: var(--radius); /* Use new CSS variable, was 5px */ box-shadow: 0 3px 10px rgba(0,0,0,0.08); }
.bgtcs-info-section--image-left { flex-direction: row-reverse; }


/* --- 8.8 Responsive Adjustments (Combined & Refined) --- */
@media (max-width: 991px) { /* Medium screens */
  .bgtcs-product-grid.grid-cols-3,
  .bgtcs-product-grid.grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 767px) { /* Small screens */
   .bgtcs-product-grid.grid-cols-2,
   .bgtcs-product-grid.grid-cols-3,
   .bgtcs-product-grid.grid-cols-4 {
     grid-template-columns: repeat(2, 1fr);
     gap: 15px; /* Smaller gap for all grids */
   }
   /* Shared title/text size adjustments */
   .bgtcs-section-title { font-size: 1.5em; }
   .bgtcs-product-grid .bgtcs-product-item h3 { font-size: 0.9rem; min-height: 50px; } /* Shared item title, assuming .product-item is .bgtcs-product-item */
   .bgtcs-info-section--text-image { gap: 25px; }
   .bgtcs-info-section h1 { font-size: 1.8em; }
   .bgtcs-info-section h2 { font-size: 1.4em; }
   /* Stack image/text in info sections */
   .bgtcs-info-section--text-image,
   .bgtcs-info-section--image-left { flex-direction: column; }
   .bgtcs-info-section--text-image .bgtcs-info-text,
   .bgtcs-info-section--text-image .bgtcs-info-image { min-width: 100%; }
}
@media (max-width: 480px) { /* Extra small screens */
  .bgtcs-product-grid.grid-cols-2,
  .bgtcs-product-grid.grid-cols-3,
  .bgtcs-product-grid.grid-cols-4 {
    grid-template-columns: 1fr; /* Switch to 1 column */
  }
}

/* ==========================================================================
   9. MAILCHIMP FOR WP FORM STYLES
   ========================================================================== */
.mc4wp-form input[type="email"]::-webkit-input-placeholder { color: #66AADD; }
.mc4wp-form input[type="email"]:-ms-input-placeholder { color: #66AADD; }
.mc4wp-form input[type="email"]::placeholder { color: #66AADD; }

.mc4wp-form .mc4wp-form-fields input[type="submit"] {
  background: linear-gradient(90deg, #004E7F, var(--color-primary)); /* Use new CSS variable */
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius); /* Use new CSS variable */
  font-size: 1em;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mc4wp-form .mc4wp-form-fields input[type="submit"]:hover {
  background: linear-gradient(90deg, #003c64, #005b88); /* Darken --color-primary if used */
  transform: translateY(-2px);
}


/******************************************************
 * 14. Hide Specific Wrappers/Previews (Old section name, check new rule at end)
 ******************************************************/
#13168_wrapper,
.preview-text-input-wrapper.preview-text-input-bundle {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}
/* .preview-text-input-wrapper.preview-text-input-bundle {
  display: none !important;
} /* Duplicate of above effectively */
#13170_wrapper
/* .preview-text-input-wrapper.preview-text-input-bundle */ { /* This line was incomplete, assuming #13170_wrapper should also hide */
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}
/* .preview-text-input-wrapper.preview-text-input-bundle {
  display: none !important;
} /* Duplicate of above effectively */


/* tighten up option‐group spacing */
.option-group {
  margin-bottom: -30px !important;
}

/* remove gaps between options */
.option-group-options {
  /* This was 'gap: 0 !important;'. Staggs icons rule 'gap: 3.2px !important;' will override.
     If this is truly global for ALL .option-group-options, it might conflict.
     The Staggs icon rule is more specific, so it will apply for icon groups. */
  /* gap: 0 !important; */ /* Commenting out to avoid potential conflict if not desired for all option groups */
}

/* collapse header spacing */
.option-group-header {
  margin-bottom: 0 !important;
}

/* add extra space below each option group wrapper */
.option-group-wrapper { /* Already defined earlier, this rule will add to or override previous margin-bottom */
  margin-bottom: 250px !important;
}

/* Force 2-column layout for specific product grid */
@media (min-width: 768px) { /* Adjust breakpoint if needed (768px is common for tablets/desktops) */
  .product-grid.product-grid-2-col {
    /* If your theme uses CSS Grid for .product-grid */
    grid-template-columns: repeat(2, 1fr) !important; /* Override default columns */

    /* OR - If your theme uses Flexbox for .product-grid */
    /* You might need to adjust this based on your theme's flexbox setup */
    /* & > .bgtcs-product-item { */
         /* flex-basis: calc(50% - 1em); /* Example: 50% width minus half the gap */ */
         /* width: calc(50% - 1em);    /* Fallback width */ */
    /* } */
  }
}

/* Optional: Ensure 1 column on smaller mobile if needed */
/* You might already have rules for this, but just in case */
@media (max-width: 767px) {
   .product-grid.product-grid-2-col {
       grid-template-columns: 1fr !important; /* Ensure 1 column */
   }
   /* OR for Flexbox */
   /* .product-grid.product-grid-2-col > .bgtcs-product-item { */
        /* flex-basis: 100%; */
        /* width: 100%; */
   /* } */
}

/* Force rows within the product grid to act as flex containers */
.product-grid .row {
  display: flex !important; /* Use flex display */
  flex-wrap: wrap !important; /* Allow columns to wrap on smaller screens */
  margin-left: -15px !important; /* Common negative margin for Bootstrap-like grids */
  margin-right: -15px !important;/* Common negative margin for Bootstrap-like grids */
}

/* Ensure columns have appropriate padding (adjust if your theme uses different spacing) */
.product-grid .row > .col {
   padding-left: 15px !important;
   padding-right: 15px !important;
   /* Add width/flex-basis if not already defined by theme's .col */
   /* Example for 3 columns:
   flex-basis: 33.3333%;
   max-width: 33.3333%;
   */
}

/* --- START: Mobile Adjustments for Product Group Modal --- */

@media (max-width: 575px) { /* Target smaller mobile screens (adjust breakpoint if needed) */

  /* Make the modal dialog take up more screen width */
  .bgtcs-modal .bgtcs-modal-dialog {
    width: 95%; /* Increase from 90% */
    margin-top: 20px; /* Optional: Reduce top margin slightly */
    margin-bottom: 20px; /* Optional: Reduce bottom margin slightly */
  }

  /* Reduce padding inside the modal body to give content more space */
  .bgtcs-modal .bgtcs-modal-body {
    padding: 1rem; /* Decrease from 1.5rem */
  }

  /* Reduce the gap/margin below the grid inside the modal */
  #bgtcs-product-group-modal .bgtcs-modal-body ul.products.bgtcs-modal-product-grid {
    gap: 1em; /* Decrease from 1.5em (affects vertical spacing in columns-1) */
    margin-bottom: 1em; /* Decrease from 1.5em */
  }

  /* Optional: Slightly smaller title below image if needed */
  #bgtcs-product-group-modal .bgtcs-modal-body ul.products li.bgtcs-modal-item h3.woocommerce-loop-product__title {
     font-size: 0.8em; /* Decrease from 0.85em */
     margin-top: 0.3em; /* Adjust spacing */
  }

  /* Optional: Smaller modal title */
  .bgtcs-modal .bgtcs-modal-title {
      font-size: 1.5rem; /* Decrease from 1.8rem */
  }

   /* Optional: Smaller header/footer padding */
   .bgtcs-modal .bgtcs-modal-header {
      padding: 0.75rem 1rem; /* Decrease from 1rem 1.5rem */
      padding-right: 45px; /* Ensure space for close button */
   }
   .bgtcs-modal .bgtcs-modal-footer {
       padding: 0.5rem 1rem; /* Decrease from 0.75rem 1.5rem */
   }
   .bgtcs-modal .bgtcs-modal-header .modal-close-button {
        top: 8px; /* Adjust position */
        right: 8px; /* Adjust position */
    }

}

/* --- END: Mobile Adjustments for Product Group Modal --- */

/* You might need to adjust the negative margins/padding based on your theme's gutter width */

/* ==========================================================================
   10. MISC BRICKS BUILDER OVERRIDES
   ========================================================================== */
.brxe-6e3871 .dynamic[data-field-id="1"] {
  display: none !important;
}
#brxe-98defa .bricks-layout-item .image-wrapper {
  text-align: center;
}
#brxe-98defa .image-wrapper img {
  max-width: 50% !important;
  height: auto;
}

/*
 * Conditionally hide the Bricks-generated Page Title element
 * when the body has the 'bgtcs-hide-page-title' class.
 * This class is added via PHP in functions.php based on page ID or H1 in content.
 */
body.bgtcs-hide-page-title #brx-content > h1:first-of-type {
    display: none !important;
}

/*
 * If you found a more specific/reliable selector for your Bricks-generated page title,
 * use that instead, for example:
 *
 * body.bgtcs-hide-page-title .your-specific-bricks-title-class {
 *     display: none !important;
 * }
 */
/*
   NEW SPECIFIC RULE:
   Only hide .preview-text-input-wrapper.preview-text-input-single
   when it appears directly on the main image preview slide (e.g., inside #preview_slide_0).
*/
#preview_slide_0 .preview-text-input-wrapper.preview-text-input-single {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* You can also use the class if #preview_slide_0 might change, but the ID is more specific: */
/*
.staggs-view-gallery__image .preview-text-input-wrapper.preview-text-input-single {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}
*/

/*
 * Make product description content stack vertically
 * when inside the narrow 'Description' tab.
 */

/* --- Option 1: Targeting the specific li tab --- */
/* This is more specific if you only want it for THIS exact description tab */
li[aria-controls="tab-description"] .cosmetic-flex-wrapper {
    flex-direction: column;
}
li[aria-controls="tab-description"] .cosmetic-video,
li[aria-controls="tab-description"] .cosmetic-text {
    width: 100%;
}

li[aria-controls="tab-description"] .text-image-section {
    flex-direction: column;
}
li[aria-controls="tab-description"] .text-image-section .image,
li[aria-controls="tab-description"] .text-image-section .text {
    width: 100%;
}

/* --- Option 2: Targeting any content within .option-group-tabs --- */
/* This is more general if ALL content within any .option-group-tabs
   should behave this way. Choose this or Option 1, not both unless needed. */
/*
.option-group-tabs .cosmetic-flex-wrapper {
    flex-direction: column;
}
.option-group-tabs .cosmetic-video,
.option-group-tabs .cosmetic-text {
    width: 100%;
}

.option-group-tabs .text-image-section {
    flex-direction: column;
}
.option-group-tabs .text-image-section .image,
.option-group-tabs .text-image-section .text {
    width: 100%;
}
*/

/*
 * Optional: Reduce padding within the tab content if it feels too tight
 */
li[aria-controls="tab-description"] .section-block {
    padding-left: var(--spacing-sm); /* Use new CSS variable, was 10px */
    padding-right: var(--spacing-sm); /* Use new CSS variable, was 10px */
    /* You might not need to adjust top/bottom padding */
    /* max-width: 100%; Remove if you want it to use full tab width */
}

/* If you used Option 2 above, use this for padding: */
/*
.option-group-tabs .section-block {
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
}
*/


/*
--------------------------------------------------------------------------------
Checkout Notices (Disclaimer, Timeline, Contact Info)
--------------------------------------------------------------------------------
*/
.woocommerce-checkout .bgtcs-checkout-notices-wrapper {
    margin-top: 15px;     /* Space above the notices block */
    margin-bottom: 20px;  /* Space below the notices block, above "Place Order" */
    padding: 15px;
    border: 1px solid #e0e0e0; /* Optional: a light border for the whole block */
    border-radius: var(--radius);      /* Use new CSS variable */
    background-color: #f9f9f9; /* Optional: a very light background for the block */
    text-align: center;
    clear: both;
}

.woocommerce-checkout .bgtcs-checkout-notices-wrapper p {
    font-family: inherit; /* Or your theme's specific font */
    font-size: 0.9em;
    color: #515151; /* Adjust to match your theme's text color */
    margin: 0 0 10px 0; /* Spacing between each paragraph/message */
    padding: 0;
    border: none;
    background-color: transparent;
    line-height: 1.5; /* Improved readability for paragraphs */
}

.woocommerce-checkout .bgtcs-checkout-disclaimer {
    font-style: italic; /* Keep the review message italicized if desired */
}

.woocommerce-checkout .bgtcs-checkout-timeline-notice {
    /* Add specific styles if needed, e.g., font-weight: bold; */
}

.woocommerce-checkout .bgtcs-checkout-contact-info {
    font-size: 0.85em; /* Maybe slightly smaller for contact info */
}

.woocommerce-checkout .bgtcs-checkout-contact-info a {
    color: var(--color-primary); /* Use new CSS variable */
    text-decoration: underline;
}

.woocommerce-checkout .bgtcs-checkout-contact-info a:hover {
    text-decoration: none;
}

.woocommerce-checkout .bgtcs-checkout-notices-wrapper p:last-child {
    margin-bottom: 0; /* Remove bottom margin from the very last message */
}

/* Responsive adjustments if needed */
@media (max-width: 767px) {
    .woocommerce-checkout .bgtcs-checkout-notices-wrapper p {
        font-size: 0.85em;
        margin-bottom: 8px;
    }
    .woocommerce-checkout .bgtcs-checkout-contact-info {
        font-size: 0.8em;
    }
}

/* Styling for the "Today Only" message on special product pages */
.today-only-message {
    color: #c00; /* A strong red color */
    font-weight: bold;
    font-size: 1.1em;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 15px;
    border: 1px solid #f0e4e4;
    background-color: #fdf7f7;
    padding: 8px;
}

/*
========================================================================
BGTCS: Single Product Page - Custom Button Styling (Square & Unified)
========================================================================
*/

/*
 * This rule targets ONLY the "Product Info", "View All Images",
 * and "Color Details" buttons located inside their specific container
 * on the single product page.
 */
.bgtcs-sp-button-container .button {
    /* --- Fix for a Consistent Height --- */
    padding-top: 0.7em !important;    /* Explicitly set top/bottom padding */
    padding-bottom: 0.7em !important;
    line-height: 1.5 !important;      /* Normalize the line height */
    height: auto !important;          /* Let the content determine height */
    box-sizing: border-box !important;/* Ensure padding is included in the size */
    
    /* --- GOAL 1: Make corners square --- */
    border-radius: 0 !important;

    /* --- GOAL 2: Unify the color and look --- */
    background-color: #004E7F !important;
    border-color: #004E7F !important;
    color: #fff !important;
    
    /* Ensure flex alignment doesn't stretch them vertically */
    align-self: center;
}

/* Unify the hover effect for all three buttons */
.bgtcs-sp-button-container .button:hover {
    background-color: #003366 !important; /* Darker shade for hover */
    border-color: #003366 !important;
    color: #fff !important; /* Ensure text stays white */
}
/* ================================
   END - Barrington Gifts Child Theme
   ================================ */
/* Hide the duplicate LuperIQ coupon system with correct selectors - Final Fix */  
.coupon-header,
.coupon-type-selector {
    display: none !important;
}

/* Fix for checkbox toggle functionality - Override inline display: none */
.bgtcs-promo-selection-container input[type="checkbox"]:checked ~ .bgtcs-promo-input-wrapper,
input[id="bgtcs_has_discount_code"]:checked ~ * #bgtcs-discount-code-wrapper,
input[id="bgtcs_has_gift_card"]:checked ~ * #bgtcs-gift-card-wrapper {
    display: block !important;
}

/* Show input fields when checkboxes are checked using adjacent sibling selectors */
#bgtcs_has_discount_code:checked ~ * #bgtcs-discount-code-wrapper,
#bgtcs_has_gift_card:checked ~ * #bgtcs-gift-card-wrapper {
    display: block !important;
}

/* Direct JavaScript fix for checkbox functionality via CSS */

/* Product Grid Styles */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.bgtcs-product-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.bgtcs-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.bgtcs-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.bgtcs-product-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.bgtcs-product-item h3 {
    padding: 15px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.bgtcs-product-item p {
    padding: 0 15px;
    color: #666;
    font-size: 14px;
}

.bgtcs-product-price {
    display: block;
    padding: 0 15px;
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.bgtcs-start-designing {
    display: block;
    width: calc(100% - 30px);
    margin: 15px;
    padding: 12px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bgtcs-start-designing:hover {
    background: #333;
}

/* Modal Styles */
.bgtcs-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
}

.bgtcs-modal-dialog {
    position: relative;
    max-width: 800px;
    margin: 50px auto;
}

.bgtcs-modal-content {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.bgtcs-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close-button {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.bgtcs-modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

