/* ==========================================================================
   DPitara WooCommerce styles. Loaded only on shop, product, cart, checkout and account pages.
   WooCommerce's own stylesheets are switched off, so everything the store needs is here.
   ========================================================================== */

.dp-shopwrap { padding-block: clamp(28px, 5vw, 72px) var(--section-y); }

/* ---------- notices and generic WooCommerce buttons ---------- */
.woocommerce-notices-wrapper { margin-bottom: 20px; }
.woocommerce-message, .woocommerce-info, .woocommerce-error {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  margin: 0 0 20px; padding: 16px 20px; background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--copper);
  list-style: none; font-size: .95rem; color: var(--espresso);
}
.woocommerce-error { border-left-color: #B3402A; display: block; }
.woocommerce-error li + li { margin-top: 6px; }
.woocommerce-message .button, .woocommerce-info .button { order: 2; }

.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit, .button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 24px; border: 1px solid var(--espresso);
  border-radius: 2px; background: transparent; color: var(--espresso); font-family: var(--font-ui); font-size: .9rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .button:hover { background: var(--espresso); color: var(--ivory); }
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .single_add_to_cart_button, #place_order, .checkout-button {
  background: var(--copper-deep) !important; border-color: var(--copper-deep) !important; color: var(--white) !important;
}
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .single_add_to_cart_button:hover, #place_order:hover, .checkout-button:hover { background: var(--espresso) !important; border-color: var(--espresso) !important; }
.woocommerce button.button:disabled, .woocommerce button.button.disabled, .single_add_to_cart_button.disabled { opacity: .5; cursor: not-allowed; }

/* ---------- breadcrumbs ---------- */
.dp-crumbs, .woocommerce-breadcrumb { font-size: .82rem; margin-bottom: 18px; }
.dp-crumbs a, .woocommerce-breadcrumb a { color: var(--ink); text-decoration: none; }
.dp-crumbs a:hover { color: var(--copper-deep); text-decoration: underline; }
.dp-crumbs__sep { margin: 0 8px; opacity: .5; }

/* ---------- shop archive ---------- */
.woocommerce-products-header { margin-bottom: clamp(24px, 4vw, 44px); }
.woocommerce-products-header__title, .page-title { font-size: var(--step-3); }
.term-description { max-width: 42em; margin-top: 12px; }
.woocommerce-ordering { margin: 0 0 24px; }
.woocommerce-ordering select { min-height: 44px; padding: 0 36px 0 14px; background: var(--white); border: 1px solid rgba(43, 37, 35, .35); border-radius: 2px; }
.woocommerce-pagination { margin-top: 56px; }
.woocommerce-pagination ul, .navigation .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.woocommerce-pagination .page-numbers, .navigation .page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--line); color: var(--espresso); text-decoration: none; border-radius: 2px; }
.woocommerce-pagination .page-numbers.current, .navigation .page-numbers.current, .woocommerce-pagination .page-numbers:hover { background: var(--espresso); border-color: var(--espresso); color: var(--ivory); }
.woocommerce-no-products-found { padding: 40px 0; }

/* ---------- product page ---------- */
.dp-pdp__grid { display: grid; gap: 36px; }
@media (min-width: 900px) {
  .dp-pdp__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
  .dp-pdp__media { position: sticky; top: calc(var(--header-h) + 24px); }
}

