/* iTechMonster Plan Builder — Frontend Styles (Light Theme) */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ── Variables ─────────────────────────────────────────────────────────── */
.itech-pb-wrap {
    --blue:         #0099d4;
    --blue-dark:    #007aad;
    --blue-light:   #e8f6fd;
    --blue-mid:     #cceef9;
    --blue-glow:    rgba(0, 153, 212, 0.15);

    --bg:           #f4f8fc;
    --bg-card:      #ffffff;
    --bg-card-sel:  #eaf6fd;

    --border:       #d8e8f4;
    --border-sel:   #0099d4;

    --text:         #1a2a3a;
    --text-muted:   #6b87a0;
    --text-bright:  #0d1f2d;

    --bar-bg:       #0c1e30;
    --bar-border:   #153045;

    --radius:       12px;
    --radius-sm:    8px;
    --font-head:    'Exo 2', sans-serif;
    --font-body:    'Inter', sans-serif;
    --transition:   0.18s ease;
}

/* ── Wrap ──────────────────────────────────────────────────────────────── */
.itech-pb-wrap {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    padding-bottom: 110px;
    -webkit-font-smoothing: antialiased;
    border-radius: var(--radius);
    overflow: hidden;
}

/* ── Header ────────────────────────────────────────────────────────────── */
.itech-pb-header {
    background: linear-gradient(135deg, #0c1e30 0%, #0f2d4a 60%, #0c1e30 100%);
    padding: 44px 32px 38px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.itech-pb-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--blue), #00d4ff, var(--blue), transparent);
}

.itech-pb-header-badge {
    display: inline-block;
    background: rgba(0, 153, 212, 0.18);
    border: 1px solid rgba(0, 153, 212, 0.35);
    color: #5dd5ff;
    font-family: var(--font-head);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding: 4px 16px;
    border-radius: 100px;
    margin-bottom: 16px;
}

.itech-pb-header h2 {
    font-family: var(--font-head);
    font-size: clamp(24px, 4vw, 38px);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px;
    line-height: 1.2;
}

.itech-pb-header p {
    color: rgba(255,255,255,0.6);
    font-size: 15px;
    margin: 0 auto;
    max-width: 460px;
}

/* ── Body ──────────────────────────────────────────────────────────────── */
.itech-pb-body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 36px 24px 24px;
}

/* ── Section ───────────────────────────────────────────────────────────── */
.itech-pb-section {
    margin-bottom: 36px;
}

.itech-pb-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-family: var(--font-head);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--blue);
}

.itech-pb-section-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Cards Grid ────────────────────────────────────────────────────────── */
.itech-pb-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
}

/* ── Card ──────────────────────────────────────────────────────────────── */
.itech-pb-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 18px 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition), background var(--transition),
                box-shadow var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
    gap: 6px;
    user-select: none;
    box-shadow: 0 1px 4px rgba(0,60,120,0.06);
}

.itech-pb-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), #00c8f0);
    opacity: 0;
    transition: opacity var(--transition);
}

.itech-pb-card:hover {
    border-color: #b0d8f0;
    box-shadow: 0 4px 20px rgba(0,153,212,0.12);
    transform: translateY(-2px);
}

.itech-pb-card.selected {
    background: var(--bg-card-sel);
    border-color: var(--blue);
    box-shadow: 0 4px 20px var(--blue-glow);
}

.itech-pb-card.selected::before {
    opacity: 1;
}

/* ── Card Header ───────────────────────────────────────────────────────── */
.itech-pb-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.itech-pb-card-icon {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
}

/* ── Toggle Switch ─────────────────────────────────────────────────────── */
.itech-pb-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.itech-pb-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.itech-pb-slider {
    position: absolute;
    inset: 0;
    background: #d8e8f0;
    border-radius: 100px;
    transition: background var(--transition);
    border: 1.5px solid #c0d8ea;
}

.itech-pb-slider::before {
    content: '';
    position: absolute;
    width: 16px; height: 16px;
    left: 3px; top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border-radius: 50%;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 1px 4px rgba(0,60,120,0.2);
}

