/*
 * Craft Giclée Site System v0.2.0 — Core
 * Clean module rewrite of the approved Woo Journey 1.9.0 Core behavior.
 * Presentation only. No commerce or artwork-processing logic.
 *
 * IMPORTANT: every rule is scoped beneath body.cgss-core-active. During
 * Admin Preview this gives the candidate authority over the properties it
 * owns even while the legacy snippet remains active for customers.
 */

/* ==========================================================
   SHARED COMMERCE DESIGN TOKENS + CANVAS
   ========================================================== */
body.cgss-core-active:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-order-received,.woocommerce-account),
body.cgss-core-active:has(.wd-wishlist-content){
  --cg-ink:#302D2A;
  --cg-text:#4B4641;
  --cg-muted:#716B64;
  --cg-red:#68000A;
  --cg-red-dark:#500007;
  --cg-red-soft:#8A3A40;
  --cg-slate:#596A73;
  --cg-slate-dark:#485860;
  --cg-slate-soft:#EEF2F3;
  --cg-sage:#697869;
  --cg-ochre:#AE8447;
  --cg-sienna:#A4664D;
  --cg-parchment:#F7F1E9;
  --cg-parchment-deep:#EEE5DA;
  --cg-cream:#FFFDF9;
  --cg-line:#D8CCC0;
  --cg-line-soft:#E9E1D9;
  --cg-danger:#8A3A40;
  --cg-radius:4px;
  --cg-radius-sm:3px;
  --cg-shadow-1:0 5px 16px rgba(55,46,40,.065),0 1px 2px rgba(55,46,40,.035);
  --cg-shadow-2:0 9px 24px rgba(55,46,40,.085),0 2px 5px rgba(55,46,40,.045);
  --cg-shadow-hover:0 12px 28px rgba(55,46,40,.11),0 3px 7px rgba(55,46,40,.05);
  --cg-motion:180ms cubic-bezier(.2,.7,.2,1);
  --cg-space-1:6px;
  --cg-space-2:10px;
  --cg-space-3:14px;
  --cg-space-4:18px;
  --cg-space-5:24px;
  color:var(--cg-text);
}

body.cgss-core-active:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-order-received,.woocommerce-account) .main-page-wrapper,
body.cgss-core-active:has(.wd-wishlist-content) .main-page-wrapper{
  background:
    radial-gradient(circle at 7% 12%,rgba(164,102,77,.075) 0 72px,transparent 73px),
    radial-gradient(circle at 92% 8%,rgba(174,132,71,.065) 0 105px,transparent 106px),
    radial-gradient(circle at 88% 64%,rgba(105,120,105,.045) 0 88px,transparent 89px),
    linear-gradient(180deg,#F6F0E8 0,#FBF8F4 250px,#FFFDF9 620px,#FFFFFF 100%) !important;
}

body.cgss-core-active:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-order-received,.woocommerce-account) .wd-content-area.site-content,
body.cgss-core-active:has(.wd-wishlist-content) .wd-content-area.site-content{
  padding-top:26px !important;
  padding-bottom:38px !important;
}

/* ==========================================================
   SHARED WOOCOMMERCE TYPOGRAPHY + CONTROLS
   ========================================================== */
body.cgss-core-active:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-order-received,.woocommerce-account) .woocommerce,
body.cgss-core-active:has(.wd-wishlist-content) .woocommerce{
  color:var(--cg-text);
  font-size:14px;
  line-height:1.5;
}

body.cgss-core-active:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-order-received,.woocommerce-account) .woocommerce :is(h1,h2,h3),
body.cgss-core-active:has(.wd-wishlist-content) .woocommerce :is(h1,h2,h3){
  color:var(--cg-ink);
  font-family:var(--e-global-typography-primary-font-family,"Poppins",Arial,sans-serif);
  letter-spacing:-.015em;
  line-height:1.2;
}

