/* ================================
   GLOBAL
================================ */

html,
body {
    overflow-x: hidden;
}

.elementor-page .page-header {
    display: none;
}

.elementor-icon,
.elementor-icon-wrapper {
    line-height: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
}

.main-navigation ul.sub-menu a {
    font-size: 14px;
}


/* ================================
   SHOP PAGE
================================ */

.product-loop-wrapper {
    background: #F8F1EA;
    padding: 24px 28px 40px;
    border-radius: 24px;
    height: 100%;
}

.woocommerce-loop-product__title {
    font-family: inherit !important;
    letter-spacing: -0.03em;
}

.product .product-loop-content {
    padding: 0;
    margin-top: 30px;
}

:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper),
.wp-block-search__button {
    border-color: #F8F1EA;
}

label.wp-block-search__label {
    font-family: inherit;
    font-weight: 700;
    color: #2B2B2B;
}

.woostify-tag-on-sale {
    background: #4B4036;
}

a.loop-add-to-cart-on-image.ajax_add_to_cart {
    transform: translate(-50%, 200%);
}


/* ================================
   HEADER
================================ */

.main-navigation .primary-navigation {
    text-align: center;
}


/* ================================
   PRODUCT LIST
================================ */

ul.products {
    display: flex;
    flex-wrap: wrap;
}


/* ================================
   SINGLE PRODUCT
================================ */

.product-images {
    background: #FFF;
}


/* ================================
   BLOG PAGE
================================ */

.blog .post-loop .entry-header-item img {
    max-height: 248px;
    object-fit: cover;
}

span.post-read-more a {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none !important;
}

.post-loop .entry-header {
    text-align: left;
}

.blog .entry-summary {
    text-align: left;
    padding: 0 !important;
}


/* ================================
   SINGLE BLOG
================================ */

.post-loop .post-cover-image img {
    max-height: 460px;
}

.related-box .related-post img {
    width: 100%;
}


/* ================================
   FOOTER
================================ */

ul.wp-block-social-links {
    padding: 0;
}

