/**
 * WooCommerce — Cart page + mini-cart drawer.
 * Scoped under .v-cc / .v-minicart
 */

/* --------------------------------------------------------------------------
   Mini-cart (header drawer)
   -------------------------------------------------------------------------- */

.v-has-minicart--narrow .v-minicart.v-drawer {
  width: min(100%, 22.5rem);
}

.v-has-minicart--medium .v-minicart.v-drawer,
.v-minicart.v-drawer {
  width: min(100%, var(--v-cc-mini-width, 26.25rem));
}

.v-has-minicart--wide .v-minicart.v-drawer {
  width: min(100%, 30rem);
}

.v-minicart .v-drawer__body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.v-minicart .widget_shopping_cart_content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.v-minicart__list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  overflow-y: auto;
}

.v-minicart__item {
  position: relative;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.85rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(18, 20, 18, 0.1);
  align-items: start;
}

.v-minicart__thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: rgba(18, 20, 18, 0.04);
}

.v-minicart__name {
  margin: 0 1.5rem 0.35rem 0;
  font-family: var(--v-font-body);
  font-size: var(--v-text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.v-minicart__name a {
  color: inherit;
  text-decoration: none;
}

.v-minicart__name a:hover {
  opacity: 0.7;
}

.v-cc-item__meta,
.v-minicart .v-cc-item__meta {
  list-style: none;
  margin: 0 0 0.65rem;
  padding: 0;
  font-size: var(--v-text-xs);
  color: var(--v-color-muted, #5c635c);
  line-height: 1.45;
}

.v-minicart__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.v-minicart__price {
  font-size: var(--v-text-sm);
}

.v-minicart__remove {
  position: absolute;
  top: 0.75rem;
  inset-inline-end: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  font-size: 1.25rem;
  line-height: 1;
  opacity: 0.45;
}

.v-minicart__remove:hover,
.v-minicart__remove:focus-visible {
  opacity: 1;
}

.v-minicart__footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(18, 20, 18, 0.12);
}

.v-minicart__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 1rem;
  font-size: var(--v-text-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.v-minicart__actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0;
}

.v-minicart__actions .v-btn,
.v-minicart__actions a.button,
.v-minicart__actions .button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3rem;
  margin: 0;
  border-radius: 0;
  font-size: var(--v-text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}

.v-minicart__checkout,
.v-minicart__actions .checkout {
  background: var(--v-color-ink, #121412) !important;
  color: #f7f5f0 !important;
  border: 0 !important;
}

.v-minicart__view,
.v-minicart__actions .wc-forward:not(.checkout) {
  background: transparent !important;
  color: inherit !important;
  box-shadow: inset 0 0 0 1px rgba(18, 20, 18, 0.35);
}

.v-minicart__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 1rem;
  text-align: center;
}

.v-minicart__empty-text {
  margin: 0;
  font-size: var(--v-text-sm);
  color: var(--v-color-muted, #5c635c);
}

/* Hide default Woo buttons when our actions exist — keep both styled. */
.v-minicart .woocommerce-mini-cart__buttons > a.button {
  /* styled above via .v-minicart__actions */
}

/* Quantity control */
.v-cc-qty {
  display: inline-flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(18, 20, 18, 0.35);
  max-width: 7.5rem;
}

/* Hide Blocksy quantity chrome if a .quantity wrapper slips through */
.v-cc-qty .ct-increase,
.v-cc-qty .ct-decrease,
.v-cc-qty .quantity .ct-increase,
.v-cc-qty .quantity .ct-decrease {
  display: none !important;
}

.v-cc-qty .quantity {
  display: contents;
}

.v-cc-qty__btn {
  flex: 0 0 2rem;
  width: 2rem;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v-cc-qty__btn:focus-visible {
  outline: 2px solid var(--v-color-ink, #121412);
  outline-offset: 2px;
}

.v-cc-qty__input,
.v-cc-qty .qty {
  flex: 0 0 2.5rem;
  width: 2.5rem !important;
  max-width: 2.5rem;
  min-height: 2.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  font-size: var(--v-text-sm);
  -moz-appearance: textfield;
  appearance: textfield;
}

.v-cc-qty__input::-webkit-outer-spin-button,
.v-cc-qty__input::-webkit-inner-spin-button,
.v-cc-qty .qty::-webkit-outer-spin-button,
.v-cc-qty .qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Cart page
   -------------------------------------------------------------------------- */

.v-cc {
  --v-cc-cart-bg: #f7f5f0;
  --v-cc-summary-bg: #efebe3;
  background: var(--v-cc-cart-bg);
  color: var(--v-color-ink, #121412);
  padding-block: clamp(5.5rem, 10vw, 7.5rem) clamp(3rem, 6vw, 5rem);
}

.v-cc__header {
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.v-cc__title {
  margin: 0;
  font-family: var(--v-font-display, "Cormorant Garamond", Georgia, serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.v-cc__count {
  margin: 0.5rem 0 0;
  font-size: var(--v-text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--v-color-muted, #5c635c);
}

.v-cc__notices {
  margin-bottom: 1.5rem;
}

.v-cc__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

@media (min-width: 900px) {
  .v-cc__layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 22rem);
    gap: clamp(2.5rem, 5vw, 4rem);
  }

  .v-cc__summary-col {
    position: sticky;
    top: calc(var(--v-header-height, 5.5rem) + 1.25rem);
  }
}

.v-cc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(18, 20, 18, 0.12);
}

.v-cc-item {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid rgba(18, 20, 18, 0.12);
}

@media (min-width: 700px) {
  .v-cc-item {
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: 1.35rem;
  }
}

.v-cc-item__media img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: rgba(18, 20, 18, 0.04);
}

.v-cc-item__top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.v-cc-item__title {
  margin: 0;
  font-size: var(--v-text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.v-cc-item__title a {
  color: inherit;
  text-decoration: none;
}

.v-cc-item__price {
  margin: 0;
  font-size: var(--v-text-sm);
  white-space: nowrap;
}

.v-cc-item__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 0.85rem;
}

.v-cc-item__subtotal {
  margin: 0;
  margin-inline-start: auto;
  font-size: var(--v-text-sm);
  font-weight: 500;
}

.v-cc-item__remove {
  font-size: var(--v-text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 0.28em;
  color: var(--v-color-muted, #5c635c);
}

.v-cc-item__remove:hover {
  color: inherit;
}

.v-cc__actions {
  display: none; /* Update happens via qty change + WC cart script; keep button for no-JS. */
}

.v-cc__actions:has(.v-cc__update:focus),
.js-off .v-cc__actions {
  display: block;
  margin-top: 1rem;
}

.v-cc__update {
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border: 0;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(18, 20, 18, 0.35);
  font-size: var(--v-text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

/* Summary */
.v-cc-summary {
  background: var(--v-cc-summary-bg);
  padding: clamp(1.35rem, 3vw, 1.75rem);
}

.v-cc-summary__title {
  margin: 0 0 1.25rem;
  font-family: var(--v-font-display, "Cormorant Garamond", Georgia, serif);
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 400;
}

.v-cc-summary__coupon {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(18, 20, 18, 0.12);
}

.v-cc-summary__coupon-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: var(--v-text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.v-cc-summary__coupon-row {
  display: flex;
  gap: 0.65rem;
}

.v-cc-summary__coupon-row .input-text {
  flex: 1;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid rgba(18, 20, 18, 0.35);
  border-radius: 0;
  background: transparent;
  min-height: 2.75rem;
}

.v-cc-summary__coupon-btn {
  border: 0;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(18, 20, 18, 0.35);
  padding: 0 1rem;
  font-size: var(--v-text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.v-cc-summary__table,
.v-cc-summary .shop_table {
  width: 100%;
  border: 0;
  margin: 0 0 1.25rem;
  border-collapse: collapse;
}

.v-cc-summary__table th,
.v-cc-summary__table td,
.v-cc-summary .shop_table th,
.v-cc-summary .shop_table td {
  border: 0;
  padding: 0.55rem 0;
  background: transparent;
  font-weight: 400;
  font-size: var(--v-text-sm);
  vertical-align: top;
}

.v-cc-summary__table th,
.v-cc-summary .shop_table th {
  text-align: start;
  color: var(--v-color-muted, #5c635c);
}

.v-cc-summary__table td,
.v-cc-summary .shop_table td {
  text-align: end;
}

.v-cc-summary__table .order-total th,
.v-cc-summary__table .order-total td,
.v-cc-summary .shop_table .order-total th,
.v-cc-summary .shop_table .order-total td {
  padding-top: 1rem;
  border-top: 1px solid rgba(18, 20, 18, 0.14);
  font-size: var(--v-text-base);
  font-weight: 500;
}

.v-cc-summary__checkout .checkout-button,
.v-cc-summary__checkout .button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.25rem;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--v-color-ink, #121412);
  color: #f7f5f0;
  font-size: var(--v-text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
}

.v-cc-summary__checkout .checkout-button:hover {
  background: #000;
}

.v-cc-summary__trust {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid rgba(18, 20, 18, 0.12);
  display: grid;
  gap: 0.4rem;
  font-size: var(--v-text-sm);
  color: var(--v-color-muted, #5c635c);
}

/* Empty */
.v-cc-empty {
  max-width: 28rem;
  margin: 0 auto;
  padding-block: clamp(3rem, 8vw, 6rem);
  text-align: center;
}

.v-cc-empty__eyebrow {
  margin: 0 0 0.75rem;
  font-size: var(--v-text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--v-color-muted, #5c635c);
}

.v-cc-empty__title {
  margin: 0 0 0.85rem;
  font-family: var(--v-font-display, "Cormorant Garamond", Georgia, serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
}

.v-cc-empty__text {
  margin: 0 0 1.75rem;
  color: var(--v-color-muted, #5c635c);
}

.v-cc--empty .woocommerce-info,
.v-cc--empty .cart-empty,
body.v-cart-page .wc-empty-cart-message,
body.v-cart-page .hero-section,
body.v-checkout-page .hero-section,
body.v-thankyou-page .hero-section,
body.v-cart-page .ct-page-title-section,
body.v-checkout-page .ct-page-title-section,
body.v-thankyou-page .ct-page-title-section {
  display: none !important;
}

/* Kill default Woo cart table leftovers if any slip through */
.v-cc .shop_table.cart,
.v-cc .woocommerce-cart-form > table {
  display: none;
}

.v-single-product #main-container,
.v-cart-page #main-container,
.v-checkout-page #main-container,
.v-thankyou-page #main-container {
  overflow: visible;
}

@media (prefers-reduced-motion: reduce) {
  .v-minicart * {
    transition: none !important;
  }
}
