/*
Theme Name: PNG Park Astra Child
Theme URI: https://pngpark.com
Description: Dedicated child theme for PNG Park based on Astra, features modern and minimal UI.
Author: PNG Park
Author URI: https://pngpark.com
Template: astra
Version: 1.0.0
*/

/* ==========================================================================
   CSS Variables & Foundations
   ========================================================================== */
:root {
    --primary-color: #4F46E5; /* Indigo 600 */
    --primary-hover: #4338CA;
    --bg-color: #F9FAFB;
    --card-bg: #FFFFFF;
    --text-main: #111827;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }

/* ==========================================================================
   Hero Section
   ========================================================================== */
.home-hero {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: #fff;
    padding: 80px 20px;
    text-align: center;
    border-radius: 0 0 40px 40px;
    margin-bottom: 40px;
}

.home-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: #fff;
}

.home-hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 30px auto;
    opacity: 0.9;
}

.hero-search-form {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.hero-search-form input[type="search"] {
    width: 100%;
    padding: 16px 24px;
    border-radius: 50px;
    border: none;
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
    outline: none;
}

.hero-search-form button {
    position: absolute;
    right: 8px;
    top: 8px;
    padding: 10px 24px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.hero-search-form button:hover {
    background: var(--primary-hover);
}

/* ==========================================================================
   Category Grid
   ========================================================================== */
.category-section {
    padding: 40px 0;
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}
.cat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}
.cat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ==========================================================================
   PNG Image Grid
   ========================================================================== */
.png-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.png-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s;
    position: relative;
}

.png-card:hover {
    transform: translateY(-5px);
}

.png-card-img-wrap {
    background: #f0f0f0 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><rect width="10" height="10" fill="%23fff"/><rect x="10" y="10" width="10" height="10" fill="%23fff"/><rect x="10" width="10" height="10" fill="%23e5e7eb"/><rect y="10" width="10" height="10" fill="%23e5e7eb"/></svg>');
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.png-card img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

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

.png-card-content {
    padding: 20px;
}

.png-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.png-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* ==========================================================================
   Single PNG Page
   ========================================================================== */
.single-png-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding: 40px 0;
}

@media (max-width: 991px) {
    .single-png-layout {
        grid-template-columns: 1fr;
    }
}

.single-png-preview {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><rect width="10" height="10" fill="%23fff"/><rect x="10" y="10" width="10" height="10" fill="%23fff"/><rect x="10" width="10" height="10" fill="%23e5e7eb"/><rect y="10" width="10" height="10" fill="%23e5e7eb"/></svg>');
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    box-shadow: var(--shadow-sm);
}

.single-png-preview img {
    max-width: 100%;
    height: auto;
}

.single-png-sidebar {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 40px;
}

.single-png-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.btn-download {
    display: block;
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    padding: 16px;
    text-align: center;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    margin-bottom: 30px;
    transition: all 0.2s;
}

.btn-download:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-download .icon {
    margin-right: 8px;
}

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

.meta-details li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.meta-details li strong {
    color: var(--text-main);
}
.meta-details li span {
    color: var(--text-muted);
}

.tags-list {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-badge {
    background: var(--bg-color);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    border: 1px solid var(--border-color);
}
.tag-badge:hover {
    background: var(--border-color);
}

.ad-placeholder {
    background: #E5E7EB;
    color: #9CA3AF;
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    border-radius: var(--radius);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    border: 1px dashed #9CA3AF;
}
