/* File: public/assets/microsites/microsite.css */

/* Alpine cloak helper */
[x-cloak] { display: none !important; }

/* Shared thin scrollbar (used by filters + cart, etc.) */
.thin-scrollbar::-webkit-scrollbar { width: 6px; }
.thin-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.7);
    border-radius: 999px;
}


/* ===========================
   Deals template ("Weekly Digital Deals")
   =========================== */

:root{
    --deal-orange: #c75a1a;
    --deal-orange-2: #d36a1f;
    --deal-border: #cbd5e1;
}

.deal-topbar{
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.deal-tabs{
    display: flex;
    gap: 6px;
    align-items: center;
    overflow-x: auto;
    padding: 6px 2px;
    flex: 1;
    min-width: 260px;
}

.deal-tab{
    white-space: nowrap;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #0f172a;
    transition: all .15s ease;
}
.deal-tab:hover{ background:#f8fafc; }
.deal-tab.active{
    border-color: rgba(199,90,26,.35);
    background: rgba(199,90,26,.08);
    color: #7c2d12;
    font-weight: 600;
}

.deal-search-wrap{
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    min-width: 280px;
}

.deal-search{
    position: relative;
    flex: 1;
    min-width: 220px;
}

.deal-search-input{
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 10px 38px 10px 14px;
    font-size: 13px;
    outline: none;
    background: #fff;
}
.deal-search-input:focus{
    border-color: rgba(199,90,26,.45);
    box-shadow: 0 0 0 4px rgba(199,90,26,.12);
}

.deal-search-clear{
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #64748b;
    background: transparent;
    border: 0;
    cursor: pointer;
}
.deal-search-clear:hover{ color:#334155; }

.deal-filters-btn{
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    transition: all .15s ease;
}
.deal-filters-btn:hover{ background:#f8fafc; }

.deal-title-banner{
    background: var(--deal-orange);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 8px 16px rgba(15,23,42,.08);
}
.deal-title-text{
    color: #fff;
    font-weight: 800;
    font-size: 28px;
    line-height: 1.1;
    text-align: center;
}

.deal-chip{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(199,90,26,.08);
    border: 1px solid rgba(199,90,26,.18);
    color: #7c2d12;
}
.deal-chip-x{
    margin-left: 4px;
    font-size: 11px;
    opacity: .8;
}
.deal-chip-x:hover{ opacity: 1; }

.deal-clear-all{
    font-size: 11px;
    color: #64748b;
    text-decoration: underline;
}
.deal-clear-all:hover{ color:#334155; }

.deal-card{
    background: #fff;
    border: 2px dotted var(--deal-border);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.deal-image-wrap{
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    padding: 10px;
}
.deal-image{
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: zoom-in;
    filter: drop-shadow(0 10px 10px rgba(15,23,42,.10));
}
.deal-image-missing{
    color: #94a3b8;
    font-size: 12px;
}

.deal-body{
    padding: 12px 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.deal-name{
    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;
    color: #0f172a;
    min-height: 28px;
}

.deal-price-row{
    display: flex;
    align-items: flex-end;
    gap: 2px;
    line-height: 1;
}
.deal-price-symbol{
    font-size: 18px;
    font-weight: 900;
    color: #0f172a;
}
.deal-price-main{
    font-size: 34px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.5px;
}
.deal-price-cents{
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
    padding-bottom: 6px; /* levanta los centavos */
}

.deal-controls{
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: auto;
}

.deal-qty{
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    gap: 8px;
    align-items: center;
    flex: 1;
}

.deal-qty-input{
    height: 34px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    font-size: 12px;
    background: #fff;
    outline: none;
}
.deal-qty-input:focus{
    border-color: rgba(199,90,26,.45);
    box-shadow: 0 0 0 4px rgba(199,90,26,.12);
}

.deal-qty-btn{
    height: 34px;
    width: 34px;
    border-radius: 999px;
    border: 1px solid rgba(199,90,26,.35);
    background: rgba(199,90,26,.08);
    color: var(--deal-orange);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: all .15s ease;
}
.deal-qty-btn:hover{ background: rgba(199,90,26,.14); }
.deal-qty-btn:disabled{
    opacity: .45;
    cursor: not-allowed;
}

.deal-barcode-btn{
    height: 34px;
    width: 34px;
    border-radius: 999px;
    border: 1px solid rgba(199,90,26,.35);
    background: rgba(199,90,26,.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .15s ease;
}
.deal-barcode-btn:hover{ background: rgba(199,90,26,.14); }

.deal-barcode-placeholder{
    height: 34px;
    width: 34px;
}

.deal-meta{
    font-size: 11px;
    color: #64748b;
}

.deal-pagination{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 0 4px;
}

.deal-page-btn{
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
}
.deal-page-btn:hover{ background:#f8fafc; }
.deal-page-btn:disabled{ opacity:.45; cursor:not-allowed; }

.deal-page-info{
    font-size: 12px;
    color: #475569;
}

/* --- Fix: prevent clipping of the + button on small screens --- */
.deal-controls { min-width: 0; }
.deal-qty { min-width: 0; width: 100%; grid-template-columns: 34px minmax(0, 1fr) 34px; }
.deal-qty-input { min-width: 0; width: 100%; }

/* When orders are disabled, align remaining controls nicely */
.deal-controls-catalog { justify-content: flex-end; }

/* Mobile tightening so nothing gets clipped */
@media (max-width: 420px) {
    .deal-controls { gap: 8px; }
    .deal-qty { grid-template-columns: 32px minmax(0, 1fr) 32px; gap: 6px; }
    .deal-qty-btn { width: 32px; height: 32px; font-size: 18px; }
    .deal-qty-input { height: 32px; }
    .deal-barcode-btn, .deal-barcode-placeholder { width: 32px; height: 32px; }
}

/* ===========================
   Deals template: compact mode when orders are disabled
   =========================== */
.deal-card-catalog{
    min-height: 0; /* overrides the 320px */
}

.deal-body-catalog{
    flex: 0;              /* key: do not stretch */
    padding-bottom: 12px; /* a bit tighter */
}

/* Optional: slightly shorter image area in catalog mode */
.deal-card-catalog .deal-image-wrap{
    height: 140px;
}

/* Price row wrap: price left + barcode right */
.deal-price-rowwrap{
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

/* Top barcode (in price row) */
.deal-barcode-btn-top,
.deal-barcode-placeholder-top{
    flex: 0 0 auto;
}

/* Qty row uses full width now */
.deal-controls-qtyonly{
    margin-top: 6px;
}
