/*
 * Global flat design reset.
 * Goal: remove rounded corners and reduce nested container visuals across the site.
 */

:root {
    --hdn-site-ivory: #f4f1e9;
    --hdn-shop-radius: 0px;
    --hdn-shorts-radius-lg: 0px;
    --hdn-shorts-radius-xl: 0px;
    --hdn-commerce-radius: 0px;
    --hdn-m-radius-lg: 0px;
    --hdn-m-radius-md: 0px;
    --hdn-guide-radius-lg: 0px;
    --hdn-guide-radius-xl: 0px;
}

body {
    background: var(--hdn-site-ivory) !important;
}

body :is(.content-bg, .entry, .entry-content-wrap) {
    border-radius: 0 !important;
}

#inner-wrap,
.content-container.site-container,
#primary.content-area,
#main.site-main {
    background: transparent !important;
}

body :is(
    #primary,
    .content-area,
    .site-main,
    #colophon,
    .hdn-cookie-consent,
    .hdn-cookie-modal
) :is(*, *::before, *::after) {
    border-radius: 0 !important;
}

/* Flatten major panel wrappers to avoid "container in container" effect. */
body :is(
    .entry.content-bg,
    .entry-content-wrap,
    .entry.loop-entry,
    li.product.content-bg,
    li.product.entry,
    li.product.loop-entry,
    li.product .product-details.content-bg.entry-content-wrap,
    .hdn-editorial-main,
    .hdn-editorial-cta-inner,
    .hdn-accessories-catalog,
    .hdn-accessories-toolbar,
    .hdn-accessories-cta-inner,
    .hdn-shorts-toolbar,
    .hdn-shorts-cta,
    .hdn-configurator-content,
    .hdn-configurator-summary,
    .hdn-measurements-panel,
    .hdn-measurement-item,
    .hdn-cookie-consent__panel,
    .hdn-cookie-modal__dialog
) {
    box-shadow: none !important;
}

body :is(
    .hdn-accessories-catalog,
    .hdn-accessories-toolbar,
    .hdn-accessories-cta-inner,
    .hdn-editorial-cta-inner
) {
    background: transparent !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
}

body .hdn-accessories-catalog {
    border: 0 !important;
    padding: 0 !important;
}

body .hdn-accessories-toolbar {
    border-left: 0 !important;
    border-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body .hdn-accessories-cta-inner {
    border: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body .hdn-accessories-page ul.products.hdn-accessories-products {
    margin-top: 1.25rem !important;
}

body .hdn-wc-card :is(.product-details.content-bg.entry-content-wrap, .product-details.entry-content-wrap, .product-details.content-bg) {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
}

/* Single-product page cleanup (remove heavy nested cards). */
body.single-product.woocommerce :is(
    div.product,
    div.product .summary.entry-summary,
    div.product .woocommerce-product-gallery,
    div.product .woocommerce-tabs.wc-tabs-wrapper,
    div.product .woocommerce-Tabs-panel,
    div.product .wc-tabs,
    div.product .hdn-product-essentials,
    div.product .hdn-product-delivery-section,
    div.product .hdn-measurements-inline,
    div.product .woocommerce-product-details__short-description table
) {
    background: transparent !important;
    box-shadow: none !important;
    border-color: rgba(15, 23, 42, 0.14) !important;
}

body.single-product.woocommerce div.product {
    border: 0 !important;
    padding: 0 !important;
}

body.single-product.woocommerce div.product .summary.entry-summary,
body.single-product.woocommerce div.product .woocommerce-product-gallery {
    border: 0 !important;
}

body.single-product.woocommerce div.product div.images {
    background: transparent !important;
    border: 0 !important;
}

body.single-product.woocommerce div.product .woocommerce-tabs.wc-tabs-wrapper,
body.single-product.woocommerce div.product .woocommerce-Tabs-panel {
    border: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.single-product.woocommerce div.product :is(
    .woocommerce-tabs ul.tabs,
    .woocommerce-tabs ul.tabs li,
    .woocommerce-tabs ul.tabs li a,
    .hdn-product-essentials,
    .hdn-measurements-box,
    .hdn-measurements-inline,
    .hdn-product-video-card,
    .hdn-product-video-frame,
    .hdn-product-delivery-link
) {
    background: transparent !important;
    box-shadow: none !important;
}

body.single-product.woocommerce div.product :is(
    .hdn-product-essentials,
    .hdn-measurements-box,
    .hdn-product-video-card,
    .hdn-product-video-frame,
    .woocommerce-Tabs-panel,
    .woocommerce-tabs ul.tabs li a
) {
    border-color: rgba(15, 23, 42, 0.16) !important;
}

body.single-product.woocommerce div.product .woocommerce-Tabs-panel {
    border: 0 !important;
    background: transparent !important;
    padding-top: 0.6rem !important;
}

body.single-product.woocommerce div.product .woocommerce-tabs ul.tabs {
    border-bottom: 1px solid rgba(15, 23, 42, 0.16) !important;
}

body.single-product.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    color: rgba(15, 23, 42, 0.58) !important;
}

body.single-product.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
body.single-product.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
    border-bottom-color: #c4873a !important;
    color: #c4873a !important;
}

body.single-product.woocommerce div.product form.cart :is(.single_add_to_cart_button, .button, .added_to_cart) {
    border-radius: 0 !important;
}

/* Keep product cards and key CTA visually defined. */
body :is(.hdn-wc-card, .hdn-product-card--premium) {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body :is(.hdn-wc-card .hdn-wc-card__cta, .hdn-product-card--premium .btn-primary) {
    border: 0 !important;
    border-bottom: 1px solid #0f172a !important;
}

/* Inputs/selects stay clean and square. */
body :is(
    #primary,
    .content-area,
    .site-main,
    #colophon,
    .hdn-cookie-consent,
    .hdn-cookie-modal
) :is(input, select, textarea, button, .select2-selection) {
    border-radius: 0 !important;
}

/* Restore native Holdenim header shape (account/cart connected pill + mobile trigger). */
body.hdn-header-template #main-header .header-button-wrap .header-button {
    border-radius: 999px 0 0 999px !important;
}

body.hdn-header-template #main-header .header-cart-wrap .header-cart-button {
    border-radius: 0 999px 999px 0 !important;
}

body.hdn-header-template #mobile-header .mobile-toggle-open-container .menu-toggle-open,
body.hdn-header-template #mobile-header .mobile-toggle-open-container .menu-toggle-open:focus,
body.hdn-header-template #mobile-drawer .menu-toggle-close {
    border-radius: 999px !important;
}

/* Preserve modern premium card ergonomics on listing pages. */
body #primary :is(.hdn-wc-card, .hdn-product-card--premium) {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    transition: none !important;
}

body #primary :is(.hdn-wc-card, .hdn-product-card--premium):hover,
body #primary :is(.hdn-wc-card, .hdn-product-card--premium):focus-within {
    border-color: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

body #primary :is(.hdn-wc-card, .hdn-product-card--premium) :is(.woocommerce-loop-image-link, .hdn-product-image) {
    border-radius: 0 !important;
}

body #primary :is(.hdn-wc-card, .hdn-product-card--premium) :is(.hdn-wc-card__label, .hdn-product-label) {
    border-radius: 0 !important;
}

body #primary :is(.hdn-wc-card .hdn-wc-card__cta, .hdn-product-card--premium .btn-primary) {
    border-color: #0f172a !important;
    border-radius: 0 !important;
}
