#hg-commerce.hg-commerce {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    padding: calc(var(--hg-header-height) + 72px) 0 96px;
    background:
        radial-gradient(circle at 82% 12%, rgba(243, 220, 107, .18), transparent 29%),
        linear-gradient(145deg, #30353d 0%, #393e46 54%, #2a2f36 100%);
    color: #f4f0e8;
}

#hg-commerce .hg-commerce__ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent 0 9%, rgba(243,220,107,.045) 9.1% 9.2%, transparent 9.3% 90%, rgba(243,220,107,.045) 90.1% 90.2%, transparent 90.3%),
        radial-gradient(ellipse at 50% 100%, rgba(198,161,69,.12), transparent 55%);
}

#hg-commerce .hg-commerce__shell { position: relative; z-index: 1; }

#hg-commerce .hg-commerce__header {
    max-width: 880px;
    margin: 0 auto 42px;
    text-align: center;
}

#hg-commerce .hg-commerce__header > p {
    margin: 0 0 13px;
    color: #f3dc6b;
    font-family: var(--hg-font-ui);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .31em;
}

#hg-commerce .hg-commerce__header h1 {
    margin: 0;
    color: #f4f0e8;
    font-family: var(--hg-font-heading);
    font-size: clamp(2.5rem, 5vw, 5rem);
    font-weight: 400;
    line-height: 1.02;
}

#hg-commerce .hg-commerce__header > span {
    display: block;
    max-width: 660px;
    margin: 18px auto 0;
    color: rgba(244,240,232,.76);
    line-height: 1.75;
}

#hg-commerce .hg-commerce__content {
    max-width: 1180px;
    margin: 0 auto;
}

#hg-commerce .woocommerce {
    color: #393e46;
}

#hg-commerce .woocommerce-notices-wrapper:not(:empty),
#hg-commerce .woocommerce-message,
#hg-commerce .woocommerce-info,
#hg-commerce .woocommerce-error {
    margin: 0 0 22px !important;
    border: 1px solid rgba(198,161,69,.38) !important;
    border-top: 1px solid rgba(198,161,69,.38) !important;
    border-radius: 12px;
    background: #f8f5ef !important;
    box-shadow: 0 12px 30px rgba(0,0,0,.09);
    color: #393e46 !important;
}

#hg-commerce .woocommerce-message::before,
#hg-commerce .woocommerce-info::before { color: #c6a145 !important; }

#hg-commerce .woocommerce-error::before { color: #8d4a43 !important; }

/* CART */
#hg-commerce .woocommerce-cart-form,
#hg-commerce .cart-collaterals .cart_totals,
#hg-commerce .woocommerce-checkout,
#hg-commerce .woocommerce-order {
    padding: clamp(20px, 3vw, 38px);
    border: 1px solid rgba(243,220,107,.22);
    border-radius: 18px;
    background: #f4f0e8;
    box-shadow: 0 24px 55px rgba(0,0,0,.19);
}

#hg-commerce .woocommerce-cart-form { margin-bottom: 24px; }

#hg-commerce table.shop_table {
    margin: 0 !important;
    border: 0 !important;
    border-collapse: collapse !important;
    color: #393e46;
}

#hg-commerce table.shop_table th {
    padding: 14px 12px !important;
    border-bottom: 1px solid #d9d1c4 !important;
    color: #6d665d;
    font-family: var(--hg-font-ui);
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

#hg-commerce table.shop_table td {
    padding: 20px 12px !important;
    border-top: 0 !important;
    border-bottom: 1px solid #ddd5c9 !important;
    vertical-align: middle !important;
}

#hg-commerce .product-name a,
#hg-commerce .woocommerce-order-details a {
    color: #393e46;
    font-weight: 700;
    text-decoration: none;
}

#hg-commerce .product-name a:hover { color: #a78124; }

#hg-commerce .product-thumbnail img {
    width: 76px !important;
    border-radius: 10px;
}

