/* =========================================================
   Optivanse Post Widgets — Elementor
   ========================================================= */

.opw-card,
.opw-hcard,
.opw-gcard {
    background: #F5F7FB;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform .25s ease, box-shadow .25s ease;
}

.opw-card:hover,
.opw-hcard:hover,
.opw-gcard:hover {
    transform: translateY(-2px);
}

.opw-card__img,
.opw-hcard__img,
.opw-gcard__img {
    display: block;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-decoration: none;
    color: transparent;
}

.opw-card__cat,
.opw-hcard__cat,
.opw-gcard__cat {
    color: #E11D2A;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .04em;
    margin-bottom: 8px;
}

.opw-card__title,
.opw-hcard__title,
.opw-gcard__title {
    color: #111827;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 10px;
}

.opw-card__title a,
.opw-hcard__title a,
.opw-gcard__title a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}

.opw-card__excerpt,
.opw-hcard__excerpt,
.opw-gcard__excerpt {
    color: #4B5563;
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 12px;
}

.opw-card__meta,
.opw-hcard__meta,
.opw-gcard__meta {
    color: #9CA3AF;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.opw-dot { opacity: .7; }

/* =========================================================
   1. FEATURED SPLIT
   ========================================================= */
.opw-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.opw-split__right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.opw-split__left .opw-card {
    height: 100%;
}
.opw-split__left .opw-card__img {
    width: 100%;
    height: 380px;
}
.opw-split__left .opw-card__body {
    padding: 20px;
}

.opw-card--sm {
    flex-direction: row;
    align-items: stretch;
    flex: 1;
}
.opw-card--sm .opw-card__img {
    width: 140px;
    flex: 0 0 140px;
    height: 120px;
    min-height: 120px;
    border-radius: 12px 0 0 12px;
}
.opw-card--sm .opw-card__body {
    padding: 16px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.opw-card--sm .opw-card__title { font-size: 17px; margin-bottom: 6px; }

@media (max-width: 768px) {
    .opw-split { grid-template-columns: 1fr; }
    .opw-card--sm { flex-direction: row; }
    .opw-card--sm .opw-card__img { width: 110px; flex: 0 0 110px; }
}

/* =========================================================
   2. POST CAROUSEL
   ========================================================= */
.opw-carousel { position: relative; }
.opw-carousel__viewport { overflow: hidden; }
.opw-carousel__track {
    display: flex;
    gap: 20px;
    transition: transform .5s cubic-bezier(.4,.15,.2,1);
    will-change: transform;
}

.opw-hcard {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    align-items: stretch;
}
.opw-hcard__img {
    width: 180px;
    flex: 0 0 180px;
    height: 200px;
    border-radius: 12px 0 0 12px;
}
.opw-hcard__body {
    padding: 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.opw-hcard__title { font-size: 18px; margin-bottom: 8px; }
.opw-hcard__excerpt { font-size: 14px; margin-bottom: 10px; }

.opw-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #111827;
    font-size: 16px;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    transition: background .2s, transform .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.opw-arrow:hover { transform: translateY(-50%) scale(1.06); }
.opw-arrow--prev { left: -18px; }
.opw-arrow--next { right: -18px; }
.opw-arrow[disabled] { opacity: .4; cursor: default; }

.opw-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}
.opw-dots span {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #D1D5DB;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.opw-dots span.is-active {
    background: #E11D2A;
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .opw-hcard { flex-direction: column; }
    .opw-hcard__img { width: 100%; flex: 0 0 auto; height: 180px; border-radius: 12px 12px 0 0; }
}

/* =========================================================
   3. POST GRID
   ========================================================= */
.opw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.opw-gcard__img { width: 100%; height: 220px; }
.opw-gcard__body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.opw-gcard__title { font-size: 18px; }

@media (max-width: 992px) { .opw-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .opw-grid { grid-template-columns: 1fr; } }

/* =========================================================
   4. DEALS GRID
   ========================================================= */
.opw-deals { width: 100%; }

.opw-deals__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* Toolbar (tabs + sort) */
.opw-deals__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.opw-deals__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
}
.opw-deals__tab {
    appearance: none;
    background: #FFFFFF;
    color: #374151;
    border: 1px solid #E5E7EB;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
    line-height: 1.2;
}
.opw-deals__tab:hover { border-color: #9CA3AF; }
.opw-deals__tab.is-active {
    background: #111827;
    color: #FFFFFF;
    border-color: #111827;
}
.opw-deals__sort-select {
    appearance: none;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 999px;
    padding: 8px 32px 8px 14px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.opw-deals__header-left { display: flex; flex-direction: column; gap: 4px; }
.opw-deals__eyebrow {
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6B7280;
}
.opw-deals__title {
    position: relative;
    margin: 0;
    padding-left: 14px;
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
}
.opw-deals__title::before {
    content: "";
    position: absolute;
    left: 0; top: 2px; bottom: 2px;
    width: 4px;
    border-radius: 4px;
    background: #E11D2A;
}
.opw-deals__viewall {
    font-weight: 600;
    text-decoration: none;
    color: #E11D2A;
    font-size: 14px;
    white-space: nowrap;
}
.opw-deals__viewall:hover { text-decoration: underline; }

.opw-deals__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.opw-deal {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
}
.opw-deal:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.06); }

.opw-deal__media {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}
.opw-deal__img {
    display: block;
    width: 100%;
    height: 170px;
    background-color: #F3F4F6;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-decoration: none;
    color: transparent;
    border-radius: 8px;
}
.opw-deal__img--empty { background: #F3F4F6; border-radius: 8px; }

.opw-deal__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #E11D2A;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: .02em;
    text-transform: uppercase;
    line-height: 1.2;
}

.opw-deal__fav {
    position: absolute;
    top: 10px; right: 10px;
    width: 32px; height: 32px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #6B7280;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    transition: color .2s, transform .2s;
}
.opw-deal__fav:hover { color: #E11D2A; transform: scale(1.05); }

.opw-deal__body {
    padding: 12px 2px 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.opw-deal[data-hidden="1"] { display: none !important; }

.opw-deal__brand {
    position: relative;
    padding-left: 14px;
    color: #E11D2A;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}
.opw-deal__brand::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    width: 6px; height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: #E11D2A;
}

.opw-deal__title {
    margin: 0 0 10px;
    color: #111827;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}
.opw-deal__title a {
    color: inherit;
    text-decoration: none;
}
.opw-deal__title a:hover { color: #E11D2A; }

.opw-deal__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.opw-deal__chip {
    display: inline-flex;
    align-items: center;
    background: #F3F4F6;
    color: #374151;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    line-height: 1.2;
}

.opw-deal__cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #E11D2A;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 8px;
    transition: background .2s, transform .1s;
}
.opw-deal__cta:hover { background: #B91825; }
.opw-deal__cta:active { transform: translateY(1px); }

@media (max-width: 1024px) {
    .opw-deals__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .opw-deals__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .opw-deals__grid { grid-template-columns: 1fr; }
}
