/*
 Theme Name:   TW Saddlery
 Theme URI:    https://twsaddlery.com/
 Description:  Kadence Child Theme by Lauren Dierschke of Restored 316
 Author:       Lauren Dierschke
 Author URI:   https://restored316.com
 Template:     kadence
 Version:      1.0.2
 Tags:         customizable, modern, responsive-layout, gutenberg, header builder, footer builder
 Text Domain:  kadencechild
*/

/* Theme customization starts here
-------------------------------------------------------------- */

.blocks-gallery-caption figcaption, 
.wp-block-embed figcaption, 
.wp-block-image figcaption,
.wp-block-table figcaption,
.wp-block-audio figcaption, 
.wp-block-video figcaption {
    color: var(--global-palette9);
    font-size: 70%;
    text-align: left;
    font-style: italic;
}

.menu-label-description {
    text-align: center;
    display: inline;
    margin-left: 5px;
    font-style: italic;
}

.header-navigation .header-menu-container ul ul.sub-menu, 
.header-navigation .header-menu-container ul ul.submenu {
    border-radius: 5px;
}

.about .sub-menu .menu-item a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.about .sub-menu .menu-item a::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  background-color: var(--global-palette2);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.about .sub-menu .menu-item a:hover::after {
  animation: kb-arrow-bounce 0.5s ease;
}

@keyframes kb-arrow-bounce {
  0%   { transform: translateX(0); }
  40%  { transform: translateX(8px); }
  65%  { transform: translateX(3px); }
  100% { transform: translateX(0); }
}

.single-content ul.wc-block-product-template {
  padding-left: 0;
}

.current-site a {
  background: var(--global-palette3);
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

.gform_legacy_markup_wrapper .gfield_required {
  color: var(--global-palette6) !important;
}

/* WooCommerce
-------------------------------------------------------------- */

.woocommerce ul.products li.product .entry-content-wrap {
  margin: 0;
  border-radius: 0;
}

.content-style-unboxed .content-bg.loop-entry .content-bg:not(.loop-entry) {
  background-color: var(--global-palette4);
  color: var(--global-palette9);
}

.woocommerce ul.products.woo-archive-action-on-hover li.product:hover .product-action-wrap, .woocommerce ul.products.woo-archive-action-on-hover li.product:focus-within .product-action-wrap {
  bottom: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
  background-color: var(--global-palette4);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
  background-color: var(--global-palette5);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
  border-color: var(--global-palette4);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
  border-bottom-color: var(--global-palette5);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
.woocommerce div.product .woocommerce-tabs ul.tabs li a,
.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
  color: var(--global-palette9);
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before {
  border-bottom-color: var(--global-palette5);
}

#cart-drawer h2.side-cart-header {
  color: var(--global-palette4);
}

.woocommerce-cart table.cart .product-name a, .woocommerce-checkout table.cart .product-name a, #add_payment_method table.cart .product-name a {
  color: var(--global-palette9);
}

.woocommerce-cart table.cart .product-name a:hover, 
.woocommerce-checkout table.cart .product-name a:hover, 
#add_payment_method table.cart .product-name a:hover,
.woocommerce-checkout p,
.woocommerce form .form-row label {
  color: var(--global-palette9);
}

.woocommerce-checkout table.shop_table th,
.woocommerce-checkout table.shop_table td,
.wc_payment_method {
  color: var(--global-palette3);
}

.woocommerce .form-row .required,
.woocommerce a.remove {
  color: var(--global-palette2);
}

.woocommerce table.shop_table td {
  border-top-color: var(--global-palette5);
}

.woocommerce h2 {
  margin-bottom: 20px;
}

@media screen and (max-width: 719px) {
    .woocommerce div.product .woocommerce-tabs {
        border: none;
    }
}

.wc-block-cart__submit {
  border: none;
}

.tws-designer .tc-label-text,
.tws-designer .price.tc-price,
.tws-designer .tm-description {
  font-size: 16px;
}

.variations {
  background: #3d2f18;
  padding: 10px;
  border-radius: 5px;
}

.tc-extra-product-options {
  padding: 30px 0 40px;
}

/* ===== BEGIN Design Your Saddle styles — safe to move to style.css ===== */

.tws-designer h3 {
  color: var(--global-palette3);
}

/* Class doubled and key properties forced, because Kadence's global button
   styles (Teko, uppercase, palette background) otherwise win. */
