/* ==========================================================
   Tab Showcase Widget — tsw.css
   ========================================================== */

.tsw-wrap *,
.tsw-wrap *::before,
.tsw-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.tsw-wrap {
    width: 100%;
    background: #fdf6f0;
    font-family: inherit;
    overflow: hidden;
}

/* ==========================================================
   TAB BAR — desktop
   ========================================================== */
.tsw-tabbar-outer {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border-bottom: 1px solid #e8d9c8;
    position: relative;
}

.tsw-tabbar-viewport {
    flex: 1 1 0%;
    overflow: hidden;           /* hides non-visible tabs */
    min-width: 0;
}

.tsw-tabbar {
    display: flex;
    align-items: stretch;
    width: 100%;
    transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Each tab */
.tsw-tab {
    flex: 1 1 0%;
    min-width: 0;
    padding: 22px 16px;
    background: transparent;
    border: none;
    border-right: 1px solid #ddd0c8;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #6b5c4e;
    cursor: pointer;
    text-align: center;
    transition: background 250ms ease, color 250ms ease;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.4;
}

.tsw-tab:last-child { border-right: none; }

.tsw-tab:hover {
    background: rgba(160, 120, 64, 0.05);
    color: #6b3d2e;
}

.tsw-tab.is-active {
    background: #f7e8e4;
    color: #6b3d2e;
    position: relative;
}

/* Pink underline on active tab */
.tsw-tab.is-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #e8a0a0;
}

/* Prev / Next arrows */
.tsw-arrow {
    flex: 0 0 44px;
    width: 44px;
    background: transparent;
    border: none;
    color: #a07840;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 200ms ease;
    font-family: inherit;
    padding: 0;
}

.tsw-arrow:hover { background: rgba(160, 120, 64, 0.08); }

.tsw-arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

/* ==========================================================
   CONTENT PANELS
   ========================================================== */
.tsw-panels {
    position: relative;
}

.tsw-panel {
    display: none;
    flex-direction: row;
    align-items: stretch;
}

.tsw-panel.is-active {
    display: flex;
}

/* Left: image — 55% */
.tsw-panel-image-wrap {
    flex: 0 0 55%;
    width: 55%;
    overflow: hidden;
    position: relative;
}

.tsw-panel-image {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
    transition: opacity 400ms ease, transform 400ms ease;
}

.tsw-panel-image--placeholder {
    background: linear-gradient(135deg, #f0e6dc 0%, #e8d9c8 100%);
    height: 420px;
}

/* Fade-out edge on image right side */
.tsw-panel-image-wrap::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 100%;
    background: linear-gradient(to right, transparent, #fdf6f0);
    pointer-events: none;
}

/* Right: content — 45% */
.tsw-panel-content {
    flex: 0 0 45%;
    width: 45%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 52px;
}

.tsw-content-heading-wrap {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 20px;
}

.tsw-content-dash {
    font-size: 22px;
    color: #a07840;
    line-height: 1;
    flex-shrink: 0;
}

.tsw-content-heading {
    font-size: clamp(20px, 2.2vw, 32px);
    font-weight: 300;
    letter-spacing: 0.12em;
    color: #3d2e26;
    line-height: 1.2;
}

.tsw-content-desc {
    font-size: 15px;
    line-height: 1.8;
    color: #5a4a3a;
    margin-bottom: 32px;
    max-width: 440px;
}

.tsw-btn {
    display: inline-block;
    padding: 14px 28px;
    background: #a07840;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    align-self: flex-start;
    transition: background 250ms ease, opacity 250ms ease;
    font-family: inherit;
}

.tsw-btn:hover { opacity: 0.85; }

/* Panel transition */
.tsw-panel {
    animation: none;
}
.tsw-panel.is-active {
    animation: tswFadeIn 350ms ease forwards;
}

@keyframes tswFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   MOBILE DROPDOWN BAR — hidden on desktop
   ========================================================== */
.tsw-mob-bar    { display: none; }
.tsw-mob-bar *  { box-sizing: border-box; }

.tsw-mob-dropdown {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #a07840;
    color: #ffffff;
    border: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
}

.tsw-mob-chevron {
    font-size: 20px;
    line-height: 1;
    transition: transform 250ms ease;
}

.tsw-mob-dropdown[aria-expanded="true"] .tsw-mob-chevron {
    transform: rotate(180deg);
}

/* ==========================================================
   MOBILE POPUP OVERLAY
   ========================================================== */
.tsw-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.45);
    align-items: flex-end;
    justify-content: center;
}

.tsw-popup-overlay.is-open {
    display: flex;
}

.tsw-popup {
    background: #f5f3f0;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 0 0 32px;
    border-radius: 0;
    animation: tswSlideUp 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes tswSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.tsw-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 28px 24px;
}

.tsw-popup-title {
    font-size: clamp(26px, 6vw, 36px);
    font-weight: 400;
    color: #a07840;
    letter-spacing: 0.04em;
    font-style: italic;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.2;
}

.tsw-popup-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #6b5c4e;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    font-family: inherit;
}

.tsw-popup-list {
    list-style: none;
    padding: 0;
}

.tsw-popup-item {
    padding: 18px 28px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #6b5c4e;
    border-bottom: 1px solid #e0d5cc;
    cursor: pointer;
    transition: color 200ms ease, background 200ms ease;
}

.tsw-popup-item:first-child {
    border-top: 1px solid #e0d5cc;
}

.tsw-popup-item:hover {
    background: rgba(160, 120, 64, 0.05);
}

.tsw-popup-item.is-active {
    color: #a07840;
    font-weight: 700;
}

/* ==========================================================
   MOBILE  ≤ 767px
   ========================================================== */
@media (max-width: 767px) {

    /* Hide desktop tab bar */
    .tsw-tabbar-outer { display: none; }

    /* Show mobile dropdown */
    .tsw-mob-bar { display: block; }

    /* Stack panel vertically */
    .tsw-panel {
        flex-direction: column;
    }

    .tsw-panel-image-wrap {
        flex: none;
        width: 100%;
    }

    .tsw-panel-image,
    .tsw-panel-image--placeholder {
        height: 280px !important;
    }

    /* Remove fade gradient on mobile */
    .tsw-panel-image-wrap::after { display: none; }

    .tsw-panel-content {
        flex: none;
        width: 100%;
        padding: 28px 20px 32px;
    }

    .tsw-content-desc { max-width: 100%; }

    .tsw-btn { align-self: stretch; text-align: center; }
}

/* ==========================================================
   TABLET  768px – 1024px
   ========================================================== */
@media (min-width: 768px) and (max-width: 1024px) {

    .tsw-tab { font-size: 10px; padding: 18px 10px; }

    .tsw-panel-content { padding: 32px 32px; }

    .tsw-panel-image,
    .tsw-panel-image--placeholder { height: 340px !important; }
}
