/* templates.css - Template Marketplace Styles */

/* Template Card */
.template-card {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s ease;
}
.template-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59,130,246,0.4);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}
.template-card.premium {
    border-color: rgba(245,158,11,0.3);
}
.template-card.premium:hover {
    border-color: rgba(245,158,11,0.6);
    box-shadow: 0 12px 30px rgba(245,158,11,0.15);
}

/* Thumbnail */
.template-thumb {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #111827;
}
.template-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.template-card:hover .template-thumb img {
    transform: scale(1.05);
}
.template-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #4b5563;
    font-size: 3rem;
}

/* Badge */
.template-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
}
.template-badge.premium {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
}
.template-badge.free {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

/* Overlay */
.template-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.template-card:hover .template-overlay {
    opacity: 1;
}

/* Info */
.template-info {
    padding: 14px;
}
.template-name {
    color: #f1f5f9;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.template-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.template-seller {
    color: #94a3b8;
    font-size: 12px;
}
.template-price {
    font-weight: 800;
    font-size: 16px;
    color: #f59e0b;
}
.template-price.free-price {
    color: #10b981;
    font-size: 14px;
}
.template-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}
.cat-tag {
    background: rgba(59,130,246,0.15);
    color: #93c5fd;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}
.template-stats {
    display: flex;
    gap: 12px;
    color: #64748b;
    font-size: 11px;
}
.template-stats i {
    margin-right: 3px;
}

/* Price Units Display */
.price-units-display {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}
.price-unit {
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 8px;
    padding: 4px 10px;
    text-align: center;
}
.price-unit .unit-price {
    display: block;
    color: #f59e0b;
    font-weight: 800;
    font-size: 14px;
}
.price-unit .unit-fee {
    display: block;
    color: #ef4444;
    font-size: 9px;
}

/* Share/Sell Buttons in Editor */
.template-menu-btns {
    display: flex;
    gap: 6px;
    margin-left: 8px;
}
.template-menu-btn {
    padding: 3px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}
.template-menu-btn.share-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}
.template-menu-btn.share-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16,185,129,0.4);
}
.template-menu-btn.sell-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
}
.template-menu-btn.sell-btn:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(245,158,11,0.4);
}
.template-menu-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Price Slider */
.price-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 16px 0;
}
.price-block {
    width: 80px;
    padding: 8px;
    text-align: center;
    border-radius: 8px;
    border: 2px solid #374151;
    background: #1f2937;
    cursor: pointer;
    transition: all 0.2s ease;
}
.price-block.active {
    border-color: #f59e0b;
    background: rgba(245,158,11,0.1);
}
.price-block .pb-price {
    font-size: 18px;
    font-weight: 800;
    color: #f59e0b;
}
.price-block .pb-fee {
    font-size: 10px;
    color: #ef4444;
}
.price-block .pb-earn {
    font-size: 10px;
    color: #10b981;
}

/* Submit Template Modal */
.lang-check-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    max-height: 130px;
    overflow-y: auto;
    padding-right: 5px;
}
.lang-check-grid label {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #1f2937;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #374151;
    transition: all 0.2s;
}
.lang-check-grid label:has(input:checked) {
    border-color: #3b82f6;
    background: rgba(59,130,246,0.1);
}
.cat-check-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    max-height: 130px;
    overflow-y: auto;
    padding-right: 5px;
}
.cat-check-grid label {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    background: #1f2937;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #374151;
    transition: all 0.2s;
}
.cat-check-grid label:has(input:checked) {
    border-color: #8b5cf6;
    background: rgba(139,92,246,0.1);
}

/* Explore button on homepage */
.explore-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1, #3b82f6);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99,102,241,0.4);
}
.explore-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99,102,241,0.5);
    color: white;
}
