/* Books Cellar shop buttons */
.woocommerce button.button.alt,
.woocommerce a.button.alt,
.woocommerce a.add_to_cart_button,
.woocommerce button.single_add_to_cart_button,
.wc-block-components-product-button__button {
  background: #C6A66B !important;
  color: #510A1D !important;
  border: 1px solid #C6A66B !important;
  border-radius: 999px;
}
.woocommerce button.button.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce a.add_to_cart_button:hover,
.woocommerce button.single_add_to_cart_button:hover,
.wc-block-components-product-button__button:hover {
  background: #F3E7CF !important;
  color: #510A1D !important;
  border-color: #F3E7CF !important;
}
.woocommerce button.single_add_to_cart_button:focus-visible,
.woocommerce a.add_to_cart_button:focus-visible {
  outline: 2px solid #F3E7CF;
  outline-offset: 4px;
}

/* Books Cellar responsive shop and accessibility */
.woocommerce ul.products {
 display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:32px 24px;
}
.woocommerce ul.products::before,.woocommerce ul.products::after {display:none;}
.woocommerce ul.products li.product {
 float:none!important; width:auto!important; margin:0!important; min-width:0;
 display:flex; flex-direction:column; text-align:center;
}
.woocommerce ul.products li.product .woocommerce-loop-product__link {display:block;}
.woocommerce ul.products li.product a img {
 width:100%; aspect-ratio:2/3; object-fit:contain; margin:0 auto 16px;
 background:#faf7f1;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
 font-size:clamp(16px,1.3vw,20px); line-height:1.4; overflow-wrap:anywhere;
}
.woocommerce ul.products li.product .price {color:#F3E7CF; margin:12px 0;}
.woocommerce ul.products li.product .button {
 align-self:center; margin-top:auto; min-height:44px; display:inline-flex;
 align-items:center; justify-content:center; line-height:1.3; padding:12px 20px;
 max-width:100%; white-space:normal; text-align:center;
}
.woocommerce ul.products li.product.outofstock .button {
 background:#f3e7cf; color:#510A1D; border:1px solid #c6a66b; border-radius:999px;
}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {min-width:44px;min-height:44px;display:grid;place-items:center;}
body :is(a,button,input,select,textarea,[tabindex]):focus-visible {
 outline:3px solid #c6a66b!important; outline-offset:3px; box-shadow:0 0 0 5px #510a1d;
}
.elementor-field-group {min-width:0;}
.elementor-field-type-recaptcha .elementor-field {max-width:100%;overflow-x:auto;}
@media (max-width:1024px) {
 .woocommerce ul.products {grid-template-columns:repeat(3,minmax(0,1fr));gap:28px 20px;}
}
@media (max-width:767px) {
 .woocommerce ul.products {grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 16px;}
 .woocommerce ul.products li.product .button {padding:10px 14px;font-size:14px;}
 .woocommerce .woocommerce-ordering,.woocommerce .woocommerce-result-count {float:none;width:100%;}
 .woocommerce .woocommerce-ordering select {max-width:100%;min-height:44px;font-size:16px;}
 .woocommerce div.product .product_title {font-size:clamp(26px,7vw,40px);line-height:1.15;overflow-wrap:anywhere;}
 .woocommerce div.product form.cart {display:flex;flex-wrap:wrap;gap:12px;}
 .woocommerce .quantity .qty {min-height:44px;font-size:16px;}
 .woocommerce button.single_add_to_cart_button {min-height:48px;}
 .elementor-form input:not([type=checkbox]):not([type=radio]),.elementor-form select,.elementor-form textarea {font-size:16px;min-height:44px;}
 #elementor-popup-modal-3768 {align-items:flex-start!important;padding:16px 12px;box-sizing:border-box;}
 #elementor-popup-modal-3768 .dialog-widget-content {width:100%!important;max-width:480px!important;margin:0 auto!important;max-height:calc(100dvh - 32px);overflow:auto;}
 #elementor-popup-modal-3768 .dialog-message {width:100%!important;max-width:100%!important;max-height:calc(100dvh - 32px);}
 #elementor-popup-modal-3768 .dialog-close-button {width:44px;height:44px;display:flex;align-items:center;justify-content:center;top:6px;right:6px;}
 #elementor-popup-modal-3768 .elementor-widget-heading {padding-inline:32px;}
}
@media (prefers-reduced-motion:reduce) {
 html {scroll-behavior:auto!important;}
 *,*::before,*::after {animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important;}
 .elementor-invisible {visibility:visible!important;}
}

/* Final contrast and popup sizing */
.woocommerce ul.products li.product span.price {color:#F3E7CF!important;}
@media(max-width:767px){body #elementor-popup-modal-3768{align-items:flex-start!important;padding:16px 12px!important;}body #elementor-popup-modal-3768 .dialog-widget-content{width:calc(100vw - 24px)!important;max-width:480px!important;margin:0 auto!important;}body #elementor-popup-modal-3768 .dialog-message{width:100%!important;max-width:100%!important;}body #elementor-popup-modal-3768 .dialog-close-button{width:44px!important;height:44px!important;top:6px!important;right:6px!important;}body #elementor-popup-modal-3768 .elementor-widget-text-editor{font-size:14px!important;line-height:1.6!important;}}

/* Preserve Books Cellar styling for external book links */
.woocommerce ul.products li.product a.product_type_external {background:#C6A66B!important;color:#510A1D!important;border:1px solid #C6A66B!important;border-radius:999px;}
.woocommerce ul.products li.product a.product_type_external:hover {background:#F3E7CF!important;border-color:#F3E7CF!important;}

/* Books Cellar pagination */
.woocommerce nav.woocommerce-pagination {margin:40px auto;text-align:center;}
.woocommerce nav.woocommerce-pagination ul {display:flex;flex-wrap:wrap;justify-content:center;gap:8px;border:0;}
.woocommerce nav.woocommerce-pagination ul li {border:0;float:none;}
.woocommerce nav.woocommerce-pagination ul li a,.woocommerce nav.woocommerce-pagination ul li span {min-width:44px;min-height:44px;padding:10px;border:1px solid #C6A66B;border-radius:999px;color:#F3E7CF;background:transparent;font-weight:600;box-sizing:border-box;}
.woocommerce nav.woocommerce-pagination ul li span.current,.woocommerce nav.woocommerce-pagination ul li a:hover,.woocommerce nav.woocommerce-pagination ul li a:focus-visible {background:#C6A66B;color:#510A1D;}
.woocommerce nav.woocommerce-pagination ul li span.dots {border-color:transparent;}

/* Homepage motion: Books Cellar, September 25 */
@keyframes bc-home-arrive {from {opacity:.25;transform:translateY(18px);} to {opacity:1;transform:translateY(0);}}
@keyframes bc-home-reveal {from {opacity:.35;transform:translateY(24px);} to {opacity:1;transform:translateY(0);}}
@keyframes bc-home-rule {from {transform:scaleX(.35);} to {transform:scaleX(1);}}
@media (prefers-reduced-motion:no-preference) {
 body.home .elementor-75 .elementor-element-6c1150d0 .elementor-heading-title {animation:bc-home-arrive .8s cubic-bezier(.22,1,.36,1) both;}
 body.home .elementor-75 .elementor-element-a822d63 {animation:bc-home-arrive .8s .15s cubic-bezier(.22,1,.36,1) both;}
 body.home .elementor-75 .elementor-button {transition:transform .25s ease,box-shadow .25s ease,background-color .25s ease;}
 body.home .elementor-75 .elementor-button:focus-visible {transform:translateY(-3px);}
 @supports (animation-timeline:view()) {
  body.home .elementor-75 :is(.elementor-element-3d20a83b,.elementor-element-6ca06123,.elementor-element-5d673176,.elementor-element-a7a1796,.elementor-element-e3cad43,.elementor-element-324c1ada,.elementor-element-27cb8df9,.elementor-element-62fce6c9,.elementor-element-128d5c23,.elementor-element-1a9ebaf,.elementor-element-6018760) {
   animation:bc-home-reveal 1s linear both;animation-timeline:view();animation-range:entry 0% entry 85%;
  }
  body.home .elementor-75 .elementor-divider-separator {animation:bc-home-rule 1s linear both;animation-timeline:view();animation-range:entry 0% entry 100%;transform-origin:center;}
 }
 @media (hover:hover) and (pointer:fine) {
  body.home .elementor-75 .elementor-button:hover {transform:translateY(-3px);box-shadow:0 10px 24px rgba(81,10,29,.18);}
  body.home .elementor-75 .elementor-widget-image img {transition:transform .55s cubic-bezier(.22,1,.36,1),box-shadow .55s ease;}
  body.home .elementor-75 .elementor-widget-image:hover img {transform:translateY(-5px) scale(1.015);box-shadow:0 16px 30px rgba(81,10,29,.16);}
 }
}
@media (prefers-reduced-motion:reduce) {
 body.home .elementor-75 .elementor-widget,body.home .elementor-75 .elementor-heading-title,body.home .elementor-75 .elementor-divider-separator {animation:none!important;opacity:1!important;transform:none!important;}
}

/* Popup below the menu; contained mobile video */
body {--bc-menu-height:168.5px;--bc-admin-offset:0px;}
body.admin-bar {--bc-admin-offset:32px;}
body #elementor-popup-modal-3768 {
 top:0!important;height:100dvh!important;align-items:flex-start!important;justify-content:center!important;
 padding:calc(var(--bc-menu-height) + var(--bc-admin-offset) + 30px) 16px 16px!important;
 box-sizing:border-box;
}
body #elementor-popup-modal-3768 .dialog-widget-content {
 margin:0 auto!important;max-height:calc(100dvh - var(--bc-menu-height) - var(--bc-admin-offset) - 46px)!important;overflow:auto!important;
}
body #elementor-popup-modal-3768 .dialog-message {
 max-height:calc(100dvh - var(--bc-menu-height) - var(--bc-admin-offset) - 46px)!important;overflow:auto!important;
}
@media(max-width:782px){body.admin-bar{--bc-admin-offset:46px;}}
@media(max-width:767px){
 body {--bc-menu-height:121px;}
 body #elementor-popup-modal-3768 {padding-inline:12px!important;}
 body.home .elementor-75 .elementor-element-6a2dc37 {width:100%!important;max-width:100%!important;min-width:0;}
 body.home .elementor-75 .elementor-element-6a2dc37 .elementor-wrapper {height:min(52svh,360px)!important;min-height:0!important;aspect-ratio:auto!important;overflow:hidden;border-radius:12px;background:#510a1d;}
 body.home .elementor-75 .elementor-element-6a2dc37 video {display:block;width:100%!important;height:100%!important;max-height:360px;object-fit:contain!important;}
}