body.cgss-core-active:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-order-received,.woocommerce-account) .woocommerce a:not(.button),
body.cgss-core-active:has(.wd-wishlist-content) .woocommerce a:not(.button){
  color:var(--cg-red);
  text-underline-offset:3px;
}

body.cgss-core-active:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-order-received,.woocommerce-account) .woocommerce .button,
body.cgss-core-active:has(.wd-wishlist-content) .button{
  min-height:40px;
  padding:8px 15px;
  border-radius:var(--cg-radius-sm) !important;
  font-family:var(--e-global-typography-primary-font-family,"Poppins",Arial,sans-serif);
  font-size:12px;
  font-weight:700;
  letter-spacing:.025em;
  line-height:1.2;
  box-shadow:none !important;
  transition:background-color var(--cg-motion),border-color var(--cg-motion),color var(--cg-motion),transform var(--cg-motion),box-shadow var(--cg-motion);
}

body.cgss-core-active.woocommerce-cart .woocommerce .button:not(.checkout-button),
body.cgss-core-active.woocommerce-checkout .woocommerce .button:not(#place_order),
body.cgss-core-active.woocommerce-order-received .woocommerce .button,
body.cgss-core-active.woocommerce-account .woocommerce .button,
body.cgss-core-active:has(.wd-wishlist-content) .button{
  background:var(--cg-slate) !important;
  border:1px solid var(--cg-slate) !important;
  color:#FFFFFF !important;
}

body.cgss-core-active.woocommerce-cart .woocommerce .checkout-button,
body.cgss-core-active.woocommerce-checkout .woocommerce #place_order,
body.cgss-core-active.woocommerce-account .woocommerce button[name="save_account_details"],
body.cgss-core-active.woocommerce-account .woocommerce button[name="save_address"],
body.cgss-core-active.woocommerce-account:not(.logged-in) .woocommerce-form-login button[type="submit"],
body.cgss-core-active.woocommerce-account:not(.logged-in) .woocommerce-form-register button[type="submit"],
body.cgss-core-active:has(.wd-wishlist-content) .button.alt{
  background:var(--cg-red) !important;
  border:1px solid var(--cg-red) !important;
  color:#FFFFFF !important;
}

body.cgss-core-active.woocommerce-cart .woocommerce .checkout-button:hover,
body.cgss-core-active.woocommerce-checkout .woocommerce #place_order:hover,
body.cgss-core-active.woocommerce-account .woocommerce button[name="save_account_details"]:hover,
body.cgss-core-active.woocommerce-account .woocommerce button[name="save_address"]:hover,
body.cgss-core-active.woocommerce-account:not(.logged-in) .woocommerce-form-login button[type="submit"]:hover,
body.cgss-core-active.woocommerce-account:not(.logged-in) .woocommerce-form-register button[type="submit"]:hover,
body.cgss-core-active:has(.wd-wishlist-content) .button.alt:hover{
  background:var(--cg-red-dark) !important;
  border-color:var(--cg-red-dark) !important;
}

body.cgss-core-active:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .woocommerce :is(input[type="text"],input[type="email"],input[type="tel"],input[type="password"],input[type="number"],select,textarea){
  min-height:41px;
  padding-left:11px;
  padding-right:11px;
  border:1px solid #CFC4B9 !important;
  border-radius:var(--cg-radius-sm) !important;
  background:#FFFFFF !important;
  color:var(--cg-ink) !important;
  box-shadow:none !important;
  transition:border-color var(--cg-motion),box-shadow var(--cg-motion),background-color var(--cg-motion);
}

body.cgss-core-active:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .woocommerce :is(input,select,textarea):focus{
  border-color:var(--cg-slate) !important;
  box-shadow:0 0 0 3px rgba(89,106,115,.10) !important;
  outline:none !important;
}

/* ==========================================================
   SHARED SURFACE LANGUAGE ONLY — NEVER ROUTE GEOMETRY
   These selectors add radius/depth, not widths/grids/columns.
   ========================================================== */
body.cgss-core-active.woocommerce-cart :is(.shop_table.cart,.cart_totals .cart-totals-inner),
body.cgss-core-active.woocommerce-checkout :is(.checkout-order-review,.customer-details .woocommerce-billing-fields,.customer-details .woocommerce-shipping-fields,.woocommerce-additional-fields,#payment),
body.cgss-core-active.woocommerce-order-received :is(.woocommerce-thankyou-order-received,.woocommerce-order-overview,.woocommerce-order-details .shop_table,.woocommerce-customer-details address),
body.cgss-core-active.woocommerce-account :is(.woocommerce-MyAccount-navigation,.woocommerce-MyAccount-content,.woocommerce-Addresses .woocommerce-Address,.woocommerce-form-login,.woocommerce-form-register,.lost_reset_password),
body.cgss-core-active:has(.wd-wishlist-content) :is(.wd-wishlist-content,.woocommerce-MyAccount-navigation){
  border-radius:var(--cg-radius) !important;
  box-shadow:var(--cg-shadow-1) !important;
  transition:transform var(--cg-motion),box-shadow var(--cg-motion),border-color var(--cg-motion);
}

@media (hover:hover) and (pointer:fine){
  body.cgss-core-active.woocommerce-cart :is(.shop_table.cart,.cart_totals .cart-totals-inner):hover,
  body.cgss-core-active.woocommerce-checkout :is(.checkout-order-review,.customer-details .woocommerce-billing-fields,.customer-details .woocommerce-shipping-fields,.woocommerce-additional-fields):hover,
  body.cgss-core-active.woocommerce-order-received :is(.woocommerce-order-overview,.woocommerce-order-details .shop_table,.woocommerce-customer-details address):hover,
  body.cgss-core-active.woocommerce-account :is(.woocommerce-MyAccount-content,.woocommerce-Addresses .woocommerce-Address):hover,
  body.cgss-core-active:has(.wd-wishlist-content) .wd-wishlist-content:hover{
    transform:translateY(-2px);
    box-shadow:var(--cg-shadow-hover) !important;
  }
}

/* ==========================================================
   SHARED PAGE CANVAS RESPONSIVENESS
   Route grids/columns remain owned by their future modules.
   ========================================================== */
@media (max-width:1024px){
  body.cgss-core-active:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-order-received,.woocommerce-account) .wd-content-area.site-content,
  body.cgss-core-active:has(.wd-wishlist-content) .wd-content-area.site-content{
    padding-top:20px !important;
    padding-bottom:28px !important;
    padding-left:14px !important;
    padding-right:14px !important;
  }
}

@media (max-width:600px){
  body.cgss-core-active:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-order-received,.woocommerce-account) .wd-content-area.site-content,
  body.cgss-core-active:has(.wd-wishlist-content) .wd-content-area.site-content{
    padding-top:14px !important;
    padding-bottom:22px !important;
    padding-left:10px !important;
    padding-right:10px !important;
  }
  body.cgss-core-active:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-order-received,.woocommerce-account) .woocommerce,
  body.cgss-core-active:has(.wd-wishlist-content) .woocommerce{
    font-size:13.5px;
  }
  body.cgss-core-active:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-order-received,.woocommerce-account) .woocommerce .button,
  body.cgss-core-active:has(.wd-wishlist-content) .button{
    min-height:40px;
    padding:8px 12px;
  }
}

