/* Hide Blocksy's built-in shop/archive hero — we render our own */
body.woocommerce-shop .hero-section,
body.tax-product_cat .hero-section,
body.tax-product_tag .hero-section {
    display: none !important;
}

/* Blocksy wraps archive content in .ct-container (max-width + side
   padding), which fights our full-bleed hero/newsletter sections and
   shifts .shop-layout's own centering. Neutralize it here — each of our
   sections defines its own width/padding, same pattern as log-cart.css. */
body.woocommerce-shop .is-layout-constrained,
body.woocommerce-shop .entry-content,
body.woocommerce-shop [class*="ct-container"],
body.woocommerce-shop [class*="content-container"],
body.tax-product_cat .is-layout-constrained,
body.tax-product_cat .entry-content,
body.tax-product_cat [class*="ct-container"],
body.tax-product_cat [class*="content-container"],
body.tax-product_tag .is-layout-constrained,
body.tax-product_tag .entry-content,
body.tax-product_tag [class*="ct-container"],
body.tax-product_tag [class*="content-container"] {
    /* Blocksy sets `width: var(--container-max-width)` (90vw) on
       .ct-container, not max-width — must reset width itself or the
       90vw cap still wins regardless of max-width/padding resets. */
    width: 100% !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Blocksy's [data-vertical-spacing*="bottom"] attribute selector adds its
   own padding-bottom (e.g. 60px) to .ct-container on top of the above —
   a separate rule/selector, so it needs its own override here. */
body.woocommerce-shop [class*="ct-container"][data-vertical-spacing],
body.tax-product_cat [class*="ct-container"][data-vertical-spacing],
body.tax-product_tag [class*="ct-container"][data-vertical-spacing] {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body.woocommerce-shop .entry-content,
body.tax-product_cat .entry-content,
body.tax-product_tag .entry-content {
    padding-top: 0 !important;
}

/* ============================= FLASH SALE BAR ============================= */
.log-flash-bar {
    background: linear-gradient(90deg, var(--plum-950), var(--plum-800) 50%, var(--plum-950));
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
}

.log-flash-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.log-flash-fire {
    font-size: 24px;
    animation: log-fire-flicker 1s ease-in-out infinite alternate;
}

@keyframes log-fire-flicker {
    from {
        transform: scale(1) rotate(-3deg);
    }

    to {
        transform: scale(1.15) rotate(3deg);
    }
}

.log-flash-text {
    font-size: 15.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, .85);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}

.log-flash-text strong {
    color: var(--sage-400);
    font-size: 16.5px;
}

.log-flash-code-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.log-flash-text .log-code {
    background: rgba(203, 168, 105, .2);
    border: 1px solid var(--sage-500);
    color: var(--sage-400);
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 6px;
    letter-spacing: .05em;
    line-height: 1.4;
}

.log-flash-timer {
    display: flex;
    align-items: center;
    gap: 6px;
}

.log-timer-unit {
    background: rgba(255, 255, 255, .1);
    border-radius: 8px;
    width: 46px;
    height: 46px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .12);
}

.log-timer-unit span.num {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    font-family: var(--display);
}

.log-timer-unit span.lbl {
    font-size: 9px;
    font-weight: 700;
    color: rgba(255, 255, 255, .5);
    letter-spacing: .05em;
    margin-top: 1px;
}

.log-timer-sep {
    font-size: 19px;
    font-weight: 800;
    color: var(--sage-400);
    margin-bottom: 4px;
}

@media (max-width: 600px) {
    .log-flash-bar {
        padding: 10px 16px;
        gap: 10px;
    }

    .log-flash-bar-left {
        gap: 8px;
    }

    .log-flash-fire {
        font-size: 15px;
    }

    .log-flash-text {
        font-size: 12px;
        justify-content: center;
        text-align: center;
    }

    .log-flash-text strong {
        font-size: 12.5px;
    }

    .log-flash-text .log-code {
        font-size: 11px;
        padding: 3px 8px;
    }

    .log-flash-timer {
        gap: 5px;
    }

    .log-timer-unit {
        width: 32px;
        height: 32px;
    }

    .log-timer-unit span.num {
        font-size: 12.5px;
    }

    .log-timer-unit span.lbl {
        font-size: 6.5px;
    }
}

/* ── SHOP LAYOUT (single column — sidebar removed) ── */
.log-shop-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 24px;
}

/* Sort By dropdown (moved into sticky topbar) */
.log-sort-select {
    padding: 10px 34px 10px 14px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-900);
    background: var(--white);
    cursor: pointer;
    transition: border-color .22s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237d6e79' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.log-sort-select:focus {
    outline: none;
    border-color: var(--plum-700);
}

/* ── SHOP MAIN (count + sort + view toggle) ── */
.log-shop-topbar {
    position: relative;
    left: 50%;
    right: 50%;
    width: 100vw;
    margin-left: -50vw;
    margin-right: -50vw;
    background: var(--paper-50);
    border-bottom: 1px solid var(--line);
    padding: 14px 24px;
    margin-bottom: 0.7rem;
}

