/* =======================================================
   JulMar – Front Page Hero + Featured Slider (STABLE)
   ======================================================= */

/* -------------------------------------------------------
   Global sizing variables (single source of truth)
   ------------------------------------------------------- */
:root {
    --julmar-slide-width: 260px;   /* card width */
    --julmar-slide-gap: 1.5rem;
    --julmar-inner-width: 230px;   /* image + text column */
}

/* =======================================================
   Hero Layout (CSS Grid)
   ======================================================= */

.julmar-front-hero {
    width: 100%;
    overflow-x: hidden;
}

.julmar-hero-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;

    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* =======================================================
   Slider viewport
   ======================================================= */

.julmar-hero-slider {
    justify-self: start;
    max-width: 100%;
    overflow: hidden; /* hard clamp against hero text */
}

.julmar-slider {
    box-sizing: border-box;

    /* calibrated width (you tuned this to ~3 cards) */
    width: calc(
        (var(--julmar-slide-width) * 3) +
        (var(--julmar-slide-gap) * 2)
    );

    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;

    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* =======================================================
   CROSS-BROWSER SCROLLBAR FIX (Edge / Firefox parity)
   ======================================================= */

/* Firefox */
.julmar-slider {
    scrollbar-width: none;
}

/* Edge / IE */
.julmar-slider {
    -ms-overflow-style: none;
}

/* Chrome / Edge (Chromium) */
.julmar-slider::-webkit-scrollbar {
    display: none;
}

/* =======================================================
   Slider track
   ======================================================= */

.julmar-slider-track {
    display: flex;
    gap: var(--julmar-slide-gap);
    width: max-content;
    justify-content: flex-start;
}

/* =======================================================
   Individual product card
   ======================================================= */

.julmar-slide {
    flex: 0 0 var(--julmar-slide-width);
    max-width: var(--julmar-slide-width);

    display: flex;
    flex-direction: column;

    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;

    transition: transform 0.25s ease;
}

.julmar-slide:hover {
    transform: translateY(-4px);
}

/* =======================================================
   INNER CONTENT COLUMN (key visual fix)
   ======================================================= */

.julmar-slide > * {
    max-width: var(--julmar-inner-width);
    margin-left: auto;
    margin-right: auto;
}

/* =======================================================
   Product image
   ======================================================= */

.julmar-slide img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 200px;

    object-fit: contain;
    border-radius: 6px;
}

/* =======================================================
   Product title & price
   ======================================================= */

.julmar-slide-title {
    width: 100%;
    max-width: 100%;

    font-size: 1rem;
    line-height: 1.25;
    margin: 0.5rem 0 0.25rem;

    font-weight: inherit;
    text-align: center;
}

.julmar-slide-title a {
    display: block;
    width: 100%;
    max-width: 100%;

    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;

    font-size: inherit;
    line-height: inherit;
}

.julmar-slide-price {
    font-weight: 600;
    color: #2a7a2a;
    margin-bottom: 0.25rem;
}

/* =======================================================
   Hero Text
   ======================================================= */

.julmar-hero-text h1,
.julmar-hero-text h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.julmar-hero-text p {
    margin-bottom: 1.25rem;
}

.julmar-hero-button {
    display: inline-block;
    background: #4b2ea8;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
}

.julmar-hero-meta {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* =========================================
   SEARCH RESULTS – REMOVE FIXED IMAGE BOX
   ========================================= */

.search li.product figure,
.search li.product .woocommerce-loop-product__link {
    aspect-ratio: auto !important;
    padding-bottom: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
}

.search li.product figure {
    position: static !important;
}

.search li.product img.wp-post-image {
    position: static !important;
    width: 100%;
    height: auto !important;
    max-height: 330px;
    object-fit: contain !important;
    display: block;
    margin: 0 auto 0.5rem;
}

.search li.product h2,
.search li.product .woocommerce-loop-product__title {
    margin-top: 0 !important;
}

/* =======================================================
   REMOVE ONLY BLOCK-INSERTED SEARCH (NOT HEADER SEARCH)
   ======================================================= */

main .wp-block-search,
.woocommerce .wp-block-search,
.search-results .wp-block-search,
.shop .wp-block-search {
    display: none !important;
}

/* =======================================================
   Mobile behaviour (TEMPORARY SAFE MODE)
   ======================================================= */

@media (max-width: 768px) {

    .julmar-hero-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .julmar-hero-slider {
        display: none !important;
    }
}
/* === JulMar AI: Compact default state === */
#julmar-chat {
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  cursor: pointer;
  transition: all 0.25s ease;
}

/* Header acts as the button */
#julmar-chat-header {
  height: 56px;
  line-height: 56px;
  text-align: center;
  font-size: 12px;
  padding: 0 !important;
  white-space: nowrap;
}

/* Hide messages & input until expanded */
#julmar-chat-messages,
#julmar-chat input {
  display: none;
}
