/* Side cart drawer */

.gg-drawer {
  position: fixed;
  inset: 0;
  z-index: 2400;
  visibility: hidden;
  pointer-events: none;
  /* Delay hide until slide/fade finish so close animates smoothly */
  transition: visibility 0s linear 0.36s;
}

.gg-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0s linear 0s;
}

html.gg-drawer-open,
body.gg-drawer-open {
  overflow: hidden;
}

/* Keep layout width stable when the page scrollbar is hidden. */
html.gg-drawer-open {
  --gg-scrollbar-gap: 0px;
}

body.gg-drawer-open {
  padding-right: var(--gg-scrollbar-gap, 0px);
}

body.gg-drawer-open .site-header {
  right: var(--gg-scrollbar-gap, 0px);
}

body.gg-drawer-open .announcement,
body.gg-drawer-open .marquee {
  padding-right: var(--gg-scrollbar-gap, 0px);
}

.gg-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transition: opacity 0.36s ease;
}

.gg-drawer.is-open .gg-drawer-backdrop {
  opacity: 1;
}

.gg-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(420px, 100vw);
  height: 100%;
  background: #fff;
  color: #111;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.gg-drawer.is-open .gg-drawer-panel {
  transform: translateX(0);
}

.gg-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 22px 22px 18px;
  border-bottom: 1px solid #ececec;
}

.gg-drawer-head h2 {
  margin: 0;
  font-family: var(--font);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}

.gg-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #111;
  cursor: pointer;
}

.gg-drawer-close:hover {
  opacity: 0.6;
}

.gg-drawer-contents {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.gg-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 22px 24px;
  -webkit-overflow-scrolling: touch;
}

.gg-drawer-empty {
  margin: 40px 0;
  color: #666;
  font-size: 14px;
}

.gg-drawer-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gg-drawer-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid #f0f0f0;
}

.gg-drawer-thumb {
  display: block;
  width: 88px;
  height: 88px;
  overflow: hidden;
  background: #f3f3f3;
}

.gg-drawer-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gg-drawer-meta {
  min-width: 0;
}

.gg-drawer-meta-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.gg-drawer-name {
  flex: 1;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #111;
  text-decoration: none;
}

.gg-drawer-name:hover {
  text-decoration: underline;
}

.gg-drawer-remove {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: -4px -6px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: #9a9a9a;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.gg-drawer-remove .svg-inline--fa {
  width: 0.9em;
  height: 0.9em;
}

.gg-drawer-remove:hover {
  color: #111;
}

.gg-drawer-variant {
  margin-top: 4px;
  font-size: 13px;
  color: #777;
}

.gg-drawer-price {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
}

.gg-drawer-price .woocommerce-Price-amount,
.gg-drawer-total-amt .woocommerce-Price-amount {
  font-weight: 600;
}

.gg-drawer-qty {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-top: 12px;
}

.gg-drawer-qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #111;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.gg-drawer-qty-btn:hover {
  opacity: 0.55;
}

.gg-drawer-qty-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.gg-drawer-qty-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
}

.gg-drawer-foot {
  flex-shrink: 0;
  padding: 16px 22px 22px;
  border-top: 1px solid #ececec;
  background: #fff;
}

.gg-drawer-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 16px;
  font-weight: 700;
}

.gg-drawer-note {
  margin: 6px 0 16px;
  font-size: 12px;
  color: #888;
}

.gg-drawer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gg-drawer-actions .gg-drawer-btn-view:only-child {
  grid-column: 1 / -1;
}

.gg-drawer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 10px;
  border: 1px solid #111;
  border-radius: 0;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.gg-drawer-btn-view {
  background: #fff;
  color: #111;
}

.gg-drawer-btn-view:hover {
  background: #111;
  color: #fff;
}

.gg-drawer-btn-checkout {
  background: #111;
  color: #fff;
}

.gg-drawer-btn-checkout:hover {
  background: #fff;
  color: #111;
}

.gg-drawer.is-busy .gg-drawer-contents {
  pointer-events: none;
  opacity: 0.65;
}

form.cart a.added_to_cart,
.pd-cart a.added_to_cart,
.gg-drawer a.added_to_cart {
  display: none !important;
}

/* Never show WooCommerce loading spinner or added checkmark on ATC buttons */
body.single-product div.product.pd-product form.cart .single_add_to_cart_button.loading,
body.single-product div.product.pd-product form.cart .single_add_to_cart_button.added,
body.single-product .pd-atc.loading,
body.single-product .pd-atc.added,
.woocommerce a.button.loading,
.woocommerce a.button.added,
.woocommerce button.button.loading,
.woocommerce button.button.added {
  opacity: 1 !important;
  color: inherit !important;
  pointer-events: auto;
}

body.single-product div.product.pd-product form.cart .single_add_to_cart_button.loading::before,
body.single-product div.product.pd-product form.cart .single_add_to_cart_button.loading::after,
body.single-product div.product.pd-product form.cart .single_add_to_cart_button.added::before,
body.single-product div.product.pd-product form.cart .single_add_to_cart_button.added::after,
body.single-product .pd-atc.loading::before,
body.single-product .pd-atc.loading::after,
body.single-product .pd-atc.added::before,
body.single-product .pd-atc.added::after,
.woocommerce a.button.loading::before,
.woocommerce a.button.loading::after,
.woocommerce a.button.added::before,
.woocommerce a.button.added::after,
.woocommerce button.button.loading::before,
.woocommerce button.button.loading::after,
.woocommerce button.button.added::before,
.woocommerce button.button.added::after {
  content: none !important;
  display: none !important;
}

@media (max-width: 480px) {
  .gg-drawer-panel {
    width: 100vw;
  }
}