.log-shop-topbar-inner {
    max-width: 1220px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.log-shop-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.log-shop-count {
    font-size: 13px;
    color: var(--ink-700);
    font-weight: 600;
}

.log-shop-count strong {
    color: var(--ink-900);
}

.log-active-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--blush-100);
    color: var(--plum-700);
    font-size: 12px;
    font-weight: 700;
    padding: 7px 12px 7px 14px;
    border-radius: var(--r-pill);
    text-decoration: none;
}

.log-active-filter .log-rm {
    font-weight: 800;
    opacity: .7;
}

.log-active-filter .log-rm:hover {
    opacity: 1;
}

.log-shop-topbar-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-direction: row;
    justify-content: space-between;
}

.log-view-toggle {
    display: flex;
    gap: 10px;
}

.log-view-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--r-pill);
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--gray-600);
    transition: all .25s var(--ease);
}

.log-view-btn.active {
    background: var(--ink-900);
    color: #fdf8f4;
}

@media (max-width: 760px) {
    .log-view-toggle {
        display: none;
    }
}

@media (max-width: 600px) {
    .log-shop-topbar {
        padding: 11px 16px;
    }

    .log-shop-count {
        font-size: 12px;
    }
}

/* ── PRODUCTS GRID ── */
.log-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: stretch;
}

@media (min-width: 1400px) {
    .log-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1100px) {
    .log-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.log-products-grid.log-list-view {
    grid-template-columns: 1fr;
}

/* ── PAGINATION ── */
.log-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 44px auto 8px;
    flex-wrap: wrap;
    max-width: 1280px;
}

.log-page-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.4px solid var(--line);
    background: var(--white);
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s var(--ease);
    text-decoration: none;
    font-family: inherit;
}

.log-page-btn .icon {
    width: 15px;
    height: 15px;
}

.log-page-btn:hover {
    border-color: var(--plum-700);
    color: var(--plum-700);
    text-decoration: none;
}

.log-page-btn.active {
    background: var(--ink-900);
    border-color: var(--ink-900);
    color: #fdf8f4;
}

.log-page-btn.dots {
    background: none;
    border: none;
    cursor: default;
    color: var(--gray-600);
}

.log-page-btn.dots:hover {
    background: none;
    border: none;
    color: var(--gray-600);
}

.log-pagination a {
    text-decoration: none !important;
}

/* ── NEWSLETTER — contained rounded card (matches reference, not full-bleed) ── */
.log-nl-strip {
    max-width: 1220px;
    margin: 32px auto;
    padding: 0 24px;
}

.log-nl-inner {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--plum-950), var(--plum-900));
    border-radius: var(--r-lg);
    padding: 64px 40px;
    text-align: center;
    transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}

.log-nl-inner:hover {
    transform: translateY(-6px);
    box-shadow: 0 40px 70px rgba(15, 28, 25, .35);
}

.log-nl-inner::before,
.log-nl-inner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .3;
    pointer-events: none;
}

.log-nl-inner::before {
    width: 300px;
    height: 300px;
    background: var(--sage-500);
    top: -100px;
    left: -60px;
}

.log-nl-inner::after {
    width: 260px;
    height: 260px;
    background: var(--plum-600);
    bottom: -90px;
    right: -40px;
}

.log-nl-inner h2 {
    position: relative;
    z-index: 1;
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(26px, 3.4vw, 38px);
    color: #fff;
    margin: 0;
}

.log-nl-inner h2 em {
    font-style: italic;
    color: var(--sage-400);
}

.log-nl-inner p {
    position: relative;
    z-index: 1;
    color: #c9dcd0;
    font-size: 14.5px;
    margin: 12px 0 0;
}

.log-nl-row {
    position: relative;
    z-index: 1;
    display: flex;
    max-width: 440px;
    margin: 26px auto 0;
    gap: 0;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .08);
    padding: 5px;
}

.log-nl-row input {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    font-size: 13.5px;
    padding: 11px 16px;
    outline: none;
    font-family: inherit;
}

.log-nl-row input::placeholder {
    color: #8fae9f;
}

.log-nl-row button {
    position: relative;
    overflow: hidden;
    background: var(--sage-500);
    color: var(--plum-950);
    font-weight: 700;
    font-size: 13px;
    padding: 11px 22px;
    border-radius: var(--r-pill);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background .25s var(--ease);
    font-family: inherit;
}

.log-nl-row button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(115deg, transparent, rgba(255, 255, 255, .5), transparent);
    transform: skewX(-20deg);
    transition: left .6s var(--ease);
}

.log-nl-row button:hover::after {
    left: 130%;
}

.log-nl-row button:hover {
    background: var(--sage-400);
}

@media (max-width: 520px) {
    .log-nl-row {
        flex-direction: column;
        border-radius: var(--r-md);
        padding: 8px;
    }

    .log-nl-row button {
        border-radius: var(--r-md);
    }
}

/* CF7 newsletter form — reuses the .log-nl-row pill container look */
.log-nl-row-wrap .wpcf7-form {
    position: relative;
    z-index: 1;
}

form.log-cf7-nl-row {
    max-width: 440px;
    margin: 26px auto 0;
}

