/* Variables */
:root {
    --text-primary: #241a11;
    --text-secondary: #5f3826;
    --accent: #e7e7e6;
    --accent-dark: #dbdbda;
    --text-muted: #866752;

    --accent-rgb: 231, 231, 230;
}

/* Styles intended only for the front.*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media screen and (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;

    font-family: 'Inter', sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    background-color: var(--accent);
}

:where(.wp-site-blocks) > * {
    margin-block-start: 0;
}

.wp-site-blocks {
    position: relative;
}

header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 10000;
    background-color: transparent;
}
header:has(.fixed) {
    background-color: var(--text-primary);
}

footer {
    margin: 0 !important;
    background-color: var(--text-primary);
    padding-bottom: 30px;
}

.logged-in header {
    margin-top: 32px;
}

main {
    margin-top: 0;
    padding: 0 !important;
}

section {
    margin: 0 !important;
    width: 100%;
    max-width: 100% !important;
}

.section-wrapper {
    max-width: min(1440px, calc(100% - 13%));
    margin: 0 auto;
}

h1 {
    font-size: clamp(48px, 4vw + 1rem, 72px);
    line-height: 1;
    margin: 0;
}

h2 {
    font-size: 48px !important;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 24px 0 !important;
    line-height: 1 !important;
}

h3 {
    font-size: 24px;
    font-weight: 600;
    line-height: 2;
    color: var(--text-primary);
    margin: 0;
}

h4 {
    font-size: 20px;
    font-weight: 600;
    line-height: 2;
    color: var(--text-primary);
    margin: 0;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    line-height: 1.43;
}
:root :where(a:where(:not(.wp-element-button)):hover) {
    color: var(--text-primary);
}

p {
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.43;
}

li {
    line-height: 1;
}

span {
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.43;
    font-weight: 500;
}

button {
    height: 50px;
    background-color: var(--text-primary);
    color: var(--accent);
    width: 100%;
    border-radius: 50px;
    font-size: 16px;
    line-height: 1.43;
    font-weight: 500;
}

.button {
    height: 50px;
    border-radius: 30px;
    -webkit-border-radius: 30px;
    -moz-border-radius: 30px;
    -ms-border-radius: 30px;
    -o-border-radius: 30px;
    color: var(--text-primary);
    border: 1px solid var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
}

input {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.43;
    font-size: 16px;
}

textarea {
    color: var(--text-secondary);
    background-color: var(--accent-dark);
    font-weight: 500;
    line-height: 1.43;
    font-size: 16px;
    border-radius: 16px;
    padding: 10px;
    border: none;
}

/* Woocommerce */

.woocommerce-page label {
    margin-bottom: 0;
}

.single-product main {
    margin-block-start: 60px;
}

.single-product main .wp-block-columns {
    gap: 5%;
    max-width: min(1440px, calc(100% - 13%));
    margin: 0 auto 60px;
    align-items: flex-start;
}

@media (min-width: 782px) and (max-width: 1440px) {
    .single-product .wp-block-column[style*='flex-basis:512px'],
    .single-product .wp-block-column[style*='flex-basis: 512px'] {
        flex-basis: calc((100vw - 13% - 5%) * 512 / (512 + 526)) !important;
    }
}

.woocommerce-page select {
    font-size: 16px;
}

.wc-block-cart-item__wrap {
    button,
    input {
        color: var(--text-primary) !important;
    }
}
.wp-block-woocommerce-cart-order-summary-block {
    color: var(--text-primary) !important;
}
.read-more-link {
    text-decoration: underline;
}
body.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
html
    body
    .wp-block-woocommerce-product-details.is-style-minimal
    ul.tabs.wc-tabs
    li
    a {
    color: var(--text-primary);
}

.woocommerce-tabs .tabs {
    display: none !important;
}
.woocommerce-tabs h2 {
    text-align: center;
    margin: 0 0 36px 0;
}
h2.wp-block-heading {
    text-align: center;
}
.wp-block-woocommerce-product-details {
    max-width: min(1440px, calc(100% - 13%)) !important;
    margin: 0 auto 0 !important;
    padding: 60px 0 !important;
}
.woocommerce div.product .woocommerce-tabs .panel {
    margin: 0 !important;
}

.woocommerce-product-gallery__trigger {
    display: none !important;
}

/* ── Product Gallery ──────────────────────────────────────────────────────── */

.woocommerce-product-gallery {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    position: relative;
}

.woocommerce-product-gallery__trigger {
    display: none !important;
}

/* Main image */
.woocommerce-product-gallery__image:first-child,
.woocommerce-product-gallery .woocommerce-product-gallery__image {
    border-radius: 20px;
    overflow: hidden;
}

.woocommerce-product-gallery__image img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
}

/* Thumbnail carousel */
.flex-control-nav.flex-control-thumbs {
    display: flex !important;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}

.flex-control-nav.flex-control-thumbs li {
    flex-shrink: 0;
    width: 89px !important;
    height: 94px !important;
    margin: 0 !important;
}

.flex-control-nav.flex-control-thumbs li img {
    width: 89px !important;
    height: 94px !important;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.flex-control-nav.flex-control-thumbs li img.flex-active {
    opacity: 1;
}

/* Flexslider arrows */
.woocommerce-product-gallery .flex-direction-nav {
    display: none;
}

.woocommerce-product-gallery--with-thumbs .flex-direction-nav {
    display: block;
}

.woocommerce-product-gallery .flex-prev,
.woocommerce-product-gallery .flex-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 1 !important;
    text-indent: 0 !important;
    font-size: 0;
    padding: 0;
}

.woocommerce-product-gallery .flex-prev {
    left: 0;
}

.woocommerce-product-gallery .flex-next {
    right: 0;
    transform: translateY(-50%) rotate(180deg);
}

.woocommerce-product-gallery .flex-prev::after,
.woocommerce-product-gallery .flex-next::after {
    content: '';
    display: block;
    width: 13px;
    height: 23px;
    background-image: url("data:image/svg+xml,%3Csvg width='13' height='23' viewBox='0 0 13 23' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.9167 21.9167L0.916748 11.4167L11.9167 0.916748' stroke='%232A1A11' stroke-width='1.83333' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

/* Sticky gallery - scoped to single product pages only */
.single-product .wp-block-columns.is-layout-flex,
.single-product [class*='wp-container-core-columns'] {
    align-items: flex-start !important;
}

.single-product .woocommerce-product-gallery {
    position: static !important;
    max-height: none;
    overflow: visible !important;
}

@media (min-width: 782px) {
    .single-product .wp-block-column.is-layout-flow:first-child {
        position: sticky !important;
        top: 74px;
        align-self: flex-start !important;
    }
    .logged-in.single-product .wp-block-column.is-layout-flow:first-child {
        position: sticky !important;
        top: 106px;
        align-self: flex-start !important;
    }
}

/* Exclude admin bar links */
#wpadminbar a,
#wpadminbar * a {
    color: inherit !important;
    text-decoration: inherit !important;
}
