/* JOYD — CUSTOM CSS | ORGANIZED BY FEATURE */

/* ==================================================
   01 — HEADER & NAVIGATION
   ================================================== */

/* JOYD — YES-lah button vertical alignment */

@media only screen and (min-width: 1001px) {
  #header-outer.joyd-header-v3-ready
  .joyd-header-v3-menu
  > li > a[href*="/yes-lah-sale/"] {
    transform: translateY(7px) !important;
  }
}

/* ==================================================
   02 — HOMEPAGE FEATURED PRODUCTS
   ================================================== */

/* JOYD – Homepage Featured Products Set Price Badge */

.home .joyd-shop-primary-badge.joyd-shop-set-price {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;

    padding: 4px 10px !important;
    border: 1px solid #e87524 !important;
    border-radius: 5px !important;

    background: #ffffff !important;
    color: #e87524 !important;

    width: fit-content !important;
    box-sizing: border-box !important;
}

/* Ensure the amount inherits the badge styling */
.home .joyd-shop-set-price__amount {
    color: #e87524 !important;
}

/* ==================================================
   03 — SHOP & CATEGORY PAGES
   ================================================== */

#woocommerce_product_categories-2 > ul.product-categories {
  display: none !important;
}

/* ======= SET PRICE ========*/

/* Make Set Price badge shape match Pre-Order */
.joyd-shop-primary-badge.joyd-shop-set-price {
  border-radius: 5px !important;
  padding: 5px 10px !important;
}

/* "Set Price:" — normal */
.joyd-shop-set-price__label {
  font-size: 10px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
}


/* "RM259" — stronger emphasis */
.joyd-shop-set-price__amount {
  margin-left: -1px !important;

  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}


/* Info icon */
.joyd-shop-set-price__info {
  margin-left: 4px !important;
}

/* JOYD — MOBILE CATEGORY HEADER FONT SIZES */
@media only screen and (max-width: 767px) {

	body #page-header-bg {
    padding-top: 50px !important;
		padding-bottom: 50px !important;
  }
	
  /* Category title (h1) */
  body #page-header-bg .span_6 h1 {
    font-size: 28px !important;
    line-height: 1.2 !important;
  }

  /* Category description */
  body #page-header-bg .span_6 span.subheader.joyd-category-subtitle {
    font-size: 12px !important;
    line-height: 1.0px !important;
  }
}

/* JOYD — MOBILE: REDUCE GAP BELOW CATEGORY HEADER */
@media only screen and (max-width: 767px) {
  body .container-wrap {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  body .container-wrap > .container.main-content {
    padding-top: 0 !important;
    margin-top: -50px !important;
  }

}

/* ==================================================
   04 — SINGLE PRODUCT PAGE
   ================================================== */

	/* =================================
   SINGLE PRODUCT — ATOME POSITION
====================================*/

.single-product .summary .atome-wc-price-divider {
  margin-top: -32px !important;
  margin-bottom: 15px !important;
}

/* Atome installment price only */
.single-product .atome-wc-price-divider .atome-price,
.single-product .atome-wc-price-divider .atome-price .woocommerce-Price-amount {
  font-weight: 700 !important;
}

/* =============================
   SET PRICE — CLOSER TO MAIN PRICE
============================= */

.single-product .joyd-set-price-offer {
  margin-top: -28px !important;
}

.single-product .joyd-info-block .stock.in-stock.joyd-hinlim-stock-line 
{
  color: #4A2E19 !important;
	font-weight: 300 !important;
}


.single-product .joyd-info-block .stock.joyd-hinlim-stock-line::before {
  background: #4A2E19 !important;
}

.single-product .joyd-pto-badge
{
	border-radius: 4px !important;
}

.joyd-whatsapp-inquiry {
	padding-bottom: 14px;
}

/* ==================================================
   JOYD — HIDE DUPLICATE ATOME INSTALMENT WIDGET
   Single product page only
   ================================================== */

body.single-product .summary .atome-price-divider.atome-widget {
    display: none !important;
}

/* ==================================================
   05 — PRODUCT COMPARISON
   ================================================== */

/* JOYD - Hide comparison tray on comparison page*/
body.page #joyd-cmp-page ~ #joyd-cmp-tray {
	display: none !important;
}