.wp-block-social-links a.wp-block-social-link-anchor {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wp-block-social-links a.wp-block-social-link-anchor svg {
    fill: #B2A69B;
}

.footer-widget .wp-block-heading.has-text-color.has-link-color {
    font-weight: 400;
}

/* ================================
   PLAYFAIR DISPLAY FONT OVERRIDE
================================ */

/* Apply Playfair Display to all headings (h1 to h6) and major text */
h1, h2, h3, h4, h5, h6,
.wp-block-heading,
.footer-widget .wp-block-heading,
.woocommerce-loop-product__title {
    font-family: 'Playfair Display', serif !important;
}



/* FULLSCREEN HERO - HEADER HEIGHT ADJUSTMENT */

.cb-fullscreen-hero {
    width: 100%;
    min-height: calc(100vh - 66px) !important;
    overflow: hidden;
    background-size: cover !important;
    background-position: center center !important;
}

/* Mobile optimization */
@media (max-width: 767px) {
    .cb-fullscreen-hero {
        width: 100%;
        min-height: calc(100svh - 60px) !important;
        overflow: hidden;
        background-size: cover !important;
        background-position: center center !important;
    }

    .cb-fullscreen-hero .elementor-background-slideshow__slide__image {
        background-size: cover !important;
        background-position: center center !important;
    }
}



/* CHAI BISCUIT - CHECKOUT PAGE DESIGN */

/* Main checkout background and width */
body.woocommerce-checkout {
    background: #faf8f4;
}

body.woocommerce-checkout .wp-block-woocommerce-checkout {
    max-width: 1200px;
    margin: 35px auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Checkout sections */
body.woocommerce-checkout .wc-block-checkout__main,
body.woocommerce-checkout .wc-block-checkout__sidebar {
    background: #ffffff;
    border: 1px solid #eee8df;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(55, 40, 25, 0.045);
}

/* Section headings */
body.woocommerce-checkout .wc-block-components-title,
body.woocommerce-checkout .wc-block-checkout__order-summary-title {
    color: #38291f;
    font-size: 20px;
    font-weight: 600;
}

/* Form labels */
body.woocommerce-checkout .wc-block-components-text-input label,
body.woocommerce-checkout .wc-block-components-combobox label {
    color: #514237;
    font-weight: 500;
}

/* Input fields */
body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-combobox input,
body.woocommerce-checkout .wc-block-components-address-form input,
body.woocommerce-checkout .wc-block-components-address-form select {
    border: 1px solid #ded5ca !important;
    border-radius: 7px !important;
    background: #fff !important;
    min-height: 48px;
    box-shadow: none !important;
}

/* Input focus */
body.woocommerce-checkout .wc-block-components-text-input input:focus,
body.woocommerce-checkout .wc-block-components-address-form input:focus {
    border-color: #8b6749 !important;
    outline: none;
}

/* Payment methods */
body.woocommerce-checkout .wc-block-components-radio-control-accordion-option {
    border-radius: 8px;
    border: 1px solid #e7dfd5;
    margin-bottom: 10px;
    padding: 14px;
}

/* Place order button */
body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
    background: #38291f !important;
    color: #ffffff !important;
    border-radius: 7px !important;
    min-height: 52px;
    font-weight: 600;
    transition: background 0.2s ease;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover {
    background: #684a34 !important;
}

/* Order summary */
body.woocommerce-checkout .wc-block-components-order-summary {
    color: #38291f;
}

/* Links */
body.woocommerce-checkout a {
    color: #795538;
}

/* Mobile layout */
@media (max-width: 768px) {
    body.woocommerce-checkout .wp-block-woocommerce-checkout {
        margin: 15px auto;
        padding: 12px;
    }

    body.woocommerce-checkout .wc-block-checkout__main,
    body.woocommerce-checkout .wc-block-checkout__sidebar {
        padding: 16px;
        border-radius: 10px;
    }
}


/* CHAI BISCUIT - ORDER CONFIRMATION PAGE */

/* Main confirmation container */
.woocommerce-order {
    max-width: 1100px;
    margin: 35px auto !important;
    padding: 25px;
    background: #ffffff;
    border: 1px solid #eee8df;
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(55, 40, 25, 0.045);
    color: #38291f;
}

/* Order received message */
.woocommerce-notice--success,
.woocommerce-order-received .woocommerce-thankyou-order-received {
    background: #f7f3ed;
    color: #38291f;
    border: 1px solid #e9dfd2;
    border-radius: 9px;
    padding: 18px 22px;
    font-size: 16px;
    line-height: 1.7;
    font-weight: 500;
    margin-bottom: 25px;
}

/* Order overview */
.woocommerce-order-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 25px 0 35px !important;
    padding: 0 !important;
}

.woocommerce-order-overview li {
    background: #faf8f4;
    border: 1px solid #eee8df;
    border-radius: 9px;
    padding: 16px !important;
    margin: 0 !important;
    float: none !important;
    list-style: none !important;
    font-size: 13px;
    line-height: 1.7;
}

.woocommerce-order-overview strong {
    display: block;
    color: #38291f;
    font-size: 15px;
    margin-top: 5px;
}

/* Section headings */
.woocommerce-order h2,
.woocommerce-order h3 {
    color: #38291f;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.4;
    margin: 28px 0 16px;
}

/* Order details table */
.woocommerce-order table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #eee8df;
    border-radius: 9px;
    overflow: hidden;
}

.woocommerce-order table th,
.woocommerce-order table td {
    padding: 14px 16px;
    border-bottom: 1px solid #eee8df;
    font-size: 14px;
    color: #514237;
    text-align: left;
}

.woocommerce-order table th {
    background: #f7f3ed;
    color: #38291f;
    font-weight: 600;
}

/* Addresses */
.woocommerce-customer-details {
    margin-top: 30px;
}

.woocommerce-customer-details address {
    background: #faf8f4;
    border: 1px solid #eee8df;
    border-radius: 9px;
    padding: 20px !important;
    line-height: 1.9;
    color: #514237;
    font-size: 14px;
}

/* Bank transfer information */
.woocommerce-order-details,
.woocommerce-customer-details {
    margin-bottom: 30px;
}