/* Pill background/padding lives on the <p> row itself, not the <form> —
   .wpcf7-response-output is a sibling of this <p>, not a child, so it
   no longer inherits the pill's rounded background/padding. It renders
   as its own full-width line below the pill instead of being crammed
   inside it (same pattern already used for the footer's CF7 form). */
.log-cf7-nl-row p {
    margin: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .08);
    padding: 5px;
}

.log-cf7-nl-row br {
    display: none;
}

.log-cf7-nl-row .wpcf7-form-control-wrap {
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    min-width: 120px;
    display: block;
}

.log-cf7-nl-row .wpcf7-form-control-wrap input {
    width: 100%;
    box-sizing: border-box;
    background: none;
    border: none;
    color: #fff;
    font-size: 13.5px;
    padding: 11px 16px;
    outline: none;
    font-family: inherit;
}

/* Chrome/Edge autofill forces its own white background + black text
   (ignores background/color entirely) — the standard workaround: a huge
   inset box-shadow paints over the forced background, and
   -webkit-text-fill-color (not color) is what autofill actually
   respects. Same fix already applied to the footer's CF7 field. */
.log-cf7-nl-row .wpcf7-form-control-wrap input:-webkit-autofill,
.log-cf7-nl-row .wpcf7-form-control-wrap input:-webkit-autofill:focus,
.log-cf7-nl-row .wpcf7-form-control-wrap input:-webkit-autofill:hover {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, .08) inset;
    transition: background-color 5000s ease-in-out 0s;
}

.log-cf7-nl-row .wpcf7-form-control-wrap input::placeholder {
    color: #8fae9f;
}

form.log-cf7-nl-row input[type="submit"].wpcf7-submit {
    width: auto !important;
    display: inline-block !important;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background: var(--sage-500);
    color: var(--plum-950);
    border: none;
    cursor: pointer;
    padding: 11px 22px;
    border-radius: var(--r-pill);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .25s var(--ease);
    font-family: inherit;
}

form.log-cf7-nl-row input[type="submit"].wpcf7-submit:hover {
    background: var(--sage-400);
}

form.log-cf7-nl-row input[type="submit"].wpcf7-submit::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(115deg, transparent, rgba(255, 255, 255, .5), transparent);
    transform: skewX(-20deg);
    transition: left .6s var(--ease);
}

form.log-cf7-nl-row input[type="submit"].wpcf7-submit:hover::after {
    left: 130%;
}

.log-cf7-nl-row .wpcf7-not-valid-tip {
    display: none !important;
}

.log-cf7-nl-row .wpcf7-response-output {
    /* issues-fixes.css sets an unscoped ".wpcf7-form{display:flex;
       flex-direction:column}" + ".wpcf7-response-output{order:-1}" for
       the Contact Us form (Issue #21) that matches every CF7 form
       sitewide, including this one — flips the notice above the input
       row instead of below it. This selector's higher specificity wins
       without !important (same fix already applied to the footer's CF7
       form in log-footer.css). */
    order: 0;
    display: block;
    width: 100%;
    color: rgba(255, 255, 255, .85);
    font-size: 12px;
    border: none !important;
    padding: 0;
    margin: 8px 0 0 !important;
    text-align: center;
}

.log-cf7-nl-row .wpcf7-response-output.wpcf7-validation-errors {
    display: block !important;
    color: rgba(255, 180, 180, .9);
}

.log-cf7-nl-row .wpcf7-response-output.wpcf7-mail-sent-ok {
    display: block !important;
    color: rgba(150, 255, 150, .9);
}

.log-cf7-nl-row .wpcf7-spinner {
    display: none;
}

@media (max-width: 520px) {
    .log-cf7-nl-row p {
        flex-direction: column;
        border-radius: var(--r-md);
        padding: 8px;
        gap: 8px;
    }

    form.log-cf7-nl-row input[type="submit"].wpcf7-submit {
        border-radius: var(--r-md);
        width: 100% !important;
    }
}

/* ── HIDE PARENT THEME ELEMENTS ── */
body.log-shop-page .entry-hero-container-inner,
body.log-shop-page .woocommerce-products-header,
body.log-shop-page .kadence-shop-top-row,
body.log-shop-page .woocommerce-result-count,
body.log-shop-page .woocommerce-ordering {
    display: none !important;
}

body.log-shop-page .site-content>.content-container,
body.log-shop-page .site-content>.site-container,
body.log-shop-page .site-content>.ast-container {
    max-width: 100% !important;
    padding: 0 !important;
}

body.log-shop-page .entry-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.log-shop-page .site-main {
    padding-top: 0 !important;
}

body.log-shop-page .woocommerce-notices-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

body.log-shop-page .log-site-footer {
    margin-top: 0;
}

/* Product image bg override */
body.log-shop-page .log-prod-img-wrap {
    background: var(--paper, #fdf8f0) !important;
}

body.log-shop-page .log-prod-img-wrap::after {
    background: none !important;
}

.log-prod-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

/* ── RESPONSIVE ── */
@media (max-width: 1000px) {
    .log-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .log-shop-wrap {
        padding: 10px 20px 60px;
    }
}

@media (max-width: 600px) {
    .log-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}