body:has(#joyd-cmp-page) #joyd-cmp-tray {
	display: none !important;
}

.joyd-compare-eta {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    color: #8a7664;
}

/* ==========================================
   JOYD — Compare Reveal Inside Product Card
   ========================================== */

.woocommerce ul.products li.product {
    position: relative;
}

/* Product details */
.woocommerce ul.products li.product .product-meta {
    position: relative;
    overflow: visible !important;
}

/* Hidden button takes up no space initially */
.woocommerce ul.products li.product .joyd-cmp-loop-add {
    position: static !important;
    display: block !important;
    box-sizing: border-box !important;

    width: 100% !important;
    max-width: none !important;

    height: 0 !important;
    min-height: 0 !important;
    padding: 0 12px !important;
    margin: 0 !important;

    overflow: hidden !important;
    border-width: 0 !important;
    border-radius: 7px !important;

    background: #795640 !important;
    color: #fff !important;

    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: none !important;

    transition: height .2s ease,
                padding .2s ease,
                margin .2s ease,
                opacity .2s ease !important;
}

/* Reveal the button within the card */
@media (hover: hover) {
    .woocommerce ul.products li.product:hover
    .joyd-cmp-loop-add,
    .woocommerce ul.products li.product:focus-within
    .joyd-cmp-loop-add {
        height: 34px !important;
        padding: 9px 12px !important;
        margin-top: 10px !important;

        border-width: 1px !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
}

/* Selected product */
.woocommerce ul.products li.product
.joyd-cmp-loop-add[aria-pressed="true"] {
    background: #f7f0e8 !important;
    color: #795640 !important;
    border-color: #795640 !important;
}

/* Touchscreen devices */
@media (hover: none) {
    .woocommerce ul.products li.product .joyd-cmp-loop-add {
        height: 34px !important;
        padding: 9px 12px !important;
        margin-top: 10px !important;
        border-width: 1px !important;

        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        touch-action: manipulation;
    }
}


/* JOYD — Mobile Compare Button Single-Tap Fix */

@media (hover: none), (pointer: coarse) {

    .woocommerce ul.products li.product .joyd-cmp-loop-add {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;

        touch-action: manipulation !important;
        cursor: pointer !important;

        position: relative !important;
        z-index: 50 !important;

        transform: none !important;
        transition: none !important;
    }

    .woocommerce ul.products li.product .product-meta {
        position: relative !important;
        z-index: 2;
    }
}



/* JOYD — Mobile Compare Button Alignment Fix */

@media (max-width: 767px) {

    /* Keep the product details within the card */
    .woocommerce ul.products li.product .product-meta {
        box-sizing: border-box !important;
        min-width: 0 !important;
    }

    /* Straight, full-width compare button */
    .woocommerce ul.products li.product .joyd-cmp-loop-add {
        position: static !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;

        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;

        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;

        margin: 10px 0 0 !important;
        padding: 9px 6px !important;

        height: auto !important;
        min-height: 34px !important;

        transform: none !important;
        text-align: center !important;
        white-space: normal !important;
        line-height: 1.3 !important;
        font-size: 10px !important;

        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }

    .woocommerce ul.products li.product
    .joyd-cmp-loop-add .joyd-cmp-add-label {
        display: inline-block !important;
        text-align: center !important;
    }
}


/* ==========================================
   JOYD — Tablet Compare Button Alignment
   ========================================== */

@media (min-width: 768px) and (max-width: 1199px) and (pointer: coarse) {

    /* Keep product details within each card */
    .woocommerce ul.products li.product .product-meta {
        position: relative !important;
        box-sizing: border-box !important;
        min-width: 0 !important;
    }

    /* Fix compare button position on iPad */
    .woocommerce ul.products li.product .joyd-cmp-loop-add {
        position: static !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;

        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;

        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;

        margin: 12px 0 0 !important;
        padding: 10px 8px !important;

        height: auto !important;
        min-height: 36px !important;

        transform: none !important;
        text-align: center !important;
        white-space: normal !important;
        line-height: 1.3 !important;

        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }

    .woocommerce ul.products li.product
    .joyd-cmp-loop-add .joyd-cmp-add-label {
        display: inline-block !important;
        text-align: center !important;
    }
}

/* ==================================================
   06 — COUPON SELECTOR
   ================================================== */

/* JOYD — Coupon Selector Design Polish */

/* Default coupon card */
.joyd-coupon-card {
    border: 1px solid #e8ded3;
    border-radius: 10px;
    padding: 14px;
    background: #fff;
    transition: border-color .2s ease, background .2s ease;
}

/* Available coupon */
.joyd-coupon-card:not(.is-unavailable):not(.is-applied) {
    border-color: #dfc9b5;
}

/* Warm chocolate-brown Apply button */
.joyd-coupon-apply:not(:disabled) {
    background: #795640 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 7px !important;
    padding: 9px 15px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    transition: background .2s ease;
}

.joyd-coupon-apply:not(:disabled):hover {
    background: #60412e !important;
}

/* Ineligible coupon */
.joyd-coupon-card.is-unavailable {
    background: #faf9f7;
    border-color: #eee9e3;
    opacity: 1;
}

.joyd-coupon-card.is-unavailable .joyd-coupon-apply {
    background: #ebe7e2 !important;
    color: #a29a92 !important;
}

/* Applied coupon */
.joyd-coupon-card.is-applied {
    border-color: #b9d4bf;
    background: #fbfdfb;
}

.joyd-coupon-card.is-applied .joyd-coupon-apply {
    background: #e5f0e7 !important;
    color: #3e7650 !important;
}

/* Coupon text */
.joyd-coupon-title {
    font-size: 13px;
    font-weight: 600;
}

.joyd-coupon-code {
    font-size: 10px;
    color: #947c67;
}

.joyd-coupon-description,
.joyd-coupon-status {
    line-height: 1.6;
}

/* Mobile */
@media (max-width: 480px) {
    .joyd-coupon-card {
        padding: 12px;
    }

    .joyd-coupon-apply {
        padding: 8px 11px !important;
    }
}

/* JOYD — Mobile Coupon Touch Improvements */

.joyd-coupon-apply {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 36px;
}

.joyd-coupon-card {
    -webkit-tap-highlight-color: transparent;
}

/* ==================================================
   07 — CHECKOUT
   ================================================== */

.woocommerce-checkout-review-order-table {
	padding: 1px 1px !important;
}

/* ========================================
   JOYD — Checkout Coupon Accordion Polish
   ======================================== */

/* Full-width clickable accordion */
.woocommerce-form-coupon-toggle
.woocommerce-info.joyd-checkout-coupon-toggle {
    position: relative;
    cursor: pointer;
    padding: 15px 48px 15px 18px !important;
    border: 1px solid #e8ded3 !important;
    border-radius: 9px !important;
    background: #fffaf5 !important;
    transition: border-color .2s ease;
}

/* Heading text */
.joyd-checkout-coupon-toggle .showcoupon {
    color: #302820 !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

/* Accordion arrow */
.joyd-checkout-coupon-toggle::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid #302820;
    border-bottom: 1.5px solid #302820;
    transform: translateY(-65%) rotate(45deg);
    transition: transform .2s ease;
    pointer-events: none;
}

/* Rotate arrow when expanded */
.joyd-checkout-coupon-toggle.is-open::after {
    transform: translateY(-25%) rotate(225deg);
}

/* Keyboard accessibility */
.joyd-checkout-coupon-toggle:focus-visible {
    outline: 2px solid #795640;
    outline-offset: 3px;
}

/* Checkout coupon panel */
.woocommerce form.checkout_coupon {
    border: 1px solid #e8ded3 !important;
    border-radius: 9px !important;
    background: #fff !important;
    padding: 16px !important;
    margin-top: 10px !important;
}

/* Slightly tighter coupon cards */
.joyd-checkout-coupon-list {
    gap: 9px;
    margin-bottom: 15px;
}

.joyd-checkout-coupon-card {
    padding: 12px 14px;
}

/* Manual coupon input */
.woocommerce form.checkout_coupon
input[name="coupon_code"] {
    border-radius: 7px !important;
}

/* Mobile */
@media (max-width: 767px) {
    .woocommerce form.checkout_coupon {
        padding: 12px !important;
    }

    .joyd-checkout-coupon-card {
        padding: 12px;
    }
}

/* ==================================================
   08 — MY ACCOUNT / LOGIN & REGISTER
   ================================================== */

/* Fix mobile Login and Register header overlap */
@media only screen and (max-width: 999px) {
    body.woocommerce-account:not(.logged-in) .container-wrap {
        padding-top: 60px !important;
    }
}

/* ==================================================
   09 — SHOWROOM & CONTACT
   ================================================== */

.joyd-location-address {
	margin: 0px !important;
}

.joyd-location-phone {
	margin: 0px !important;
}

.joyd-showroom-hero-btn {
	padding: 4px 0px 20px 10px !important;
	
}
.joyd-showroom-hero-arrow {
	padding: 10px 2px 2px 0px !important;
}

.joyd-showroom-btn {
	padding: 0px 0px 25px 10px !important;
}

.joyd-showroom-arrow {
	padding: 20px 2px 2px  !important;
}

.joyd-visit-contact {

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 50px 20px 35px 25px;
}

/* ==================================================
   10 — WARRANTY, PAYMENT PLAN & DELIVERY
   ================================================== */

.joyd-warranty-intro-content h4 {
	padding-top: 20px !important;
}

.joyd-warranty-section-title {
	font-size: 20px;
}

.joyd-payment-plan__price {
	margin-bottom: -10px !important;
	margin-top: -5px;
}

.joyd-smooth-delivery-main > .joyd-smooth-delivery {
    margin: 0 !important;
    padding: 1px 1px !important;

}

/* ==================================================
   11 — FAQ
   ================================================== */

.joyd-faq-heading-intro {
	margin-top: 30px !important;
	margin-right: 60px !important;
}

.joyd-take-note p {
	font-weight: 800 !important;
}

.joyd-take-note-main {
	margin-bottom: -50px !important;
	margin-top: -10px !important;
}

.joyd-faq-question-text {
	padding-bottom: 18px !important;
}

.joyd-faq-question-icon {
	padding-bottom: 10px !important;
}

/* ==================================================
   12 — LIVE SEARCH
   ================================================== */

/* =====================================================
   JOYD — LIVE SEARCH AVAILABILITY BADGES
   ===================================================== */

.joyd-live-search-item__image {
    position: relative !important;
    display: block;
}

/* Shared badge styling */
.joyd-live-search-item__preorder,
.joyd-live-search-item__soldout {
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 5;

    display: inline-block;
    padding: 3px 6px;

    font-family: "Gotham", Arial, sans-serif !important;
    font-size: 7px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    letter-spacing: .03em;

    border-radius: 3px;
}

/* Pre-Order */
.joyd-live-search-item__preorder {
    background: #F7EFE5;
    color: #A65B2D;
}

/* Sold Out */
.joyd-live-search-item__soldout {
    background: #EAE7E1;
    color: #625D55;
}

/* ==================================================
   13 — FOOTER
   ================================================== */

.joyd-footer-brand-logo {
	height: auto !important;
	width: 80px !important;
	margin-bottom: -10px !important;
}


/* ==========================================
   JOYD — FOOTER PAYMENT LOGO ALIGNMENT
   ========================================== */

.joyd-footer-payment-logos {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

/* Consistent logo height */
.joyd-footer-payment-logos img {
    width: auto !important;
    height: 20px !important;
    max-width: 55px;
    object-fit: contain;
    vertical-align: middle;
}

/* Remove extra paragraph spacing */
.joyd-footer-payment-logos p {
    margin: 0 !important;
    line-height: 1;
    display: flex;
    align-items: center;
}

/* Slightly reduce GrabPay */
.joyd-footer-payment-logos img[alt*="Grab"] {
    margin-top: -20px !important;
}

.joyd-footer-payment-logos img[alt*="Atome"] {
    height: 30px !important;
}