.dp-gal { position: relative; }
.dp-gal__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 999px 999px 0 0; background: var(--paper); overscroll-behavior-x: contain; }
.dp-gal__track::-webkit-scrollbar { display: none; }
.dp-gal__slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 5; }
.dp-gal__img { width: 100%; height: 100%; object-fit: cover; }
.dp-gal__thumbs { display: flex; gap: 10px; margin-top: 14px; overflow-x: auto; padding-bottom: 4px; }
.dp-gal__thumb { flex: none; width: 64px; aspect-ratio: 4 / 5; padding: 0; border: 1px solid transparent; border-radius: 999px 999px 0 0; overflow: hidden; background: var(--paper); opacity: .65; transition: opacity .2s, border-color .2s; }
.dp-gal__thumb img { width: 100%; height: 100%; object-fit: cover; }
.dp-gal__thumb.is-active, .dp-gal__thumb:hover { opacity: 1; border-color: var(--copper-deep); }
.dp-gal__3d { width: 100%; margin-top: 14px; background: var(--espresso); color: var(--champagne); }
.dp-gal__3d:hover { background: var(--copper-deep); color: var(--white); }
.dp-gal__model { position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 4 / 5; background: radial-gradient(120% 90% at 50% 20%, #55433a, var(--espresso)); border-radius: 999px 999px 0 0; overflow: hidden; z-index: 3; }
.dp-gal__model[hidden] { display: none; }
.dp-gal__mv { width: 100%; height: 100%; --poster-color: transparent; }
.dp-gal__modelclose { position: absolute; right: 12px; top: 12px; z-index: 2; background: rgba(250, 247, 242, .9); }

.dp-pdp__title { font-size: var(--step-3); margin-bottom: 10px; }
.dp-pdp__rating { display: flex; align-items: center; gap: 10px; font-size: .88rem; margin-bottom: 10px; }
.dp-pdp__price { font-size: 1.6rem; font-weight: 600; color: var(--espresso); margin-bottom: 18px; }
.dp-pdp__price del, .woocommerce-variation-price del { opacity: .5; font-weight: 400; font-size: 1.1rem; margin-right: 8px; }
.dp-pdp__price ins, .woocommerce-variation-price ins { text-decoration: none; }
.dp-pdp__short { margin-bottom: 24px; }
.dp-pdp__buy { margin-bottom: 18px; }
.dp-pdp__buy p.stock { margin: 0 0 12px; font-weight: 600; }
.dp-pdp__buy p.out-of-stock { color: #B3402A; }

form.cart { margin: 0; }
form.cart:not(.variations_form), .woocommerce-variation-add-to-cart { display: flex; gap: 12px; align-items: stretch; }
form.cart .single_add_to_cart_button { flex: 1; min-height: 52px; font-size: .95rem; }
.quantity .qty { width: 72px; min-height: 52px; text-align: center; background: var(--white); border: 1px solid rgba(43, 37, 35, .35); border-radius: 2px; font-weight: 600; }
.quantity .qty:focus-visible { outline-offset: 2px; }

table.variations { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
table.variations tr { display: block; margin-bottom: 14px; }
table.variations th, table.variations td { display: block; padding: 0; text-align: left; }
table.variations label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--espresso); font-size: .92rem; }
table.variations select { width: 100%; min-height: 48px; padding: 0 14px; background: var(--white); border: 1px solid rgba(43, 37, 35, .35); border-radius: 2px; }
.reset_variations { display: inline-block; margin-top: 8px; font-size: .84rem; }
.woocommerce-variation-price { font-size: 1.3rem; font-weight: 600; color: var(--espresso); margin-bottom: 12px; }
.woocommerce-variation-availability { margin-bottom: 8px; }

.dp-nudge { margin: 0 0 22px; padding: 10px 14px; border-left: 2px solid var(--copper); background: var(--white); font-size: .88rem; color: var(--espresso); }

.dp-pin { margin: 0 0 22px; padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: 2px; }
.dp-pin__label { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 600; font-size: .92rem; color: var(--espresso); }
.dp-pin__row { display: flex; gap: 10px; }
.dp-pin__row .dp-input { flex: 1; min-height: 44px; }
.dp-pin__row .dp-btn { min-height: 44px; }
.dp-pin__result { margin: 10px 0 0; min-height: 1.4em; font-size: .88rem; }
.dp-pin__result.is-ok { color: #2F6B45; }
.dp-pin__result.is-error { color: #A83A25; }

.dp-pdp__assure { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 0 0 26px; padding: 18px 0; border-block: 1px solid var(--line); font-size: .88rem; }
.dp-pdp__assure li { display: inline-flex; align-items: center; gap: 8px; color: var(--espresso); }
.dp-pdp__assure .dp-icon { color: var(--copper-deep); }

.dp-acc { margin-bottom: 20px; }
.dp-acc__item { border-bottom: 1px solid var(--line); }
.dp-acc__item .dp-prose { padding-bottom: 20px; font-size: .95rem; }
.dp-pdp__meta { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: .82rem; opacity: .9; }

.dp-pdp__reviews { margin-top: clamp(56px, 8vw, 110px); padding-top: clamp(32px, 5vw, 56px); border-top: 1px solid var(--line); max-width: 52rem; }
.related.products, .upsells.products { margin-top: clamp(64px, 9vw, 120px); }
.related.products > h2, .upsells.products > h2 { font-size: var(--step-3); margin-bottom: clamp(24px, 4vw, 44px); }

/* Mobile add-to-cart bar */
.dp-sticky { position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; background: var(--ivory); border-top: 1px solid var(--line); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .3s var(--ease); }
.dp-sticky.is-visible { transform: none; }
.dp-sticky__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dp-sticky__info { min-width: 0; }
.dp-sticky__name { margin: 0; font-family: var(--font-display); font-size: 1.05rem; line-height: 1.2; color: var(--espresso); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-sticky__price { margin: 0; font-weight: 600; font-size: .92rem; color: var(--espresso); }
.dp-sticky__price del { display: none; }
.dp-sticky__price ins { text-decoration: none; }
.dp-sticky .dp-btn { flex: none; }
@media (min-width: 900px) { .dp-sticky { display: none; } }

/* ---------- ratings and review form ---------- */
.star-rating { position: relative; display: inline-block; height: 1.1em; width: 5.4em; overflow: hidden; font-size: 1rem; line-height: 1.1; letter-spacing: 0; }
.star-rating::before { content: '\2605\2605\2605\2605\2605'; position: absolute; left: 0; top: 0; color: #D9CCBB; }
.star-rating span { position: absolute; left: 0; top: 0; overflow: hidden; padding-top: 2em; height: 0; }
.star-rating span::before { content: '\2605\2605\2605\2605\2605'; position: absolute; left: 0; top: 0; color: var(--copper); }

#reviews h2, .woocommerce-Reviews-title { font-size: var(--step-2); margin-bottom: 20px; }
.commentlist { display: grid; gap: 28px; margin-bottom: 40px; }
.commentlist .comment_container { display: grid; grid-template-columns: 48px 1fr; gap: 16px; }
.commentlist img.avatar { border-radius: 50%; }
.commentlist .meta { margin: 6px 0; font-size: .88rem; }
.commentlist .description p { margin: 0; }
.comment-form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; color: var(--espresso); }
.comment-form textarea { width: 100%; min-height: 120px; padding: 12px 14px; background: var(--white); border: 1px solid rgba(43, 37, 35, .35); border-radius: 2px; }
.comment-form input[type="text"], .comment-form input[type="email"] { width: 100%; min-height: 48px; padding: 0 14px; background: var(--white); border: 1px solid rgba(43, 37, 35, .35); border-radius: 2px; }
.comment-form p { margin-bottom: 18px; }
p.stars { margin: 0; line-height: 1; }
p.stars span { display: inline-flex; gap: 2px; }
p.stars a { position: relative; display: inline-block; width: 1.5em; height: 1.5em; overflow: hidden; text-indent: -999px; font-size: 1.4rem; }
p.stars a::before { content: '\2605'; position: absolute; left: 0; top: 0; text-indent: 0; line-height: 1.5em; color: #D9CCBB; }
p.stars:hover a::before { color: var(--copper); }
p.stars a:hover ~ a::before { color: #D9CCBB; }
p.stars.selected a.active::before, p.stars.selected a:not(.active)::before { color: var(--copper); }
p.stars.selected a.active ~ a::before { color: #D9CCBB; }

/* ---------- forms shared by cart, checkout and account ---------- */
.woocommerce form .form-row { margin: 0 0 18px; padding: 0; }
.woocommerce form .form-row label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .9rem; color: var(--espresso); }
.woocommerce form .form-row .required { color: #A83A25; text-decoration: none; }
.woocommerce form .form-row .optional { font-weight: 400; opacity: .8; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select, .woocommerce-input-wrapper select,
.select2-container--default .select2-selection--single {
  width: 100%; min-height: 48px; padding: 0 14px; background: var(--white); border: 1px solid rgba(43, 37, 35, .35); border-radius: 2px; color: var(--espresso);
}
.woocommerce form .form-row textarea { padding: 12px 14px; min-height: 100px; }
.select2-container--default .select2-selection--single { display: flex; align-items: center; }
.select2-container--default .select2-selection--single .select2-selection__rendered { padding: 0; line-height: 1.4; color: var(--espresso); }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 46px; }
.woocommerce form .form-row.woocommerce-invalid input.input-text, .woocommerce form .form-row.woocommerce-invalid select { border-color: #B3402A; }
.woocommerce form .form-row.woocommerce-validated input.input-text { border-color: rgba(43, 37, 35, .35); }
.woocommerce-form__label-for-checkbox { display: flex !important; align-items: flex-start; gap: 10px; font-weight: 400 !important; }
.woocommerce-form__label-for-checkbox input { margin-top: 5px; accent-color: var(--copper-deep); }
@media (min-width: 640px) {
  .woocommerce form .form-row-first, .woocommerce form .form-row-last { width: calc(50% - 8px); float: left; }
  .woocommerce form .form-row-last { float: right; }
  .woocommerce form .form-row-wide, .woocommerce form .form-row-first + .form-row-last + .form-row { clear: both; }
}

/* ---------- cart page ---------- */
.woocommerce-cart-form { margin-bottom: 40px; }
table.shop_table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); }
table.shop_table th, table.shop_table td { padding: 16px 18px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
table.shop_table thead th { font-size: .82rem; font-weight: 600; background: var(--paper); color: var(--espresso); }
table.shop_table .product-thumbnail img { width: 72px; border-radius: 999px 999px 0 0; }
table.shop_table .product-name a { font-family: var(--font-display); font-size: 1.2rem; color: var(--espresso); text-decoration: none; }
table.shop_table a.remove { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); text-decoration: none; font-size: 1.1rem; line-height: 1; }
table.shop_table a.remove:hover { background: var(--espresso); border-color: var(--espresso); color: var(--ivory); }
table.shop_table .actions { background: var(--paper); }
table.shop_table .coupon { display: flex; flex-wrap: wrap; gap: 10px; float: left; }
table.shop_table .coupon input.input-text { min-height: 46px; padding: 0 14px; border: 1px solid rgba(43, 37, 35, .35); background: var(--white); border-radius: 2px; }
table.shop_table .actions > button { float: right; }
.cart-collaterals { display: flex; justify-content: flex-end; }
.cart_totals { width: min(100%, 460px); }
.cart_totals h2 { font-size: var(--step-2); margin-bottom: 16px; }
.cart_totals .shop_table th { width: 40%; }
.wc-proceed-to-checkout { margin-top: 20px; }
.wc-proceed-to-checkout .checkout-button { display: flex; width: 100%; min-height: 54px; }
@media (max-width: 720px) {
  table.shop_table_responsive thead { display: none; }
  table.shop_table_responsive tr { display: block; border-bottom: 1px solid var(--line); }
  table.shop_table_responsive td { display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 0; padding: 10px 16px; text-align: right; }
  table.shop_table_responsive td::before { content: attr(data-title); font-weight: 600; text-align: left; color: var(--espresso); }
  table.shop_table_responsive td.product-remove::before, table.shop_table_responsive td.actions::before, table.shop_table_responsive td.product-thumbnail::before { content: none; }
  table.shop_table .coupon, table.shop_table .actions > button { float: none; width: 100%; }
  table.shop_table .coupon input.input-text { flex: 1; }
  table.shop_table td.actions { display: block; }
}

/* ---------- checkout ---------- */
form.woocommerce-checkout { display: grid; gap: 40px; }
form.woocommerce-checkout h3, #order_review_heading { font-size: var(--step-2); margin-bottom: 18px; }
.woocommerce-billing-fields__field-wrapper::after, .woocommerce-shipping-fields__field-wrapper::after { content: ''; display: table; clear: both; }
#ship-to-different-address label { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.3rem; font-weight: 400; }
#order_review { padding: 24px; background: var(--white); border: 1px solid var(--line); }
#order_review table.shop_table { border: 0; }
#order_review table.shop_table th, #order_review table.shop_table td { padding: 12px 0; }
#order_review .order-total th, #order_review .order-total td { font-size: 1.15rem; font-weight: 700; color: var(--espresso); }
#order_review .fee th, #order_review .fee td { color: var(--copper-deep); font-weight: 600; }
.woocommerce-checkout-review-order-table .product-name { font-weight: 500; }
#payment { margin-top: 8px; }
#payment ul.payment_methods { display: grid; gap: 10px; margin-bottom: 20px; }
#payment ul.payment_methods > li { padding: 14px 16px; border: 1px solid var(--line); border-radius: 2px; }
#payment ul.payment_methods > li:has(input:checked) { border-color: var(--copper-deep); background: var(--ivory); }
#payment ul.payment_methods label { display: inline; font-weight: 600; color: var(--espresso); cursor: pointer; }
#payment ul.payment_methods input[type="radio"] { accent-color: var(--copper-deep); margin-right: 10px; }
#payment .payment_box { margin-top: 10px; padding: 12px 14px; background: var(--paper); font-size: .88rem; border-radius: 2px; }
#payment .payment_box p:last-child { margin-bottom: 0; }
#payment .payment_box::before { display: none; }
#place_order { width: 100%; min-height: 56px; font-size: 1rem; }
.woocommerce-privacy-policy-text { font-size: .82rem; margin-bottom: 14px; }
.woocommerce-terms-and-conditions-wrapper { margin-bottom: 14px; }
@media (min-width: 960px) {
  form.woocommerce-checkout { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); grid-template-rows: auto 1fr; column-gap: clamp(40px, 6vw, 88px); row-gap: 0; align-items: start; }
  #order_review_heading { grid-column: 2; grid-row: 1; margin-bottom: 18px; }
  #customer_details { grid-column: 1; grid-row: 1 / span 2; }
  #order_review { grid-column: 2; grid-row: 2; position: sticky; top: calc(var(--header-h) + 20px); }
}
.woocommerce-form-coupon-toggle, .woocommerce-form-login-toggle { margin-bottom: 8px; }
.woocommerce-form-coupon { display: block; margin-bottom: 28px; padding: 20px; background: var(--white); border: 1px solid var(--line); }
.woocommerce-form-coupon .form-row-first, .woocommerce-form-coupon .form-row-last { width: auto; float: none; }

.woocommerce-order-received .woocommerce-order { max-width: 52rem; }
.woocommerce-thankyou-order-received { padding: 20px 24px; background: var(--white); border-left: 3px solid var(--copper); font-family: var(--font-display); font-size: 1.5rem; color: var(--espresso); margin-bottom: 28px; }
ul.woocommerce-order-overview { display: grid; gap: 14px 32px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 32px; padding: 20px 0; border-block: 1px solid var(--line); font-size: .88rem; }
ul.woocommerce-order-overview li strong { display: block; font-size: 1rem; color: var(--espresso); }

/* ---------- account ---------- */
.woocommerce-account .woocommerce { display: grid; gap: 32px; }
.woocommerce-MyAccount-navigation ul { display: flex; flex-wrap: wrap; gap: 6px 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.woocommerce-MyAccount-navigation a { color: var(--ink); text-decoration: none; font-weight: 500; }
.woocommerce-MyAccount-navigation .is-active a, .woocommerce-MyAccount-navigation a:hover { color: var(--copper-deep); text-decoration: underline; text-underline-offset: 8px; }
@media (min-width: 900px) {
  .woocommerce-account .woocommerce { grid-template-columns: 220px minmax(0, 1fr); gap: 56px; }
  .woocommerce-MyAccount-navigation ul { flex-direction: column; border: 0; }
}
.woocommerce-account:not(.logged-in) .woocommerce { display: block; }
.woocommerce-form-login, .woocommerce-form-register { max-width: 30rem; padding: 28px; background: var(--white); border: 1px solid var(--line); }
.u-columns { display: grid; gap: 32px; }
@media (min-width: 800px) { .u-columns { grid-template-columns: 1fr 1fr; } }
.woocommerce-Address { margin-bottom: 24px; }
.woocommerce-Address-title h3 { font-size: 1.4rem; }
