/* =========================================================
   ST Demo Importer — Templates Pages (Premium & Free)
   Color palette: #3B3664 | #FF8534 | #FFDF73 | #DCDCDE | #777
   ========================================================= */

/* ---- Page wrapper ---------------------------------------- */
.wrap {
    padding: 20px 20px 40px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ---- Page header ----------------------------------------- */
.stdi-page-header {
    background: #3B3664;
    border-radius: 10px;
    padding: 32px 36px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.stdi-page-header-text h1 {
    font-size: 26px;
    font-weight: 700;
    color: #FFDF73;
    margin: 0 0 6px;
    line-height: 1.2;
}
.stdi-page-header-text p {
    font-size: 14px;
    color: rgba(255,255,255,.75);
    margin: 0;
}
.stdi-page-header-badge {
    background: #FF8534;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .2s;
}
.stdi-page-header-badge:hover {
    opacity: .85;
    color: #fff;
}

/* ---- Legacy centred heading (kept for compat) ------------ */
.stdi-html-content {
    text-align: center;
    margin-bottom: 30px;
}
.stdi-html-content h2 {
    font-size: 30px;
    font-weight: 700;
    color: #3B3664;
    margin-bottom: 8px;
}
.stdi-html-content p {
    font-size: 16px;
    color: #777;
}

/* ---- Legacy banner (free themes page still uses it) ----- */
.stdi-hover-image-container {
    text-align: center;
    margin-bottom: 36px;
    position: relative;
}
.stdi-hover-image {
    width: 100%;
    max-width: 1024px;
    height: auto;
    border-radius: 10px;
    border: 1px solid #DCDCDE;
    box-shadow: 0 4px 18px rgba(59,54,100,.12);
    transition: transform .3s ease, box-shadow .3s ease;
}
.stdi-hover-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 28px rgba(59,54,100,.2);
}

/* ---- Bundle promo strip (premium page) ------------------ */
.stdi-bundle-strip {
    display: flex;
    align-items: center;
    gap: 0;
    background: linear-gradient(135deg, #3B3664 0%, #2a2549 100%);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(59,54,100,.22);
    min-height: 200px;
}
.stdi-bundle-strip-text {
    flex: 1;
    padding: 40px 44px;
    position: relative;
    z-index: 1;
}
.stdi-bundle-strip-text::before {
    content: '';
    position: absolute;
    top: -50px; left: -50px;
    width: 200px; height: 200px;
    background: rgba(255,223,115,.06);
    border-radius: 50%;
    pointer-events: none;
}
.stdi-bundle-tag {
    display: inline-block;
    background: #FF8534;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.stdi-bundle-strip-text h2 {
    font-size: 24px;
    font-weight: 800;
    color: #FFDF73;
    margin: 0 0 10px;
    line-height: 1.25;
}
.stdi-bundle-strip-text p {
    font-size: 13.5px;
    color: rgba(255,255,255,.72);
    line-height: 1.6;
    margin: 0 0 22px;
    max-width: 420px;
}
.stdi-bundle-cta {
    display: inline-block;
    background: #FF8534;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 7px;
    text-decoration: none !important;
    transition: background .2s, transform .15s;
}
.stdi-bundle-cta:hover {
    background: #e6722a;
    transform: translateY(-1px);
    color: #fff !important;
}
.stdi-bundle-strip-image {
    flex: 0 0 55%;
    max-width: 55%;
    overflow: hidden;
    align-self: stretch;
    display: flex;
    align-items: center;
}
.stdi-bundle-strip-image a {
    display: block;
    width: 100%;
}
.stdi-bundle-strip-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
    display: block;
    transition: transform .4s ease;
}
.stdi-bundle-strip-image img:hover {
    transform: scale(1.03);
}
@media (max-width: 860px) {
    .stdi-bundle-strip { flex-direction: column; }
    .stdi-bundle-strip-image { flex: none; max-width: 100%; width: 100%; max-height: 260px; }
    .stdi-bundle-strip-text { padding: 32px 28px; }
}

/* ---- Card grid ------------------------------------------ */
.stdi-grid-card {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
}

/* ---- Individual theme card ------------------------------ */
.stdi-templates {
    background-color: #fff;
    border: 1px solid #DCDCDE;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(59,54,100,.07);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
    width: calc(25% - 21px) !important;
    box-sizing: border-box;
    padding-right: 0 !important;
    padding-left: 0 !important;
}
.stdi-templates:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(59,54,100,.14);
}