/* WhatsApp instruction box from our PHP snippet */
.woocommerce-order > div[style*="background"] {
    border-radius: 12px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .woocommerce-order {
        margin: 15px 12px !important;
        padding: 16px;
    }

    .woocommerce-order-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .woocommerce-order-overview li {
        padding: 12px !important;
    }

    .woocommerce-order h2,
    .woocommerce-order h3 {
        font-size: 18px;
    }

    .woocommerce-order table th,
    .woocommerce-order table td {
        padding: 10px;
        font-size: 13px;
    }
}


/* Fix Billing and Shipping Address Overlap */

.woocommerce-order .woocommerce-customer-details {
    display: block;
    width: 100%;
    clear: both;
    margin-top: 40px !important;
    overflow: hidden;
}

.woocommerce-order .woocommerce-columns {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    margin: 0 !important;
}

.woocommerce-order .woocommerce-column {
    float: none !important;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.woocommerce-order .woocommerce-column address {
    width: 100%;
    min-height: 150px;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    margin: 0;
}

@media (max-width: 600px) {
    .woocommerce-order .woocommerce-columns {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}


/* Homepage banner height adjustment */
.home .elementor-section:first-of-type,
.home .elementor-top-section:first-of-type {
    min-height: calc(100vh - 66px) !important;
}

@media (max-width: 767px) {
    .home .elementor-section:first-of-type,
    .home .elementor-top-section:first-of-type {
        min-height: calc(100svh - 60px) !important;
    }
}


/* ==========================================
   CHAI BISCUIT - PREMIUM BLOG POST DESIGN
   Applies to all individual blog posts
========================================== */

/* Main blog content area */
body.single-post .site-content {
    background: #faf8f4;
    padding: 45px 20px 70px;
}

body.single-post .site-content > .container {
    max-width: 1160px;
    margin-left: auto;
    margin-right: auto;
}

/* Article container */
body.single-post article,
body.single-post .site-main article {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    background: #ffffff;
    padding: 35px 45px;
    border: 1px solid #eee8df;
    border-radius: 14px;
    box-sizing: border-box;
}

/* Blog title */
body.single-post .entry-title {
    color: #38291f;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(30px, 4vw, 43px);
    line-height: 1.2;
    font-weight: 600;
    margin: 0 0 15px;
    letter-spacing: -0.5px;
}

/* Post information */
body.single-post .entry-meta,
body.single-post .posted-on,
body.single-post .byline {
    color: #938477;
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 25px;
}

/* Featured image */
body.single-post .post-thumbnail {
    width: 100%;
    margin: 0 0 28px;
    overflow: hidden;
    border-radius: 10px;
}

body.single-post .post-thumbnail img,
body.single-post .wp-post-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    border-radius: 10px;
}

/* Article text */
body.single-post .entry-content {
    color: #514237;
    font-size: 16px;
    line-height: 1.85;
    overflow-wrap: break-word;
}

body.single-post .entry-content p {
    margin: 0 0 20px;
}

/* Article headings */
body.single-post .entry-content h2 {
    color: #38291f;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.3;
    font-weight: 600;
    margin: 38px 0 15px;
}

body.single-post .entry-content h3 {
    color: #684a34;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(21px, 2.5vw, 27px);
    line-height: 1.4;
    margin: 30px 0 12px;
}

body.single-post .entry-content h4 {
    color: #38291f;
    font-size: 19px;
    line-height: 1.5;
    margin: 25px 0 10px;
}

/* Links */
body.single-post .entry-content a {
    color: #795538;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

body.single-post .entry-content a:hover {
    color: #38291f;
}

/* Lists */
body.single-post .entry-content ul,
body.single-post .entry-content ol {
    padding-left: 25px;
    margin: 15px 0 25px;
}

body.single-post .entry-content li {
    margin-bottom: 9px;
    line-height: 1.8;
}

/* Images inside articles */
body.single-post .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 9px;
}

/* Tables */
body.single-post .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 14px;
}

body.single-post .entry-content th,
body.single-post .entry-content td {
    padding: 12px;
    border: 1px solid #eee8df;
    text-align: left;
}

body.single-post .entry-content th {
    background: #f7f3ed;
    color: #38291f;
}

