/* ═══════════════════════════════════════════════
   LIPAS Furniture Store — Frontend CSS v1.5
   Brand: #234435 green · #cabda1 beige · #873b2b rust
═══════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

/* ────────────────────────────────────────────
   LISTING PAGE
──────────────────────────────────────────── */
.lipas-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 20px 16px 60px;
}

/* ── FILTER BAR ── */
.lipas-filters {
    background: #fff;
    border: 1px solid #e8eeeb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 32px;
}
.lipas-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
}
.lipas-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 140px;
}
.lipas-filter-group label {
    font-size: 11px;
    font-weight: 700;
    color: #234435;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.lipas-filter-group select,
.lipas-filter-group input[type="number"] {
    padding: 9px 12px;
    border: 1.5px solid #ddd;
    border-radius: 7px;
    font-size: 13px;
    color: #333;
    background: #fafaf9;
    font-family: inherit;
    width: 100%;
}
.lipas-filter-group select:focus,
.lipas-filter-group input:focus {
    border-color: #234435;
    outline: none;
}
.lipas-filter-btn {
    padding: 10px 22px;
    background: #234435;
    color: #cabda1;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    align-self: flex-end;
}
.lipas-filter-btn:hover { background: #1a3328; }
.lipas-reset-btn {
    font-size: 12px;
    color: #234435;
    text-decoration: underline;
    padding: 10px 6px;
    cursor: pointer;
    align-self: flex-end;
    white-space: nowrap;
}

/* ── PRODUCT GRID ── */
.lipas-grid {
    display: grid;
    gap: 20px;
}
.lipas-cols-2 { grid-template-columns: repeat(2, 1fr); }
.lipas-cols-3 { grid-template-columns: repeat(3, 1fr); }
.lipas-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── PRODUCT CARD ── */
.lipas-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .2s, transform .15s;
}
.lipas-card:hover {
    border-color: #234435;
    transform: translateY(-2px);
}
.lipas-card-img-link { display: block; }
.lipas-card-img-link img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.lipas-no-img {
    height: 220px;
    background: #e8eeeb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.lipas-no-img span { color: #234435; font-size: 13px; text-align: center; }
.lipas-card-body { padding: 14px 16px 18px; }
.lipas-cat-badge {
    display: inline-block;
    background: #e8eeeb;
    color: #234435;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.lipas-card-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    margin: 0 0 5px !important;
    line-height: 1.3 !important;
}
.lipas-card-title a { color: #1a1a1a; text-decoration: none; }
.lipas-card-title a:hover { color: #234435; }
.lipas-card-excerpt {
    font-size: 12px;
    color: #888;
    margin: 0 0 10px;
    line-height: 1.5;
}
.lipas-color-dots { display: flex; gap: 5px; margin-bottom: 12px; }
.lipas-dot {
    width: 13px; height: 13px;
    border-radius: 50%;
    display: inline-block;
    border: 1.5px solid rgba(0,0,0,0.1);
}
.lipas-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.lipas-price-wrap { display: flex; align-items: baseline; gap: 6px; }
.lipas-price { font-size: 16px; font-weight: 700; color: #234435; }
.lipas-old-price { font-size: 12px; color: #aaa; text-decoration: line-through; }
.lipas-view-btn {
    background: #234435;
    color: #cabda1;
    font-size: 12px;
    padding: 7px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}
.lipas-view-btn:hover { background: #1a3328; color: #cabda1; }
.lipas-no-products {
    grid-column: 1/-1;
    text-align: center;
    color: #888;
    padding: 40px;
    font-size: 14px;
}

/* ────────────────────────────────────────────
   SINGLE PRODUCT PAGE
──────────────────────────────────────────── */
.lipas-single-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 30px 16px 60px;
}

/* Breadcrumb */
.lipas-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.lipas-breadcrumb a { color: #234435; text-decoration: none; }
.lipas-breadcrumb a:hover { text-decoration: underline; }
.lipas-breadcrumb .sep { color: #ccc; }
.lipas-breadcrumb .current { color: #333; font-weight: 500; }

/* Two-column layout */
.lipas-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
}
.lipas-gallery-col {
    background: #f5f2ec;
    padding: 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #eee;
}
.lipas-main-img {
    background: #e8eeeb;
    border-radius: 8px;
    flex: 1;
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.lipas-main-img img {
    width: 100%;
    height: 340px;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    transition: opacity .2s;
    background: #f5f2ec;
}
.lipas-zoom-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(35,68,53,.82);
    color: #cabda1;
    font-size: 10px;
    padding: 3px 9px;
    border-radius: 4px;
    cursor: pointer;
    pointer-events: all;
    user-select: none;
    z-index: 2;
    transition: background .15s;
}
.lipas-zoom-badge:hover { background: rgba(35,68,53,1); }

/* Full-width shortcode detail wrap */
.lipas-sc-detail-wrap {
    width: 100%;
}
.lipas-sc-detail-wrap .lipas-detail-layout {
    width: 100%;
}
/* WhatsApp button — ensure always visible */
.lipas-wa-btn,
.lipas-wa-btn-sc {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.lipas-thumbs {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 8px;
    margin-top: 12px;
}
.lipas-thumb {
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    height: 68px;
}
.lipas-thumb img { width: 100%; height: 100%; object-fit: contain; background: #f5f2ec; display: block; }
.lipas-thumb.active, .lipas-thumb:hover { border-color: #234435; }

.lipas-info-col {
    background: #fff;
    padding: 28px;
    display: flex;
    flex-direction: column;
}
.lipas-detail-badge {
    display: inline-block;
    background: #e8eeeb;
    color: #234435;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.lipas-detail-title {
    font-size: 26px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin: 0 0 6px !important;
    line-height: 1.3 !important;
}
.lipas-detail-sub {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.65;
}
.lipas-detail-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 18px 0;
    padding-bottom: 18px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
}
.lipas-detail-price { font-size: 28px; font-weight: 700; color: #234435; }
.lipas-detail-old-price { font-size: 15px; color: #aaa; text-decoration: line-through; }
.lipas-detail-save {
    font-size: 11px;
    background: #fef3ee;
    color: #873b2b;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 700;
}
.lipas-option-label {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    margin: 16px 0 8px;
}
.lipas-color-opts { display: flex; gap: 12px; flex-wrap: wrap; }
.lipas-col-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.lipas-col-circle {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: box-shadow .15s;
}
.lipas-col-circle.sel,
.lipas-col-btn:hover .lipas-col-circle {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #234435;
}
.lipas-col-name { font-size: 10px; color: #888; }
.lipas-fabric-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.lipas-fab-btn {
    font-size: 12px;
    padding: 7px 14px;
    border-radius: 6px;
    border: 1px solid #ddd;
    cursor: pointer;
    color: #333;
    background: #fff;
    transition: all .15s;
    font-family: inherit;
}
.lipas-fab-btn.sel,
.lipas-fab-btn:hover { background: #234435; color: #cabda1; border-color: #234435; }
.lipas-qty-row { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.lipas-qty-ctrl {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}
.lipas-qty-btn {
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #555;
    background: #f5f5f5;
    user-select: none;
    border: none;
    font-family: inherit;
}
.lipas-qty-btn:hover { background: #e8eeeb; color: #234435; }
.lipas-qty-num { width: 44px; text-align: center; font-size: 15px; font-weight: 600; color: #222; }
.lipas-stock-badge {
    font-size: 11px;
    color: #234435;
    background: #e8eeeb;
    padding: 5px 12px;
    border-radius: 4px;
    font-weight: 500;
}
.lipas-wa-btn {
    margin-top: 20px;
    width: 100%;
    padding: 15px;
    background: #25D366;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: background .15s;
}
.lipas-wa-btn:hover { background: #1da851; }
.lipas-wa-btn span { color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 0.2px; }
.lipas-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 4px;
}
.lipas-spec-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 12px;
    border-bottom: 1px solid #f5f5f5;
}
.lipas-spec-row:last-child { border-bottom: none; }
.lipas-spec-row span:first-child { color: #888; }
.lipas-spec-row span:last-child  { font-weight: 600; color: #222; }

/* Description & vision — WHITE background, contained */
.lipas-detail-desc {
    margin-top: 24px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
}
.lipas-detail-desc h3 {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #234435 !important;
    margin: 0 0 14px !important;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.lipas-detail-desc p {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    margin: 0 0 14px;
    word-break: break-word;
    overflow-wrap: break-word;
}
.lipas-vision-box {
    background: #f5f2ec;
    border-left: 3px solid #234435;
    border-radius: 0 8px 8px 0;
    padding: 14px 18px;
    font-size: 13px;
    color: #444;
    font-style: italic;
    line-height: 1.7;
    margin-top: 16px;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Related products */
.lipas-related { margin-top: 48px; }
.lipas-related h2 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 0 20px !important;
}
.lipas-related-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.lipas-related-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    display: block;
    transition: border-color .2s;
}
.lipas-related-card:hover { border-color: #234435; }
.lipas-related-card img { width: 100%; height: 140px; object-fit: cover; display: block; }
.lipas-related-no-img {
    height: 140px;
    background: #e8eeeb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #234435;
    font-size: 12px;
    padding: 10px;
    text-align: center;
}
.lipas-related-info { padding: 12px 14px; }
.lipas-related-name { font-size: 13px; font-weight: 600; color: #1a1a1a; margin: 0 0 4px; line-height: 1.3; }
.lipas-related-price { font-size: 13px; color: #234435; font-weight: 700; }

/* ────────────────────────────────────────────
   RESPONSIVE — TABLET
──────────────────────────────────────────── */
@media (max-width: 900px) {
    .lipas-cols-3,
    .lipas-cols-4 { grid-template-columns: repeat(2,1fr); }
    .lipas-related-grid { grid-template-columns: repeat(2,1fr); }
}

/* ────────────────────────────────────────────
   RESPONSIVE — MOBILE  (the fixes you need)
──────────────────────────────────────────── */
@media (max-width: 640px) {

    /* ── Filter: stack everything vertically, full width ── */
    .lipas-filter-form {
        flex-direction: column;
        gap: 12px;
    }
    .lipas-filter-group {
        width: 100%;
        min-width: unset;
    }
    .lipas-filter-group select,
    .lipas-filter-group input[type="number"] {
        width: 100%;
        font-size: 15px;     /* easier to tap */
        padding: 11px 14px;
    }
    .lipas-filter-btn {
        width: 100%;
        padding: 13px;
        font-size: 14px;
        text-align: center;
        justify-content: center;
    }
    .lipas-reset-btn {
        width: 100%;
        text-align: center;
        padding: 8px;
        display: block;
    }

    /* ── Grid: 1 column on small phones ── */
    .lipas-cols-2,
    .lipas-cols-3,
    .lipas-cols-4 { grid-template-columns: 1fr; }

    /* ── Product detail: stack gallery above info ── */
    .lipas-detail-layout {
        grid-template-columns: 1fr;
        border-radius: 10px;
    }
    .lipas-gallery-col {
        border-right: none;
        border-bottom: 1px solid #eee;
        border-radius: 10px 10px 0 0;
        padding: 14px;
    }
    .lipas-main-img { min-height: 260px; }
    .lipas-main-img img { height: 260px; }
    .lipas-info-col {
        padding: 20px 16px 24px;
        border-radius: 0 0 10px 10px;
    }
    .lipas-detail-title { font-size: 20px !important; }
    .lipas-detail-price { font-size: 22px; }

    /* ── Description: full white box, no overflow ── */
    .lipas-detail-desc {
        padding: 20px 16px;
        border-radius: 10px;
        margin-top: 16px;
    }
    .lipas-detail-desc p {
        font-size: 13px;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    .lipas-vision-box {
        padding: 12px 14px;
        font-size: 12px;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* ── Specs: 1 column ── */
    .lipas-specs-grid { grid-template-columns: 1fr; }

    /* ── Related: 2 columns ── */
    .lipas-related-grid { grid-template-columns: repeat(2,1fr); }
    .lipas-related-card img { height: 110px; }

    /* ── WhatsApp button ── */
    .lipas-wa-btn { padding: 14px; }
    .lipas-wa-btn span { font-size: 14px; }
}

@media (max-width: 380px) {
    .lipas-related-grid { grid-template-columns: 1fr; }
    .lipas-single-wrap  { padding: 16px 12px 40px; }
    .lipas-wrap         { padding: 14px 12px 40px; }
}
