/**
 * KARAY Digital - Theme Store Styles
 * 100% Mobile Responsive
 */

/* ========================
   Themes Page
   ======================== */
.themes-page,
.theme-detail-page {
    padding-top: var(--header-height, 80px);
}

/* Breadcrumb Wrapper - service-page ile aynı */
.page-breadcrumb-wrapper {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 0;
    font-size: 0.875rem;
    margin: 0;
}

.page-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.page-breadcrumb a:hover {
    color: var(--primary);
}

.page-breadcrumb span {
    color: var(--text-muted);
}

.page-breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

.themes-hero {
    padding: 30px 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.themes-hero .breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .current {
    color: var(--text-primary);
}

.themes-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.themes-hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Anasayfa ile aynı tema kartları */
.themes-grid-new {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Mobile responsive - 1 kart per row */
@media (max-width: 1024px) {
    .themes-grid-new {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .themes-grid-new {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Filter */
.themes-filter {
    padding: 24px 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Themes Grid */
.themes-grid-section {
    padding: 60px 0;
}

.themes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.no-themes {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

/* Theme Card */
.theme-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.theme-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(124, 58, 237, 0.15);
}

.theme-card.featured {
    border-color: rgba(245, 158, 11, 0.5);
}

.theme-link {
    display: block;
    text-decoration: none;
}

.theme-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.theme-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.theme-card:hover .theme-image img {
    transform: scale(1.05);
}

.theme-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.sale-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    text-transform: uppercase;
}

.theme-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-card:hover .theme-overlay {
    opacity: 1;
}

.preview-btn,
.demo-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.preview-btn {
    background: var(--primary);
    color: white;
}

.demo-btn {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.demo-btn:hover {
    background: white;
    color: var(--gray-dark);
}

.theme-content {
    padding: 20px;
}

.theme-category {
    display: inline-block;
    font-size: 0.6875rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.theme-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.3;
}

.theme-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.theme-tech span {
    font-size: 0.625rem;
    padding: 3px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-muted);
}

.theme-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.theme-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.old-price {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.current-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

.theme-sales {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================
   Theme Detail Page
   ======================== */
.theme-hero {
    padding: 20px 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.theme-content-section {
    padding: 50px 0;
}

.theme-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 50px;
}

/* Gallery */
.theme-gallery {
    position: sticky;
    top: calc(var(--header-height, 80px) + 20px);
    align-self: start;
}

.main-image {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--bg-tertiary);
}

.main-image img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.sale-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
}

.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.thumb {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.thumb.active {
    border-color: var(--primary);
}

.thumb:hover {
    border-color: var(--primary);
}

.thumb img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

/* Info */
.theme-info {
    position: sticky;
    top: calc(var(--header-height, 80px) + 20px);
    align-self: start;
}

.theme-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 16px;
}

.theme-info h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.2;
}

.theme-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.theme-price-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.theme-price-box .old-price {
    font-size: 1.25rem;
}

.theme-price-box .current-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.theme-stats {
    display: flex;
    gap: 24px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 24px;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.btn-demo:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-buy {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), #6d28d9);
    color: white;
    font-size: 1.0625rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tech-tags strong {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-right: 4px;
}

.tech-tag {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Details */
.theme-details-section {
    padding: 60px 0;
    background: var(--bg-secondary);
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.features-box h2,
.description-box h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.features-list li svg {
    flex-shrink: 0;
    color: #10b981;
}

.description-content {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Related */
.related-themes {
    padding: 60px 0;
}

.related-themes h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 30px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.related-theme-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-theme-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.related-theme-card img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.related-theme-info {
    padding: 16px;
}

.related-theme-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.related-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

/* ========================
   Purchase Modal
   ======================== */
.purchase-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.purchase-modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 32px;
    max-width: 450px;
    width: 100%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
}

.modal-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-theme-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 20px;
}

.modal-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9375rem;
}

.purchase-form .form-group {
    margin-bottom: 16px;
}

.purchase-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.purchase-form input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
}

.purchase-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-submit {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), #6d28d9);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
}

.secure-note {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 16px;
}

/* Order Success */
.order-success {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.order-success h3 {
    margin-bottom: 12px;
}

.order-success p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.btn-back {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
}

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 1200px) {
    .themes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .theme-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .theme-gallery,
    .theme-info {
        position: static;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .themes-hero h1 {
        font-size: 1.875rem;
    }
    
    .filter-tab {
        padding: 8px 16px;
        font-size: 0.875rem;
    }
    
    .themes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .theme-content {
        padding: 16px;
    }
    
    .theme-title {
        font-size: 0.9375rem;
    }
    
    .theme-info h1 {
        font-size: 1.5rem;
    }
    
    .theme-price-box .current-price {
        font-size: 1.5rem;
    }
    
    .thumbnail-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .themes-hero {
        padding: 30px 0;
    }
    
    .themes-hero h1 {
        font-size: 1.5rem;
    }
    
    .themes-grid {
        grid-template-columns: 1fr;
    }
    
    .theme-stats {
        gap: 16px;
        padding: 16px;
    }
    
    .modal-content {
        padding: 24px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

