/**
 * GoodwillCart global polish — applied on all frontend pages.
 * Fixes the theme header on mobile and gives WooCommerce pages a clean, on-brand look.
 */

/* ---------- Mobile: compact theme header ---------- */
@media (max-width: 700px) {
    #masthead.site-header {
        position: sticky; top: 0; z-index: 150;
        background: #fff; box-shadow: 0 1px 8px rgba(0,0,0,.08);
    }
    #masthead .custom-logo { max-height: 36px; width: auto; height: auto; }
    #masthead .site-title-wrap { display: none; }
    #masthead .site-main-header-inner-wrap { padding-top: 6px; padding-bottom: 6px; }
    /* Kadence mobile header row */
    #mobile-header .custom-logo { max-height: 36px; width: auto; height: auto; }
    #mobile-header .site-title-wrap { display: none; }
}

/* ---------- Page titles ---------- */
.entry-header.page-title { padding: 24px 0 8px; }
.entry-header .entry-title {
    font-size: clamp(24px, 5vw, 34px);
    font-weight: 800; letter-spacing: -.01em;
}

/* ---------- WooCommerce: buttons ---------- */
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    border-radius: 24px;
    padding: 12px 28px;
    font-weight: 700;
    transition: transform .15s ease, box-shadow .15s ease;
}
.woocommerce button.button.alt,
.woocommerce a.button.alt {
    background: #d42a1e;
}
.woocommerce button.button.alt:hover,
.woocommerce a.button.alt:hover {
    background: #b32218;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212,42,30,.3);
}

/* ---------- WooCommerce: forms ---------- */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce .input-text {
    border-radius: 12px;
    border: 1.5px solid #e2e2e2;
    padding: 12px 14px;
    font-size: 15px;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
    border-color: #d42a1e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(212,42,30,.12);
}
.woocommerce form .form-row label { font-weight: 600; font-size: 14px; }

/* ---------- WooCommerce: login / account cards ---------- */
.woocommerce .u-columns .col-1,
.woocommerce .u-columns .col-2,
.woocommerce-account .woocommerce-MyAccount-content,
.woocommerce form.login,
.woocommerce form.register {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 2px 16px rgba(0,0,0,.05);
}
.woocommerce-MyAccount-navigation ul {
    list-style: none; margin: 0; padding: 0;
    background: #fff; border: 1px solid #eee; border-radius: 20px;
    overflow: hidden; box-shadow: 0 2px 16px rgba(0,0,0,.05);
}
.woocommerce-MyAccount-navigation ul li a {
    display: block; padding: 13px 20px;
    text-decoration: none; color: #333; font-weight: 500;
    border-bottom: 1px solid #f4f4f4;
}
.woocommerce-MyAccount-navigation ul li:last-child a { border-bottom: none; }
.woocommerce-MyAccount-navigation ul li.is-active a {
    background: #fef2f2; color: #d42a1e; font-weight: 700;
}

