.template-details-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 20px 60px;
    font-family: 'Inter', -apple-system, sans-serif;
    color: #111827;
}

/* Header & Breadcrumbs */
.details-header-section {
    margin-top: 10px;
}

.breadcrumbs-nav {
    padding: 12px 16px;
    background: transparent;
    margin-bottom: 8px;
}

.breadcrumbs-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.breadcrumb-link {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.breadcrumb-link:hover {
    color: #374151;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #9ca3af;
    font-size: 14px;
}

.breadcrumb-current {
    color: #2563eb !important;
    font-weight: 600;
}

/* Layout Grid */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 80px;
}

/* Left Column: Preview */
.detail-left {
    display: flex;
    justify-content: center;
}

.main-preview-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 480px;
    /* Balanced size for vertical content */
    border: 1px solid #f3f4f6;
    padding: 20px 0px 20px 0px;
}

.video-preview-wrapper,
.image-preview-wrapper {
    width: 100%;
    aspect-ratio: 9 / 16;
    /* Standard mobile video aspect ratio */
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 80vh;
}

.detail-main-video,
.detail-main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Don't crop */
    display: block;
}

/* Right Column: Info */
.detail-right {
    margin-top: 100px;
}

.template-name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.price-box {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e5e7eb;
}

.price-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px;
}

.current-price {
    font-size: 36px;
    font-weight: 700;
}

.old-price {
    font-size: 20px;
    color: #6b7280;
    text-decoration: line-through;
}

.discount-percent {
    font-size: 14px;
    font-weight: 600;
    color: #059669;
}

.price-hint {
    font-size: 13px;
    color: #6b7280;
}

.description-section {
    margin-bottom: 40px;
    margin-top: 30px;
}

.desc-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.template-description {
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.generate-now-btn {
    background-color: #248dbd;
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    transition: opacity 0.2s;
    color: #fff;
}

.generate-now-btn:hover {
    color: #fff;
    background-color: #55a0c3;
    cursor: pointer;
}

.generate-now-btn span:first-child {
    display: block;
    font-size: 26px;
    font-weight: 600;
}

.guarantee-text {
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}

/* Recommendations (Full Width) */
.recommendations-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 60px;
}

.recommendations-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.recommendation-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.recommendation-card:hover {
    transform: translateY(-4px);
}

.rec-image {
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 9 / 12;
    margin-bottom: 12px;
    background: #f8fafc;
    /* Neutral light background for containment */
    border: 1px solid #f3f4f6;
    position: relative;
}

.rec-image img,
.rec-thumbnail,
.rec-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Prevent clipping */
    display: block;
}


.mobile-savings-bar {
    display: none;
}

/* Hide recommendation play overlay on desktop */
@media (min-width: 769px) {
    .rec-play-overlay {
        display: none !important;
    }
}

.rec-play-overlay {
    width: 32px !important;
    height: 32px !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
}

.rec-play-overlay .play-icon-symbol {
    font-size: 12px !important;
}

.rec-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.rec-price {
    font-size: 14px;
    color: #4b5563;
}

/* Mobile */
@media (max-width: 1024px) {
    .detail-layout {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .detail-layout {
        grid-template-columns: 1fr;
        gap: 32px;
        margin-bottom: 0px;
    }

    .sticky-left {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .sticky-discount {
        font-size: 13px;
        font-weight: 500;
        color: #15803d;
        /* green-700 */
        background: #ecfdf5;
        /* green-50 */
        padding: 4px 8px;
        border-radius: 6px;
        width: fit-content;
    }


    .detail-right .price-box,
    .detail-right .action-buttons {
        display: none;
    }

    .detail-right {
        margin-top: 0;
    }

    .main-preview-card {
        padding: 0px;
    }

    .detail-right {
        position: static;
    }

    .template-name {
        font-size: 28px;
    }

    .current-price {
        font-size: 32px;
    }

    .recommendations-row {
        grid-template-columns: 1fr;
        /* Single column for larger cards on mobile */
        gap: 24px;
        max-width: 400px;
        margin: 0 auto;
    }

    .recommendation-card {
        width: 100%;
    }

    /* Sticky Bottom Bar for Mobile */
    .template-details-container {
        padding-bottom: 100px;
        /* Space for sticky bar */
    }

    .mobile-sticky-footer-wrapper {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    }

    .mobile-savings-bar {
        display: block;
        background: #f0fdf4;
        /* green-50 */
        color: #166534;
        /* green-800 */
        padding: 2px 20px;
        text-align: center;
        font-size: 12px;
        font-weight: 500;
        border-top: 1px solid #dcfce7;
        /* green-100 */
    }

    .savings-amount {
        color: #15803d;
        /* green-700 */
        font-weight: 700;
    }

    .mobile-sticky-bar {
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px 24px 20px;
        border-top: 1px solid #f3f4f6;
    }

    .sticky-price-info {
        display: flex;
        flex-direction: column;
    }

    .sticky-price {
        font-size: 20px;
        font-weight: 700;
        color: #111827;
    }

    .sticky-label {
        font-size: 12px;
        color: #6b7280;
    }

    .sticky-btn {
        background: #248dbd;
        color: #fff;
        padding: 12px 28px;
        border-radius: 8px;
        font-weight: 600;
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 15px;
    }

    .sticky-btn:active {
        background: #1d729a;
    }
}

/* Hide sticky bar on desktop */
@media (min-width: 769px) {
    .mobile-sticky-bar {
        display: none !important;
    }
}