.tws-designer .tws-designer__trigger.tws-designer__trigger{
  display:flex !important;
  align-items:center;justify-content:space-between;gap:1rem;
  width:100%;
  padding:1.125rem 1.375rem !important;
  font-family:"DM Sans",sans-serif !important;
  font-size:1.0625rem !important;
  font-weight:600 !important;
  line-height:1.3 !important;
  letter-spacing:0 !important;
  text-transform:none !important;
  text-align:left;
  color:#fff9f1 !important;
  background:var(--global-palette4) !important;
  border:2px solid #151008 !important;
  border-radius:8px !important;
  box-shadow:none !important;
  cursor:pointer;
  transition:background .2s ease,border-color .2s ease;
}
.tws-designer .tws-designer__trigger.tws-designer__trigger:hover{
  background:#3d2f18 !important;border-color:#3d2f18 !important;color:#fff9f1 !important;
}
.tws-designer .tws-designer__trigger.tws-designer__trigger:focus-visible{
  outline:3px solid #b68d47;outline-offset:2px;
}
.tws-designer .tws-designer__trigger.is-configured{
  background:#fff9f1 !important;color:#151008 !important;border-color:#b68d47 !important;
}
.tws-designer .tws-designer__trigger.is-configured:hover{
  background:#eadfca !important;border-color:#8e6e37 !important;color:#151008 !important;
}

.tws-designer__trigger-label{display:block;}
.tws-designer__trigger-hint{
  display:block;margin-top:.15rem;
  font-size:.8125rem !important;font-weight:400 !important;
  letter-spacing:.02em !important;text-transform:none !important;
  color:#ceb181;
}
.tws-designer .tws-designer__trigger.is-configured .tws-designer__trigger-hint{color:#654e28;}

.tws-designer__chev{
  flex-shrink:0;width:22px;height:22px;background-color:currentColor;
  -webkit-mask-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  -webkit-mask-position:center;mask-position:center;
  -webkit-mask-size:contain;mask-size:contain;
}

/* Anything left behind after the quantity box and button move into the
   dialog — collapses the gap under the button. */
.tws-empty{display:none !important;}

/* ---------- Dialog ---------- */
.tws-designer__dialog{
  padding:0;border:0;border-radius:10px;
  width:min(780px,calc(100% - 2.5rem));max-width:none;
  max-height:min(92vh,900px);
  background:#fff9f1;color:#151008;
  box-shadow:0 24px 60px rgba(21,16,8,.45);
  overflow:hidden;
}
.tws-designer__dialog:not([open]){display:none;}
.tws-designer__dialog[open]{display:flex;flex-direction:column;}
.tws-designer__dialog::backdrop{background:rgba(21,16,8,.72);}
.tws-designer__dialog.has-overlay{overflow:visible;}
.tws-designer__dialog > .tws-overlay-hosted{z-index:2147483647;}

/* Fallback when USE_TOP_LAYER is false. */
.tws-designer__dialog.is-inline{position:fixed;inset:0;margin:auto;z-index:99990;}
.tws-designer__backdrop{position:fixed;inset:0;background:rgba(21,16,8,.72);z-index:99989;}
.tws-designer__backdrop[hidden]{display:none;}

.tws-designer__head{
  flex:0 0 auto;
  display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;
  padding:1.5rem 1.75rem 1.25rem;background: var(--global-palette4);
}
.tws-designer__title{
  margin:0;font-family:"Playfair Display",serif;
  font-size:1.75rem;line-height:1.15;font-weight:600;color:#fff9f1;
}
.tws-designer__product{
  display:block;margin-top:.35rem;
  font-family:"Google Sans Flex",sans-serif;
  font-size:.8125rem;font-weight:500;letter-spacing:.08em;text-transform:uppercase;color:#b68d47;
}
.tws-designer .tws-designer__close.tws-designer__close{
  flex-shrink:0;display:flex;align-items:center;justify-content:center;
  width:40px;height:40px;padding:0 !important;
  color:#fff9f1 !important;background:transparent !important;
  border:1px solid rgba(255,249,241,.3) !important;border-radius:8px !important;
  font-size:1.125rem !important;line-height:1;cursor:pointer;
  transition:background .2s ease,border-color .2s ease;
}
.tws-designer .tws-designer__close.tws-designer__close:hover{
  background:rgba(255,249,241,.12) !important;border-color:#b68d47 !important;
}

.tws-designer__body{
  flex:1 1 auto;
  overflow-x:clip;
  overflow-y: auto;
  -webkit-overflow-scrolling:touch;
  padding:1.5rem 1.75rem;
}
.tws-designer__body .tm-extra-product-options,
.tws-designer__body .tc-extra-product-options{margin:0;}

/* Kadence styles form controls white to suit the dark site; inside the cream
   dialog they need dark text. Controls don't inherit colour from the dialog. */
.tws-designer__body select,
.tws-designer__body textarea,
.tws-designer__body input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),
.tws-designer__cta .quantity .qty{
  color:#151008 !important;
  background-color:#fff !important;
  border:1px solid rgba(21,16,8,.25) !important;
  border-radius:6px;
}