/* ---------- WooCommerce: notices ---------- */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
    border-radius: 14px;
    border-top: none;
    border-left: 4px solid;
}
.woocommerce-message { border-left-color: #2e7d32; }
.woocommerce-info { border-left-color: #1976d2; }
.woocommerce-error { border-left-color: #d42a1e; }

/* ---------- Shop: product cards ---------- */
@media (max-width: 700px) {
    .woocommerce ul.products[class*=columns-] li.product {
        border-radius: 16px;
    }
    .woocommerce ul.products li.product a img {
        border-radius: 16px;
    }
    /* keep pill button label on one line */
    .woocommerce ul.products li.product .button {
        white-space: nowrap;
        font-size: 13px;
        padding: 10px 18px;
    }
}

/* ---------- Single product: kill horizontal overflow ---------- */
.single-product, .single-product #inner-wrap { overflow-x: clip; }
.single-product .woocommerce-breadcrumb,
.single-product .kadence-breadcrumb-container { max-width: 100%; overflow: hidden; }

/* ---------- Single product: one breadcrumb only (hide theme's, keep plugin's) ---------- */
.single-product .kadence-breadcrumb-container { display: none; }

/* ---------- Single product: on-brand Add to cart ---------- */
.woocommerce div.product form.cart .button.single_add_to_cart_button,
.woocommerce div.product form.cart button.single_add_to_cart_button.alt {
    background: #d42a1e;
    border-radius: 24px;
    padding: 14px 34px;
    font-size: 16px;
    font-weight: 700;
    text-transform: none;
}
.woocommerce div.product form.cart .button.single_add_to_cart_button:hover {
    background: #b32218;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212,42,30,.3);
}

/* ---------- Single product: styled variation dropdown ---------- */
.woocommerce div.product form.cart .variations select {
    border-radius: 12px;
    border: 1.5px solid #e2e2e2;
    padding: 10px 12px;
    font-size: 15px;
    max-width: 100%;
}
.woocommerce div.product form.cart .variations select:focus {
    border-color: #d42a1e;
    outline: none;
}
.woocommerce div.product form.cart .quantity .qty {
    border-radius: 12px;
    border: 1.5px solid #e2e2e2;
    padding: 10px 8px;
}

/* ---------- Single product: rounded gallery ---------- */
.woocommerce div.product div.images img,
.woocommerce div.product div.images .woocommerce-product-gallery__image {
    border-radius: 18px;
}

/* ---------- Cart / Checkout: tidy empty states ---------- */
.woocommerce .cart-empty.woocommerce-info,
.woocommerce-page .cart-empty {
    border-radius: 16px;
}
@media (max-width: 700px) {
    .woocommerce-page .woocommerce-error,
    .woocommerce-page .woocommerce-message,
    .woocommerce-page .woocommerce-info {
        font-size: 14px;
    }
    /* keep empty-cart illustration reasonable */
    .woocommerce-page .cart-empty + p img,
    .woocommerce-checkout .woocommerce-info img {
        max-width: 180px;
        height: auto;
    }
}

/* ---------- Hide default theme credit, keep copyright ---------- */
.site-footer .footer-html-inner a[href*="kadencewp.com"] {
    display: none;
}

/* ---------- Shop cards: clean mobile actions (Add to cart + share only) ---------- */
@media (max-width: 820px) {
    html body.gwc-platform.gwc-shop-page .gwc-shop-card-actions {
        display: flex !important;
        align-items: center;
        gap: 8px !important;
    }
    html body.gwc-platform.gwc-shop-page .gwc-shop-card-actions .gwc-shop-wishlist,
    html body.gwc-platform.gwc-shop-page .gwc-shop-card-actions .gwc-shop-compare,
    html body.gwc-platform.gwc-shop-page .gwc-shop-card-actions .gwc-shop-quickview {
        display: none !important;
    }
    html body.gwc-platform.gwc-shop-page .gwc-shop-card-actions .add_to_cart_button {
        flex: 1 !important;
        white-space: nowrap !important;
    }
    html body.gwc-platform.gwc-shop-page .gwc-shop-card-actions .gwc-shop-share {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        border: 1.5px solid #e2e2e2 !important;
        border-radius: 50% !important;
        background: #fff !important;
    }
    html body.gwc-platform.gwc-shop-page .gwc-shop-card-actions .gwc-shop-share svg {
        width: 18px !important;
        height: 18px !important;
    }
}

/* ---------- Single product: wishlist button ---------- */
body.gwc-platform form.cart .gwc-single-wishlist,
body.gwc-platform .gwc-single-wishlist {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px !important;
    padding: 12px 20px !important;
    border: 1.5px solid #e2e2e2 !important;
    border-radius: 10px !important;
    background: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
    cursor: pointer;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: both;
}
body.gwc-platform .gwc-single-wishlist__heart {
    font-size: 20px;
    line-height: 1;
}
body.gwc-platform .gwc-single-wishlist.is-selected {
    border-color: var(--red, #e11d2e) !important;
    color: var(--red, #e11d2e) !important;
    background: #fef2f2 !important;
}
body.gwc-platform .gwc-single-wishlist.is-selected .gwc-single-wishlist__heart {
    color: var(--red, #e11d2e);
}

/* ---------- Wishlist: filled heart when selected ---------- */
body.gwc-platform .gwc-shop-product-media {
    position: relative;
}
body.gwc-platform .gwc-shop-wishlist.is-selected {
    background: var(--red, #e11d2e) !important;
    border-color: var(--red, #e11d2e) !important;
    color: #fff !important;
}
body.gwc-platform .gwc-shop-wishlist.is-selected svg {
    fill: #fff !important;
}

/* ---------- Shop/Deals header (gwc-header): mobile polish ---------- */
@media (max-width: 820px) {
    /* CSS-drawn hamburger (replaces ☰ character) */
    body.gwc-platform .gwc-header .gwc-menu-button {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 36px;
        height: 36px;
        padding: 7px !important;
        background: #f5f5f5 !important;
        border: none !important;
        border-radius: 10px;
        font-size: 0 !important;
    }
    body.gwc-platform .gwc-header .gwc-menu-button span {
        display: block;
        height: 2.5px;
        background: #222;
        border-radius: 2px;
    }
    /* Compact logo */
    body.gwc-platform .gwc-header .gwc-logo--official img,
    body.gwc-platform .gwc-header .gwc-logo img {
        max-height: 36px !important;
        width: auto !important;
    }
    /* Keep search visible on phones */
    body.gwc-platform .gwc-header .gwc-search {
        display: grid !important;
        grid-column: 1 / -1 !important;
        order: 10;
        margin: 0 0 10px !important;
    }
    body.gwc-platform .gwc-header__main {
        grid-template-columns: auto 1fr auto !important;
        gap: 10px !important;
        padding-top: 10px !important;
    }
    /* Icon-only actions */
    body.gwc-platform .gwc-header .gwc-actions a span {
        display: none !important;
    }
    body.gwc-platform .gwc-header .gwc-actions {
        gap: 14px !important;
        font-size: 20px !important;
    }
    /* Sticky */
    body.gwc-platform .gwc-header {
        position: sticky !important;
        top: 0;
        z-index: 150;
        box-shadow: 0 1px 8px rgba(0,0,0,.08);
    }
}
@media (max-width: 820px) {
    body.gwc-platform .gwc-shop-premium-hero__inner {
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }
    body.gwc-platform .gwc-shop-premium-hero__copy {
        padding: 32px 20px 28px !important;
        order: 1;
    }
    body.gwc-platform .gwc-shop-premium-hero h1 {
        font-size: 32px !important;
        letter-spacing: -1px !important;
        line-height: 1.08 !important;
        max-width: 100% !important;
    }
    body.gwc-platform .gwc-shop-premium-hero__copy > p {
        font-size: 15px !important;
        max-width: 100% !important;
    }
    body.gwc-platform .gwc-shop-premium-hero__actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-top: 20px !important;
    }
    body.gwc-platform .gwc-shop-premium-hero__actions .gwc-button {
        width: 100% !important;
        min-height: 48px !important;
        font-size: 13px !important;
    }
    body.gwc-platform .gwc-shop-hero-benefits {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 18px 12px !important;
        margin-top: 28px !important;
    }
    body.gwc-platform .gwc-shop-hero-benefits > span {
        grid-template-columns: 30px 1fr !important;
        font-size: 16px !important;
        align-items: start !important;
    }
    body.gwc-platform .gwc-shop-hero-benefits strong {
        font-size: 12px !important;
        line-height: 1.3 !important;
    }
    body.gwc-platform .gwc-shop-hero-benefits small {
        font-size: 10px !important;
        line-height: 1.3 !important;
    }
    body.gwc-platform .gwc-shop-premium-hero__visual {
        order: 2;
        min-height: 260px !important;
        max-height: 300px !important;
    }
    body.gwc-platform .gwc-shop-premium-hero__visual > img {
        min-height: 260px !important;
        max-height: 300px !important;
    }
    body.gwc-platform .gwc-shop-premium-hero__product {
        right: 12px !important;
        left: 12px !important;
        bottom: 12px !important;
        width: auto !important;
        padding: 12px 14px !important;
    }
    body.gwc-platform .gwc-shop-premium-hero__product strong {
        font-size: 13px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
    }
}