.itech-pb-check:checked + .itech-pb-slider {
    background: var(--blue);
    border-color: var(--blue);
}

.itech-pb-check:checked + .itech-pb-slider::before {
    transform: translateX(18px) translateY(-50%);
    box-shadow: 0 1px 6px rgba(0,100,180,0.35);
}

/* ── Card Content ──────────────────────────────────────────────────────── */
.itech-pb-card-name {
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-bright);
    margin: 0;
    line-height: 1.3;
}

.itech-pb-card-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.55;
    flex: 1;
}

/* ── Card Footer ───────────────────────────────────────────────────────── */
.itech-pb-card-foot {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.itech-pb-price {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.itech-pb-price-val {
    font-family: var(--font-head);
    font-size: 19px;
    font-weight: 800;
    color: var(--blue-dark);
}

.itech-pb-price-unit {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Quantity Stepper ──────────────────────────────────────────────────── */
.itech-pb-qty {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.itech-qty-btn {
    width: 28px; height: 28px;
    background: var(--blue-light);
    border: 1.5px solid var(--blue-mid);
    border-radius: 6px;
    color: var(--blue-dark);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
    flex-shrink: 0;
    line-height: 1;
}

.itech-qty-btn:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.itech-qty-input {
    width: 44px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    color: var(--text-bright);
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    padding: 3px 4px;
    -moz-appearance: textfield;
}

.itech-qty-input::-webkit-outer-spin-button,
.itech-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.itech-qty-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* ── Selected bar ──────────────────────────────────────────────────────── */
.itech-pb-card-selected-bar {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--blue);
    border-radius: 4px 0 0 4px;
    opacity: 0;
    transition: opacity var(--transition);
}

.itech-pb-card.selected .itech-pb-card-selected-bar {
    opacity: 1;
}

/* ── Sticky Total Bar ──────────────────────────────────────────────────── */
.itech-pb-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--bar-bg);
    border-top: 2px solid var(--blue);
    z-index: 9999;
    padding: 14px 24px;
    box-shadow: 0 -6px 30px rgba(0,0,0,0.4);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.itech-pb-bar.visible {
    transform: translateY(0);
}

.itech-pb-bar-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.itech-pb-bar-summary {
    flex: 1;
    min-width: 180px;
}

.itech-pb-bar-count {
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.itech-pb-bar-breakdown {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 2px;
    flex-wrap: wrap;
}

.itech-pb-bar-monthly {
    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
}

.itech-pb-bar-monthly em {
    font-size: 13px;
    font-style: normal;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
}

.itech-pb-bar-sep {
    font-size: 16px;
    color: rgba(255,255,255,0.3);
}

.itech-pb-bar-setup {
    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
}

.itech-pb-bar-setup em {
    font-size: 12px;
    font-style: normal;
}

.itech-pb-bar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.itech-pb-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.itech-pb-btn-wa {
    background: #1b4d28;
    color: #4ade80;
    border: 1.5px solid #2a6e38;
}

.itech-pb-btn-wa:hover {
    background: #25d366;
    color: #fff;
    border-color: #25d366;
    text-decoration: none;
}

.itech-pb-btn-cart {
    background: var(--blue);
    color: #fff;
    border: 1.5px solid var(--blue);
}

.itech-pb-btn-cart:hover:not(:disabled) {
    background: #00b8f0;
    border-color: #00b8f0;
    box-shadow: 0 4px 18px rgba(0,153,212,0.4);
    text-decoration: none;
}

.itech-pb-btn-cart:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.itech-pb-btn-cart.loading {
    opacity: 0.7;
    cursor: wait;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .itech-pb-header { padding: 30px 16px 26px; }
    .itech-pb-body { padding: 24px 14px 14px; }
    .itech-pb-cards { grid-template-columns: 1fr; }
    .itech-pb-bar-monthly { font-size: 22px; }
    .itech-pb-btn { padding: 9px 16px; font-size: 13px; }
}

@media (max-width: 480px) {
    .itech-pb-bar-actions { width: 100%; }
    .itech-pb-btn { flex: 1; justify-content: center; }
}