/* Blockquotes */
body.single-post .entry-content blockquote {
    margin: 25px 0;
    padding: 18px 24px;
    background: #f7f3ed;
    border-left: 4px solid #8b6749;
    color: #68594d;
    border-radius: 5px;
}

/* Bottom article spacing */
body.single-post .entry-footer {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid #eee8df;
    color: #938477;
    font-size: 13px;
}

/* ==========================================
   TABLET RESPONSIVENESS
========================================== */

@media (max-width: 1024px) {
    body.single-post article,
    body.single-post .site-main article {
        max-width: 100%;
        padding: 30px;
    }

    body.single-post .site-content {
        padding: 35px 18px 55px;
    }
}

/* ==========================================
   MOBILE RESPONSIVENESS
========================================== */

@media (max-width: 767px) {
    body.single-post .site-content {
        padding: 20px 12px 40px;
    }

    body.single-post article,
    body.single-post .site-main article {
        padding: 20px 17px;
        border-radius: 10px;
    }

    body.single-post .entry-title {
        font-size: 29px;
        line-height: 1.3;
        margin-bottom: 12px;
    }

    body.single-post .entry-meta {
        font-size: 12px;
        margin-bottom: 18px;
    }

    body.single-post .post-thumbnail {
        margin-bottom: 22px;
    }

    body.single-post .post-thumbnail img,
    body.single-post .wp-post-image {
        max-height: 350px;
    }

    body.single-post .entry-content {
        font-size: 15px;
        line-height: 1.8;
    }

    body.single-post .entry-content p {
        margin-bottom: 17px;
    }

    body.single-post .entry-content h2 {
        font-size: 25px;
        margin-top: 30px;
    }

    body.single-post .entry-content h3 {
        font-size: 21px;
        margin-top: 25px;
    }

    body.single-post .entry-content h4 {
        font-size: 18px;
    }

    body.single-post .entry-content table {
        display: block;
        overflow-x: auto;
    }

    body.single-post .entry-content blockquote {
        padding: 15px 17px;
    }
}

/* Small mobile screens */
@media (max-width: 380px) {
    body.single-post article,
    body.single-post .site-main article {
        padding: 17px 14px;
    }

    body.single-post .entry-title {
        font-size: 26px;
    }

    body.single-post .entry-content {
        font-size: 14px;
    }
}


/* =====================================
   CHAI BISCUIT - GLOBAL RESPONSIVENESS
===================================== */

/* Consistent box sizing */
body,
body * {
    box-sizing: border-box;
}

/* Prevent horizontal overflow */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Responsive images and videos */
img,
video,
iframe {
    max-width: 100%;
}

img {
    height: auto;
}

/* Prevent long text from breaking layouts */
p,
h1,
h2,
h3,
h4,
h5,
h6,
a {
    overflow-wrap: break-word;
}

/* Consistent content readability */
.site-content {
    color: #514237;
}

/* Responsive tables */
table {
    max-width: 100%;
}

@media (max-width: 767px) {
    /* Better mobile text readability */
    .site-content p {
        line-height: 1.75;
    }

    /* Prevent oversized headings */
    .site-content h1 {
        font-size: clamp(26px, 7vw, 34px);
    }

    .site-content h2 {
        font-size: clamp(23px, 6vw, 29px);
    }

    /* Keep media within screen */
    .site-content img,
    .site-content video,
    .site-content iframe {
        max-width: 100%;
    }
}


/* Chai Biscuit - Shop Page Desktop Alignment Fix */

@media (min-width: 1024px) {

    /* Hide unused WooCommerce shop sidebar */
    body.post-type-archive-product #secondary,
    body.tax-product_cat #secondary,
    body.post-type-archive-product .widget-area,
    body.tax-product_cat .widget-area {
        display: none !important;
    }

    /* Expand and center shop content */
    body.post-type-archive-product #primary,
    body.tax-product_cat #primary,
    body.post-type-archive-product .content-area,
    body.tax-product_cat .content-area {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin: 0 auto !important;
    }

    /* Center the product listing */
    body.post-type-archive-product ul.products,
    body.tax-product_cat ul.products {
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}