#hg-commerce .product-remove a.remove {
    display: inline-grid !important;
    width: 32px !important;
    height: 32px !important;
    place-items: center;
    border: 1px solid #cfc5b7;
    border-radius: 50%;
    color: #746d64 !important;
    line-height: 1 !important;
}

#hg-commerce .product-remove a.remove:hover {
    background: #393e46 !important;
    color: #f4f0e8 !important;
}

#hg-commerce .coupon { display: flex; gap: 10px; flex-wrap: wrap; }
#hg-commerce .coupon .input-text { min-width: 210px; }

#hg-commerce input.input-text,
#hg-commerce input[type="text"],
#hg-commerce input[type="email"],
#hg-commerce input[type="tel"],
#hg-commerce select,
#hg-commerce textarea,
#hg-commerce .select2-container--default .select2-selection--single {
    min-height: 46px;
    border: 1px solid #cfc6b9 !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #393e46 !important;
    box-shadow: none !important;
}

#hg-commerce textarea { min-height: 110px; padding: 12px; }
#hg-commerce input.input-text { padding: 10px 12px !important; }

#hg-commerce button.button,
#hg-commerce a.button,
#hg-commerce input.button,
#hg-commerce #place_order,
#hg-commerce .checkout-button {
    min-height: 48px;
    padding: 12px 22px !important;
    border: 1px solid #c6a145 !important;
    border-radius: 9px !important;
    background: linear-gradient(135deg, #f3dc6b, #c6a145) !important;
    color: #2e333b !important;
    font-family: var(--hg-font-ui);
    font-size: .83rem !important;
    font-weight: 800 !important;
    letter-spacing: .05em;
    text-transform: uppercase;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

#hg-commerce button.button:hover,
#hg-commerce a.button:hover,
#hg-commerce input.button:hover,
#hg-commerce #place_order:hover,
#hg-commerce .checkout-button:hover {
    transform: translateY(-1px);
    background: #393e46 !important;
    border-color: #393e46 !important;
    color: #fff !important;
}

#hg-commerce .cart-collaterals { width: 100%; }
#hg-commerce .cart-collaterals .cart_totals { float: none; width: min(100%, 520px); margin-left: auto; }
#hg-commerce .cart_totals h2,
#hg-commerce .woocommerce-billing-fields h3,
#hg-commerce .woocommerce-additional-fields h3,
#hg-commerce #order_review_heading,
#hg-commerce .woocommerce-order h2 {
    color: #393e46;
    font-family: var(--hg-font-heading);
    font-weight: 500;
}

#hg-commerce .wc-proceed-to-checkout { padding-bottom: 0; }
#hg-commerce .wc-proceed-to-checkout .checkout-button { display: block !important; margin-bottom: 0 !important; text-align: center; }

/* CHECKOUT */
#hg-commerce .woocommerce-checkout { display: flow-root; }
#hg-commerce form.checkout .col2-set { width: 54%; float: left; }
#hg-commerce form.checkout #order_review_heading,
#hg-commerce form.checkout #order_review { width: 42%; float: right; }
#hg-commerce form.checkout #order_review_heading { margin-top: 0; }
#hg-commerce form.checkout #order_review {
    padding: 22px;
    border: 1px solid #d7cdbf;
    border-radius: 14px;
    background: #fff;
}

#hg-commerce .form-row label {
    color: #5f5a53;
    font-size: .87rem;
    font-weight: 700;
}

#hg-commerce .woocommerce-checkout-payment {
    border-radius: 12px !important;
    background: #ece6db !important;
}

#hg-commerce .woocommerce-checkout-payment .payment_box { background: #fff !important; }
#hg-commerce .woocommerce-checkout-payment .payment_box::before { border-bottom-color: #fff !important; }
#hg-commerce .woocommerce-privacy-policy-text { color: #6c665e; font-size: .85rem; line-height: 1.6; }

/* LOGIN / REGISTER GATE */
#hg-commerce .hg-checkout-gate {
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(32px, 5vw, 58px);
    border: 1px solid rgba(243,220,107,.28);
    border-radius: 20px;
    background: #f4f0e8;
    box-shadow: 0 24px 55px rgba(0,0,0,.19);
    color: #393e46;
    text-align: center;
}

