/* Lagom Pro order form — premium pricing UI. RTL/Gulf aware.
   Scoped under .lp-store so nothing leaks into the rest of WHMCS. */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

.lp-store {
    --lp-accent: #C5A059; /* Homepage Accent Gold */
    --lp-accent-2: #00BFFF; /* Homepage Tech Cyan */
    --lp-accent-dark: #004D40; /* Homepage Primary Teal */
    --lp-ink: #0B132B; /* Homepage Bg Dark */
    --lp-muted: #64748b;
    --lp-line: #e2e8f0;
    --lp-bg: #f8fafc;
    --lp-radius: 24px;
    margin: 6px 0 44px;
    font-family: 'Cairo', sans-serif;
}

.lp-store-row { position: relative; }
.lp-cat-toggle { margin: 0 0 16px; }
.lp-cat-col { margin-bottom: 22px; }

/* Heading */
.lp-store-head { text-align: center; margin: 4px 0 40px; }
.lp-store-title {
    font-size: 36px; font-weight: 800; color: var(--lp-ink); margin: 0 0 12px;
    line-height: 1.3;
}
.lp-store-tagline { color: var(--lp-muted); font-size: 16px; margin: 0; max-width: 600px; margin: 0 auto; }

/* ---- Card grid ---- */
.lp-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    align-items: stretch;
}

@media (max-width: 768px) {
    .lp-grid {
        gap: 15px;
    }
    .lp-card {
        max-width: 100% !important; /* Allow full width on mobile */
    }
    .lp-card-head { padding: 20px 15px 10px !important; }
    .lp-card-name { font-size: 24px !important; }
    .lp-card-price { padding: 10px 15px 20px !important; }
    .lp-price-main { font-size: 32px !important; }
}

.lp-card {
    flex: 1 1 280px;
    max-width: 340px; /* Slim limit on desktop */
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 1;
    margin-bottom: 30px;
}
.lp-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    z-index: 2;
}
.lp-card-featured { 
    transform: scale(1.05);
    z-index: 2;
}
.lp-card-featured:hover {
    transform: scale(1.05) translateY(-10px);
}


/* Featured corner ribbon */
.lp-ribbon {
    position: absolute; top: 16px; inset-inline-end: -34px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, var(--lp-accent), var(--lp-accent-dark));
    width: 140px; text-align: center;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}
.lp-ribbon span {
    display: block; color: #fff; font-size: 11px; font-weight: 800;
    letter-spacing: 1px; padding: 6px 0; text-transform: uppercase;
}

/* Head */
.lp-card-head { 
    text-align: center; 
    padding: 30px 30px 10px; 
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}
.lp-card-featured .lp-card-head {
    background: linear-gradient(135deg, #00b4db, #00838f);
}
.lp-card-name { font-size: 28px; font-weight: 800; color: #fff; margin: 0 0 8px; }
.lp-card-tag { font-size: 14px; color: rgba(255,255,255,0.75); margin: 0; }

/* Price */
.lp-card-price {
    text-align: center;
    padding: 10px 18px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}
.lp-card-featured .lp-card-price {
    background: linear-gradient(135deg, #00b4db, #00838f);
}
.lp-price-from { display: block; font-size: 13px; color: rgba(255,255,255,0.8); margin-bottom: 4px; text-transform: uppercase; font-weight: 600;}
.lp-price-main {
    display: inline-block; font-size: 40px; font-weight: 800;
    color: #fff;
    line-height: 1.15;
}
.lp-card-featured .lp-price-main {
    color: #fff;
}
.lp-price-sub { display: block; font-size: 14px; color: rgba(255,255,255,0.9); margin-top: 6px; font-weight: 600;}

/* Body (features + full description) */
.lp-card-body { padding: 24px 30px 12px; flex: 1 1 auto; }
.lp-features { list-style: none; padding: 0; margin: 0 0 16px; }
.lp-features li {
    font-size: 14px; color: #334155;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    display: flex; align-items: center; gap: 12px;
    border-radius: 8px;
    transition: background 0.2s;
}
.lp-features li:nth-child(odd) {
    background: rgba(248, 250, 252, 0.6);
}
.lp-features li:hover {
    background: rgba(212, 175, 55, 0.05);
}
.lp-features li:last-child { border-bottom: 0; }
.lp-fi { 
    color: var(--lp-accent); 
    flex: 0 0 auto; 
    font-size: 14px;
    background: rgba(212, 175, 55, 0.1);
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
}
.lp-fv { font-weight: 800; color: var(--lp-ink); font-size: 15px; }

/* Plan details are stored in the product description */
.lp-desc {
    white-space: pre-line;
    font-size: 15px;
    line-height: 2.4;
    color: var(--lp-ink);
    font-weight: 700;
    margin: 0;
    word-break: break-word;
    background: linear-gradient(145deg, rgba(248, 250, 252, 0.8), #ffffff);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(0, 77, 64, 0.05);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
}
.lp-desc::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, var(--lp-accent), var(--lp-accent-2));
}
.lp-desc.js-formatted-list::before {
    display: none;
}
[dir="rtl"] .lp-desc::before {
    left: auto;
    right: 0;
}
.lp-features + .lp-desc { margin-top: 16px; border-top: none; }
/* Footer button */
.lp-card-foot { padding: 16px 30px 32px; margin-top: auto; }
.lp-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--lp-ink); color: #fff !important;
    font-weight: 700; font-size: 16px;
    padding: 15px 24px; border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.lp-btn:hover {
    background: #fff;
    color: var(--lp-ink) !important;
    border-color: var(--lp-ink);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(10, 17, 40, 0.15);
}
.lp-card-featured .lp-btn {
    background: linear-gradient(135deg, var(--lp-accent), var(--lp-accent-dark));
    color: #fff !important;
    border: none;
}
.lp-card-featured .lp-btn:hover {
    background: linear-gradient(135deg, var(--lp-accent-dark), var(--lp-accent));
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.3);
    color: #fff !important;
}