/* Firefox and Windows draw options from the select's own colours. */
.tws-designer__body select option{
  color:#151008;
  background-color:#fff;
}

.tws-designer .tc-tooltip,
.tws-designer .tm-epo-required {
  color: #b68d47;
}

/* Footer is one row: totals left, quantity + button right. */
.tws-designer__footer{
  flex:0 0 auto;
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:.75rem 1rem;
  padding:.875rem 1.75rem;background:#fff9f1;
  border-top:1px solid rgba(21,16,8,.14);
  box-shadow:0 -8px 20px rgba(21,16,8,.06);
}

.tws-designer__totals{flex:1 1 auto;min-width:0;margin:0;}
.tws-designer__totals:empty{display:none;}

/* Flatten the plugin's totals box so it reads as a compact price block. */
.tws-designer__totals > *,
.tws-designer__totals .tm-extra-product-options-totals,
.tws-designer__totals .tc-extra-product-options-totals{
  margin:0 !important;padding:0 !important;
  border:0 !important;background:none !important;box-shadow:none !important;
}
.tws-designer__totals .tm-options-totals,
.tws-designer__totals .tc-options-totals{
  font-size:.75rem !important;line-height:1.3 !important;opacity:.7;
}
.tws-designer__totals .tm-final-totals,
.tws-designer__totals .tc-final-totals{
  font-family:"Google Sans Flex",sans-serif !important;
  font-size:1.125rem !important;font-weight:600 !important;
  line-height:1.25 !important;white-space:nowrap;
}
.tws-designer__totals .amount{white-space:nowrap;}

.tws-designer__cta{
  flex:0 0 auto;display:flex;align-items:center;gap:.5rem;
}
.tws-designer__cta .quantity{margin:0;}
.tws-designer__cta .quantity .qty{width:64px;}

/* line-height and inline-flex stop Kadence's Teko button styling from
   pushing the label past the bottom of the button box. */
.tws-designer__cta .single_add_to_cart_button{
  display:inline-flex !important;
  align-items:center;justify-content:center;
  flex:0 0 auto;margin:0 !important;
  padding:.75rem 1.5rem !important;
  min-height:48px;height:auto !important;
  line-height:1 !important;overflow:visible;
  background:#b68d47 !important;color:#151008 !important;
  border:2px solid #b68d47 !important;border-radius:8px !important;
}
.tws-designer__cta .single_add_to_cart_button:hover{
  background:#8e6e37 !important;border-color:#8e6e37 !important;color:#fff9f1 !important;
}

.tws-designer hr {
  border-bottom: 2px solid #151008;
}

.tws-designer h4,
.tws-designer h3 {
  color: #151008;
}

body.tws-designer-open{overflow:hidden;}
body.tws-designer-open .tm-epo-totals-box,
body.tws-designer-open .tc-epo-totals-box{display:none !important;}

@media (max-width:781px){
  .tws-designer__dialog{width:100%;max-width:100%;height:100%;max-height:100%;margin:0;border-radius:0;}
  .tws-designer__head{padding:1.25rem;}
  .tws-designer__title{font-size:1.375rem;}
  .tws-designer__body{padding:1.25rem;}

  /* Stays a single row — just tighter. */
  .tws-designer__footer{
    gap:.5rem .75rem;
    padding:.75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
  }
  .tws-designer__totals .tm-final-totals,
  .tws-designer__totals .tc-final-totals{font-size:1rem !important;}
  .tws-designer__totals .tm-options-totals,
  .tws-designer__totals .tc-options-totals{display:none;}
  .tws-designer__cta .quantity .qty{width:56px;}
  .tws-designer__cta .single_add_to_cart_button{
    padding:.7rem 1.1rem !important;min-height:44px;
    font-size:.9375rem !important;
  }
}