#hg-commerce .hg-checkout-gate__mark {
    display: grid;
    width: 54px;
    height: 54px;
    margin: 0 auto 20px;
    place-items: center;
    border: 1px solid #c6a145;
    border-radius: 50%;
    color: #a9842b;
    font-family: var(--hg-font-ui);
    font-weight: 800;
    letter-spacing: .08em;
}

#hg-commerce .hg-checkout-gate h2 {
    margin: 0 0 14px;
    font-family: var(--hg-font-heading);
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    font-weight: 500;
}

#hg-commerce .hg-checkout-gate p { max-width: 590px; margin: 0 auto; line-height: 1.75; color: #686159; }
#hg-commerce .hg-checkout-gate__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

#hg-commerce .hg-commerce-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 9px;
    font-family: var(--hg-font-ui);
    font-size: .83rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-decoration: none;
}

#hg-commerce .hg-commerce-button--gold { border: 1px solid #c6a145; background: linear-gradient(135deg,#f3dc6b,#c6a145); color: #30353d; }
#hg-commerce .hg-commerce-button--ghost { border: 1px solid #777d84; background: #525961; color: #fff; }

#hg-commerce .hg-commerce__back { max-width: 1180px; margin: 24px auto 0; }
#hg-commerce .hg-commerce__back a { color: #f3dc6b; text-decoration: none; font-size: .9rem; font-weight: 700; }

/* ORDER RECEIVED */
#hg-commerce .woocommerce-order { max-width: 980px; margin: 0 auto; }
#hg-commerce .woocommerce-thankyou-order-received {
    padding: 16px 18px;
    border-radius: 10px;
    background: #e9e3d7;
    color: #393e46;
    font-weight: 700;
}
#hg-commerce ul.order_details { padding: 18px 0 !important; }

@media (max-width: 900px) {
    #hg-commerce.hg-commerce { padding-top: calc(var(--hg-header-height) + 50px); padding-bottom: 68px; }
    #hg-commerce form.checkout .col2-set,
    #hg-commerce form.checkout #order_review_heading,
    #hg-commerce form.checkout #order_review { width: 100%; float: none; }
    #hg-commerce form.checkout #order_review_heading { margin-top: 28px; }
}

@media (max-width: 680px) {
    #hg-commerce .woocommerce-cart-form,
    #hg-commerce .cart-collaterals .cart_totals,
    #hg-commerce .woocommerce-checkout,
    #hg-commerce .woocommerce-order { padding: 16px; border-radius: 14px; }

    #hg-commerce table.shop_table_responsive tr td { padding: 11px 8px !important; }
    #hg-commerce .coupon { width: 100%; }
    #hg-commerce .coupon .input-text { width: 100% !important; min-width: 0; }
    #hg-commerce .coupon button { width: 100%; }
    #hg-commerce .actions > button { width: 100%; margin-top: 8px; }
}

/* HG Commerce v1.4 — activation flow refinements */
#hg-commerce .hg-order-access-confirm {
    display: grid;
    gap: 6px;
    margin: 20px 0;
    padding: 18px 20px;
    border: 1px solid rgba(198,161,69,.42);
    border-radius: 12px;
    background: #ece6db;
    color: #393e46;
}
#hg-commerce .hg-order-access-confirm strong { color: #393e46; font-size: 1rem; }
#hg-commerce .hg-order-access-confirm span { color: #6b655d; font-size: .88rem; line-height: 1.55; }

#hg-commerce .woocommerce-checkout .form-row-first,
#hg-commerce .woocommerce-checkout .form-row-last {
    width: calc(50% - 7px);
}

@media (max-width: 680px) {
    #hg-commerce .woocommerce-checkout .form-row-first,
    #hg-commerce .woocommerce-checkout .form-row-last {
        width: 100%;
        float: none;
    }
}