.lp-btn-i { font-size: 13px; transition: transform 0.3s ease; }
.lp-btn:hover .lp-btn-i { transform: translateX(-4px); }

.lp-btn-disabled {
    background: #e2e8f0; color: var(--lp-muted) !important; cursor: not-allowed;
    border: none;
}
.lp-btn-disabled:hover { background: #e2e8f0; transform: none; box-shadow: none; color: var(--lp-muted) !important; border: none; }

/* Included-with-plans */
.lp-included {
    margin-top: 48px; background: #ffffff;
    border: 1px solid var(--lp-line); border-radius: var(--lp-radius);
    padding: 32px 40px;
    box-shadow: 0 10px 40px rgba(10, 17, 40, 0.03);
}
.lp-included-head { font-size: 20px; font-weight: 800; color: var(--lp-ink); margin: 0 0 20px; }
.lp-included-list {
    list-style: none; padding: 0; margin: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 28px;
}
.lp-included-list li { font-size: 15px; color: #334155; display: flex; align-items: center; gap: 10px;}
.lp-included-list .lp-fi { color: var(--lp-accent); font-size: 16px;}
.lp-empty { grid-column: 1 / -1; }

.lp-btn-load-more:hover {
    background: var(--lp-accent-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3) !important;
}

/* Sidebar Styling */
.sidebar .panel-sidebar, #lpCategorySidebar .panel-sidebar {
    background: #ffffff;
    border: 1px solid var(--lp-line);
    border-radius: var(--lp-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(10, 17, 40, 0.05);
    margin-bottom: 24px;
}
.sidebar .panel-heading, #lpCategorySidebar .panel-heading {
    background: var(--lp-bg);
    padding: 18px 24px;
    border-bottom: 1px solid var(--lp-line);
}
.sidebar .panel-title, #lpCategorySidebar .panel-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--lp-ink);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar .panel-title i, #lpCategorySidebar .panel-title i {
    color: var(--lp-accent-dark);
}
.sidebar .list-group, #lpCategorySidebar .list-group {
    margin: 0;
    padding: 0;
}
.sidebar .list-group-item, #lpCategorySidebar .list-group-item {
    border: none;
    border-bottom: 1px dashed var(--lp-line);
    padding: 14px 24px;
    color: #475569;
    font-weight: 600;
    font-size: 15px;
    display: block;
    transition: all 0.3s ease;
    background: transparent;
}
.sidebar .list-group-item:last-child, #lpCategorySidebar .list-group-item:last-child {
    border-bottom: none;
}
.sidebar .list-group-item:hover, #lpCategorySidebar .list-group-item:hover {
    background: #f8fafc;
    color: var(--lp-accent-dark);
    padding-inline-start: 28px;
}
.sidebar .list-group-item.active,
.sidebar .list-group-item.active:hover,
#lpCategorySidebar .list-group-item.active,
#lpCategorySidebar .list-group-item.active:hover {
    background: linear-gradient(135deg, var(--lp-ink), #1e3a8a);
    color: #fff;
    border-color: transparent;
    padding-inline-start: 24px;
}

@media (max-width: 991px) {
    .lp-cat-col { display: none; }
    .lp-cat-col.lp-cat-open { display: block; }
}

/* RTL / Arabic (Gulf) */
[dir="rtl"] .lp-store { direction: rtl; }
[dir="rtl"] .lp-features li,
[dir="rtl"] .lp-desc { text-align: right; }
[dir="rtl"] .lp-ribbon { inset-inline-end: auto; inset-inline-start: -34px; transform: rotate(-45deg); }
[dir="rtl"] .lp-btn-i { transform: scaleX(-1); }
[dir="rtl"] .lp-btn:hover .lp-btn-i { transform: scaleX(-1) translateX(4px); }