@media (max-height:520px) and (orientation:landscape){
  body.cgss-core-active:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-order-received,.woocommerce-account) .wd-content-area.site-content,
  body.cgss-core-active:has(.wd-wishlist-content) .wd-content-area.site-content{
    padding-top:10px !important;
    padding-bottom:16px !important;
  }
}

@media (prefers-reduced-motion:reduce){
  body.cgss-core-active:is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-order-received,.woocommerce-account) *,
  body.cgss-core-active:has(.wd-wishlist-content) *,
  body.cgss-core-active .cart-widget-side *,
  body.cgss-core-active .wd-header-my-account .wd-dropdown *{
    scroll-behavior:auto !important;
    transition-duration:.01ms !important;
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
  }
}

/* ==========================================================
   GLOBAL WOODMART MINI-CART
   ========================================================== */
body.cgss-core-active :is(.cart-widget-side,.wd-side-hidden.cart-widget-side){
  background:var(--cg-cream,#FFFDF9) !important;
  color:var(--cg-text,#4B4641) !important;
  border-left:1px solid var(--cg-line,#D8CCC0) !important;
  box-shadow:-12px 0 30px rgba(55,46,40,.14) !important;
}
body.cgss-core-active .cart-widget-side :is(.wd-heading,.widget-heading){
  padding:15px 18px !important;
  background:#F2EEE9 !important;
  border-bottom:1px solid var(--cg-line,#D8CCC0) !important;
}
body.cgss-core-active .cart-widget-side .wd-heading :is(.title,h3),
body.cgss-core-active .cart-widget-side .widget-heading .title{
  color:var(--cg-ink,#302D2A) !important;
}
body.cgss-core-active .cart-widget-side .woocommerce-mini-cart-item{
  padding-top:13px !important;
  padding-bottom:13px !important;
  border-bottom:1px solid #E9E1D9 !important;
  background:#FFFDF9 !important;
}
body.cgss-core-active .cart-widget-side :is(.cart-info > a:not(.remove),.cart-info .product-title,.mini_cart_item > a:not(.remove)){
  color:#302D2A !important;
  font-weight:700 !important;
}
body.cgss-core-active .cart-widget-side :is(.variation,dl.variation){
  margin-top:6px !important;
  padding-top:6px !important;
  border-top:1px solid #ECE5DE !important;
  color:#4B4641 !important;
}
body.cgss-core-active .cart-widget-side .variation dt{
  color:#596A73 !important;
  font-weight:700 !important;
}
body.cgss-core-active .cart-widget-side .shopping-cart-widget-footer{
  padding:14px 16px 16px !important;
  background:#F7F1EA !important;
  border-top:1px solid #D8CCC0 !important;
}
body.cgss-core-active .cart-widget-side .woocommerce-mini-cart__total{
  padding:0 0 11px !important;
  background:transparent !important;
  border:0 !important;
  color:#302D2A !important;
}
body.cgss-core-active .cart-widget-side .woocommerce-mini-cart__total .amount{
  color:#68000A !important;
  font-size:18px !important;
  font-weight:800 !important;
}
body.cgss-core-active .cart-widget-side .woocommerce-mini-cart__buttons{gap:7px !important;}
body.cgss-core-active .cart-widget-side .woocommerce-mini-cart__buttons .button{
  min-height:40px !important;
  border-radius:3px !important;
  font-size:11.5px !important;
  font-weight:700 !important;
}
body.cgss-core-active .cart-widget-side .woocommerce-mini-cart__buttons .button:not(.checkout){
  background:#596A73 !important;
  border-color:#596A73 !important;
  color:#FFFFFF !important;
}
body.cgss-core-active .cart-widget-side .woocommerce-mini-cart__buttons .checkout{
  background:#68000A !important;
  border-color:#68000A !important;
  color:#FFFFFF !important;
}

/* ==========================================================
   GLOBAL WOODMART HEADER ACCOUNT DROPDOWN
   This is header-component geometry, not My Account route geometry.
   ========================================================== */
body.cgss-core-active .wd-header-my-account .wd-dropdown-my-account,
body.cgss-core-active .wd-header-my-account > .wd-dropdown,
body.cgss-core-active .wd-header-my-account .wd-dropdown{
  width:min(360px,calc(100vw - 24px)) !important;
  min-width:320px !important;
  padding:15px !important;
  border:1px solid #D8CCC0 !important;
  border-radius:4px !important;
  background:#FFFDF9 !important;
  color:#4B4641 !important;
  box-shadow:0 13px 32px rgba(55,46,40,.14) !important;
}
body.cgss-core-active .wd-header-my-account .wd-dropdown-my-account *{box-sizing:border-box;}
body.cgss-core-active .wd-header-my-account .wd-dropdown-my-account :is(h3,.title,.login-form-side h3){
  margin:0 0 9px !important;
  color:#302D2A !important;
  font-family:var(--e-global-typography-primary-font-family,"Poppins",Arial,sans-serif) !important;
  font-size:14px !important;
  font-weight:700 !important;
}
body.cgss-core-active .wd-header-my-account .wd-dropdown-my-account .form-row{margin-bottom:9px !important;}
body.cgss-core-active .wd-header-my-account .wd-dropdown-my-account :is(input[type="text"],input[type="email"],input[type="password"]){
  min-height:40px !important;
  border:1px solid #CFC4B9 !important;
  border-radius:3px !important;
  background:#FFFFFF !important;
}
body.cgss-core-active .wd-header-my-account .wd-dropdown-my-account button[type="submit"]{
  width:100% !important;
  min-height:40px !important;
  border:1px solid #68000A !important;
  border-radius:3px !important;
  background:#68000A !important;
  color:#FFFFFF !important;
  font-weight:700 !important;
}
body.cgss-core-active .wd-header-my-account .wd-dropdown-my-account .login-form-footer{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:8px !important;
  margin-top:8px !important;
  font-size:12px !important;
}
body.cgss-core-active .wd-header-my-account .wd-dropdown-my-account .create-account-question{
  margin:12px -15px -15px !important;
  padding:12px 15px !important;
  border-top:1px solid #E9E1D9 !important;
  background:#F7F1EA !important;
}
body.cgss-core-active .wd-header-my-account .wd-dropdown-my-account :is(.woocommerce-MyAccount-navigation ul,.wd-sub-menu,ul){
  margin:0 !important;
  padding:0 !important;
  list-style:none !important;
}
body.cgss-core-active .wd-header-my-account .wd-dropdown-my-account :is(.woocommerce-MyAccount-navigation li,.wd-sub-menu > li){
  margin:0 !important;
  padding:0 !important;
  border-bottom:1px solid #ECE5DE !important;
}
body.cgss-core-active .wd-header-my-account .wd-dropdown-my-account :is(.woocommerce-MyAccount-navigation a,.wd-sub-menu > li > a){
  display:flex !important;
  align-items:center !important;
  min-height:38px !important;
  padding:8px 9px !important;
  border-left:3px solid transparent !important;
  border-radius:2px !important;
  color:#4B4641 !important;
  font-size:12.5px !important;
  font-weight:700 !important;
  text-decoration:none !important;
}
body.cgss-core-active .wd-header-my-account .wd-dropdown-my-account :is(.woocommerce-MyAccount-navigation a,.wd-sub-menu > li > a):hover{
  border-left-color:#81919A !important;
  background:#F4F7F7 !important;
  color:#302D2A !important;
}
body.cgss-core-active .wd-header-my-account .wd-dropdown-my-account a[href*="customer-logout"]{
  margin-top:5px !important;
  border-top:1px solid #D8CCC0 !important;
  color:#68000A !important;
}

@media (max-width:480px){
  body.cgss-core-active .wd-header-my-account .wd-dropdown-my-account,
body.cgss-core-active .wd-header-my-account > .wd-dropdown,
body.cgss-core-active .wd-header-my-account .wd-dropdown{
    width:calc(100vw - 18px) !important;
    min-width:0 !important;
    padding:12px !important;
  }
  body.cgss-core-active .wd-header-my-account .wd-dropdown-my-account .create-account-question{
    margin:10px -12px -12px !important;
    padding:11px 12px !important;
  }
  body.cgss-core-active .wd-header-my-account .wd-dropdown-my-account .login-form-footer{
    align-items:flex-start !important;
    flex-direction:column !important;
    gap:6px !important;
  }
}