.stdi-templates-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* ---- Thumbnail ------------------------------------------ */
.stdi-templates-inner-image-head {
    overflow: hidden;
    border-bottom: 1px solid #DCDCDE;
}
.stdi-templates-inner-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 900;
    object-fit: cover;
    transition: transform .3s ease;
    display: block;
}
.stdi-templates-inner-image:hover {
    transform: scale(1.04);
}

/* ---- Card body ------------------------------------------ */
.stdi-templates-inner-description {
    padding: 14px 16px 18px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}
.stdi-templates-inner-description h3 {
    font-size: 15px;
    font-weight: 600;
    color: #3B3664;
    margin: 0 0 12px;
}

/* ---- CTA buttons ---------------------------------------- */
.stdi-templates-inner-button {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Buy Now */
.stdi-templates-inner-button a,
.stdi-templates-inner-button-buy {
    background-color: #FF8534;
    color: #fff !important;
    padding: 7px 16px;
    text-decoration: none !important;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color .2s ease, transform .15s ease;
    border: none;
    cursor: pointer;
    line-height: 1.4;
}
.stdi-templates-inner-button a:hover,
.stdi-templates-inner-button-buy:hover {
    background-color: #e6722a;
    transform: translateY(-1px);
}

/* Demo / secondary button */
.stdi-templates-inner-button-preview {
    background-color: #3B3664 !important;
    color: #FFDF73 !important;
}
.stdi-templates-inner-button-preview:hover {
    background-color: #2e2952 !important;
}

/* Install button (free themes) */
.stdi-templates-inner-button-install {
    background-color: #3B3664 !important;
    color: #fff !important;
    min-width: 100px;
    justify-content: center;
}
.stdi-templates-inner-button-install:hover {
    background-color: #2e2952 !important;
}
.stdi-templates-inner-button-install.installed {
    background-color: #1a8f3c !important;
    cursor: default;
    pointer-events: none;
}

/* ---- Install spinner ------------------------------------ */
.stdi-install-loader {
    display: none;
    align-items: center;
    justify-content: center;
}
.stdi-install-loader .stdi-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: stdi-tmpl-spin .8s linear infinite;
}
@keyframes stdi-tmpl-spin {
    to { transform: rotate(360deg); }
}

/* ---- Welcome / info card -------------------------------- */
.stdi-card {
    background-color: #fff;
    border: 1px solid #DCDCDE;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(59,54,100,.08);
    padding: 36px 40px;
    margin: 0 0 32px;
    width: 100%;
    max-width: 1200px;
}
.stdi-card h2 {
    font-size: 22px;
    font-weight: 700;
    color: #3B3664;
    margin-bottom: 24px;
}
.welcome-image-container {
    text-align: center;
    margin-bottom: 24px;
}
.welcome-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(59,54,100,.1);
}
.stdi-card-body {
    padding: 0 20px;
}
.stdi-card-body .links a {
    display: inline-block;
    margin: 10px 12px;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background-color: #FF8534;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color .2s ease;
}
.stdi-card-body .links a:hover {
    background-color: #e6722a;
}

/* ---- Responsive ----------------------------------------- */
@media (max-width: 1100px) {
    .stdi-templates {
        width: calc(33.333% - 19px) !important;
    }
}
@media (max-width: 800px) {
    .stdi-templates {
        width: calc(50% - 14px) !important;
    }
}
@media (max-width: 600px) {
    .stdi-templates {
        width: 100% !important;
    }
    .stdi-hover-image {
        max-width: 100%;
    }
    .stdi-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
