/**
 * Templates Pages Styles
 * For archive-template.php and single-template.php
 */

/* ===========================
   CSS Variables
   =========================== */
:root {
    --template-primary: #ff6b6b;
    --template-secondary: #4ecdc4;
    --template-dark: #2c3e50;
    --template-light: #f8f9fa;
    --template-border: #e9ecef;
    --template-shadow: rgba(0, 0, 0, 0.1);
    --template-radius: 12px;
    --template-transition: all 0.3s ease;
}

/* ===========================
   Archive Template Styles
   =========================== */

/* Hero Section */
.template-hero {
    background: linear-gradient(135deg, var(--template-primary), var(--template-secondary));
    color: white;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.template-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff10" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.template-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.template-hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.template-hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.template-hero-title .text-gradient {
    background: linear-gradient(90deg, #fff, #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.template-hero-desc {
    font-size: 20px;
    opacity: 0.95;
    line-height: 1.6;
    margin-bottom: 10px;
}

.template-hero-count {
    font-size: 16px;
    opacity: 0.9;
}

/* Search Bar */
.template-search-wrapper {
    margin-top: 40px;
}

.template-search-form {
    max-width: 600px;
    margin: 0 auto;
}

.template-search-input-group {
    position: relative;
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.template-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

.template-search-input {
    flex: 1;
    border: none;
    padding: 18px 20px 18px 50px;
    font-size: 16px;
    outline: none;
}

.template-search-btn {
    background: var(--template-primary);
    color: white;
    border: none;
    padding: 18px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--template-transition);
}

.template-search-btn:hover {
    background: var(--template-dark);
}

/* Filters Section */
.template-filters {
    background: var(--template-light);
    padding: 30px 0;
    border-bottom: 1px solid var(--template-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.template-filters-wrapper {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.template-filter-group {
    position: relative;
}

.template-filter-toggle {
    background: white;
    border: 1px solid var(--template-border);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--template-transition);
}

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

.template-filter-toggle .arrow {
    font-size: 10px;
    transition: transform 0.3s;
}

.template-filter-toggle.active .arrow {
    transform: rotate(180deg);
}

.template-filter-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: white;
    border: 1px solid var(--template-border);
    border-radius: 8px;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 5px 20px var(--template-shadow);
    display: none;
    z-index: 10;
}

.template-filter-dropdown.show {
    display: block;
}

.filter-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    color: var(--template-dark);
    text-decoration: none;
    font-size: 14px;
    transition: var(--template-transition);
}

.filter-option:hover {
    background: var(--template-light);
}

.filter-option.active {
    background: var(--template-primary);
    color: white;
}

.filter-option .count {
    font-size: 12px;
    opacity: 0.7;
}

.template-sort-group {
    margin-left: auto;
}

.template-sort-select {
    background: white;
    border: 1px solid var(--template-border);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: var(--template-transition);
}

.template-sort-select:hover {
    border-color: var(--template-primary);
}

/* Templates Grid */
.template-grid-section {
    padding: 60px 0;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Template Card */
.template-card {
    background: white;
    border-radius: var(--template-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px var(--template-shadow);
    transition: var(--template-transition);
    display: flex;
    flex-direction: column;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--template-shadow);
}

.template-card-thumb {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
    background: var(--template-light);
}

.template-card-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.template-card:hover .template-card-thumb img {
    transform: scale(1.1);
}

.template-card-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    opacity: 0.3;
}

.template-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.template-overlay-btn {
    padding: 8px 16px;
    background: white;
    color: var(--template-dark);
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--template-transition);
}

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

.template-overlay-btn:hover {
    transform: scale(1.05);
}

.template-card-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.template-badge {
    padding: 4px 10px;
    background: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.template-badge-license {
    background: var(--template-secondary);
    color: white;
}

.template-badge-responsive {
    background: var(--template-primary);
    color: white;
}

.template-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.template-card-frameworks {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.template-framework-tag {
    padding: 3px 10px;
    background: var(--template-light);
    color: var(--template-dark);
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--template-transition);
}

.template-framework-tag:hover {
    background: var(--template-primary);
    color: white;
}

.template-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.template-card-title a {
    color: var(--template-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.template-card-title a:hover {
    color: var(--template-primary);
}

.template-card-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    flex: 1;
}

.template-card-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #999;
}

.template-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.template-card-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.template-category-tag {
    padding: 3px 10px;
    border: 1px solid var(--template-border);
    border-radius: 15px;
    font-size: 12px;
    color: #666;
    text-decoration: none;
    transition: var(--template-transition);
}

.template-category-tag:hover {
    border-color: var(--template-primary);
    color: var(--template-primary);
}

.template-card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--template-border);
}

.template-card-btn {
    display: inline-block;
    color: var(--template-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--template-transition);
}

.template-card-btn:hover {
    transform: translateX(5px);
}

/* Pagination */
.template-pagination {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

.template-pagination ul {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.template-pagination li {
    display: inline-block;
}

.template-pagination a,
.template-pagination .current {
    display: block;
    padding: 10px 15px;
    background: white;
    border: 1px solid var(--template-border);
    border-radius: 8px;
    color: var(--template-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--template-transition);
}

.template-pagination a:hover {
    border-color: var(--template-primary);
    color: var(--template-primary);
}

.template-pagination .current {
    background: var(--template-primary);
    color: white;
    border-color: var(--template-primary);
}

/* Empty State */
.template-empty {
    text-align: center;
    padding: 100px 20px;
}

.template-empty-icon {
    font-size: 72px;
    margin-bottom: 20px;
}

.template-empty h2 {
    font-size: 28px;
    color: var(--template-dark);
    margin-bottom: 10px;
}

.template-empty p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

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

.template-empty-btn:hover {
    background: var(--template-dark);
}

/* CTA Section */
.template-cta {
    background: linear-gradient(135deg, var(--template-primary), var(--template-secondary));
    padding: 80px 0;
    text-align: center;
    color: white;
}

.template-cta-content h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.template-cta-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.template-cta-btn {
    display: inline-block;
    padding: 15px 40px;
    background: white;
    color: var(--template-primary);
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: var(--template-transition);
}

.template-cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ===========================
   Single Template Styles
   =========================== */

.mytemplate-single {
    padding-top: 40px;
    background: var(--template-light);
}

/* Breadcrumb */
.mytemplate-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 14px;
    flex-wrap: wrap;
}

.mytemplate-breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

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

.mytemplate-breadcrumb span:last-child {
    color: var(--template-dark);
    font-weight: 500;
}

/* Hero Section */
.mytemplate-hero {
    background: white;
    padding: 40px 0 60px;
    border-bottom: 1px solid var(--template-border);
}

.mytemplate-hero-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.mytemplate-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--template-dark);
    margin-bottom: 15px;
    line-height: 1.2;
}

.mytemplate-excerpt {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.mytemplate-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.mytemplate-framework,
.mytemplate-license,
.mytemplate-responsive {
    padding: 6px 15px;
    background: var(--template-light);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--template-dark);
    text-decoration: none;
    transition: var(--template-transition);
}

.mytemplate-framework:hover {
    background: var(--template-primary);
    color: white;
}

/* Action Buttons */
.mytemplate-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.mytemplate-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--template-transition);
    border: 2px solid transparent;
}

.mytemplate-btn .icon {
    font-size: 18px;
}

.mytemplate-btn small {
    opacity: 0.8;
    font-weight: 400;
}

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

.mytemplate-btn-primary:hover {
    background: var(--template-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.mytemplate-btn-demo {
    background: var(--template-secondary);
    color: white;
}

.mytemplate-btn-demo:hover {
    background: #3ba59e;
    transform: translateY(-2px);
}

.mytemplate-btn-github {
    background: #333;
    color: white;
}

.mytemplate-btn-github:hover {
    background: #000;
    transform: translateY(-2px);
}

.mytemplate-btn-docs {
    background: white;
    color: var(--template-primary);
    border-color: var(--template-primary);
}

.mytemplate-btn-docs:hover {
    background: var(--template-primary);
    color: white;
}

/* Stats Cards */
.mytemplate-hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.mytemplate-stat-card {
    background: var(--template-light);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.stat-icon {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--template-dark);
}

/* Main Content Section */
.mytemplate-content {
    padding: 60px 0;
}

.mytemplate-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

/* Gallery */
.mytemplate-gallery {
    margin-bottom: 40px;
}

.mytemplate-gallery-main {
    position: relative;
    border-radius: var(--template-radius);
    overflow: hidden;
    margin-bottom: 15px;
    background: white;
    border: 1px solid var(--template-border);
}

.mytemplate-gallery-main img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
}

.mytemplate-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.mytemplate-thumb {
    position: relative;
    padding-top: 60%;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--template-transition);
    background: white;
}

.mytemplate-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mytemplate-thumb:hover,
.mytemplate-thumb.active {
    border-color: var(--template-primary);
}

/* Tabs */
.mytemplate-tabs {
    background: white;
    border-radius: var(--template-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px var(--template-shadow);
}

.mytemplate-tab-nav {
    display: flex;
    border-bottom: 1px solid var(--template-border);
    overflow-x: auto;
}

.mytemplate-tab-btn {
    padding: 15px 25px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: var(--template-transition);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    position: relative;
}

.mytemplate-tab-btn:hover {
    color: var(--template-primary);
}

.mytemplate-tab-btn.active {
    color: var(--template-primary);
}

.mytemplate-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--template-primary);
}

.mytemplate-tab-content {
    padding: 30px;
}

.mytemplate-tab-panel {
    display: none;
}

.mytemplate-tab-panel.active {
    display: block;
}

.mytemplate-content-wrapper {
    color: #444;
    line-height: 1.8;
}

.mytemplate-content-wrapper h2 {
    font-size: 24px;
    margin: 30px 0 15px;
    color: var(--template-dark);
}

.mytemplate-content-wrapper h3 {
    font-size: 20px;
    margin: 25px 0 12px;
    color: var(--template-dark);
}

.mytemplate-content-wrapper p {
    margin-bottom: 15px;
}

.mytemplate-content-wrapper ul,
.mytemplate-content-wrapper ol {
    margin: 0 0 20px 20px;
}

.mytemplate-content-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

/* Features List */
.mytemplate-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mytemplate-features-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--template-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.mytemplate-features-list li:last-child {
    border-bottom: none;
}

.feature-icon {
    color: #51cf66;
    font-size: 18px;
}

/* Details Grid */
.mytemplate-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: var(--template-light);
    border-radius: 8px;
}

.detail-label {
    font-weight: 600;
    color: #666;
}

.detail-value {
    color: var(--template-dark);
}

/* Sidebar */
.mytemplate-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.mytemplate-card {
    background: white;
    border-radius: var(--template-radius);
    box-shadow: 0 2px 10px var(--template-shadow);
    margin-bottom: 25px;
}

.card-title {
    padding: 20px;
    border-bottom: 1px solid var(--template-border);
    font-size: 16px;
    font-weight: 600;
    color: var(--template-dark);
    margin: 0;
}

.card-content {
    padding: 20px;
}

/* Download Buttons */
.mytemplate-download-full {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 15px;
    background: var(--template-primary);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--template-transition);
    margin-bottom: 15px;
}

.mytemplate-download-full:hover {
    background: var(--template-dark);
    transform: translateY(-2px);
}

.mytemplate-download-full .icon {
    font-size: 24px;
}

.mytemplate-download-full .text strong {
    display: block;
    font-size: 16px;
}

.mytemplate-download-full .text small {
    display: block;
    font-size: 12px;
    opacity: 0.9;
    margin-top: 2px;
}

.mytemplate-github-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.mytemplate-github-link:hover {
    color: var(--template-primary);
}

.download-stats {
    text-align: center;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid var(--template-border);
    color: #666;
    font-size: 14px;
}

/* Category List */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-link {
    padding: 10px 15px;
    background: var(--template-light);
    border-radius: 8px;
    color: var(--template-dark);
    text-decoration: none;
    transition: var(--template-transition);
}

.category-link:hover {
    background: var(--template-primary);
    color: white;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 5px 12px;
    background: var(--template-light);
    border-radius: 20px;
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: var(--template-transition);
}

.tag-item:hover {
    background: var(--template-secondary);
    color: white;
}

/* Support Links */
.support-link {
    display: block;
    padding: 10px 15px;
    background: var(--template-light);
    border-radius: 8px;
    color: var(--template-dark);
    text-decoration: none;
    margin-bottom: 10px;
    transition: var(--template-transition);
}

.support-link:hover {
    background: var(--template-primary);
    color: white;
}

/* Share Buttons */
.share-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.share-btn {
    padding: 8px 12px;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--template-transition);
    cursor: pointer;
    border: none;
}

.share-facebook {
    background: #1877f2;
    color: white;
}

.share-twitter {
    background: #1da1f2;
    color: white;
}

.share-copy {
    background: var(--template-light);
    color: var(--template-dark);
    grid-column: span 2;
}

.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Related Templates */
.mytemplate-related {
    background: var(--template-light);
    padding: 80px 0;
}

.mytemplate-related .section-title {
    font-size: 32px;
    text-align: center;
    margin-bottom: 50px;
    color: var(--template-dark);
}

.mytemplate-related .template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .mytemplate-layout {
        grid-template-columns: 1fr;
    }

    .mytemplate-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .mytemplate-hero-content {
        grid-template-columns: 1fr;
    }

    .mytemplate-details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .template-hero-title {
        font-size: 32px;
    }

    .template-filters-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .template-sort-group {
        margin-left: 0;
    }

    .template-grid {
        grid-template-columns: 1fr;
    }

    .mytemplate-title {
        font-size: 28px;
    }

    .mytemplate-actions {
        flex-direction: column;
    }

    .mytemplate-btn {
        width: 100%;
        justify-content: center;
    }

    .mytemplate-hero-stats {
        grid-template-columns: 1fr;
    }

    .mytemplate-sidebar {
        grid-template-columns: 1fr;
    }

    .mytemplate-tab-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .share-buttons {
        grid-template-columns: 1fr;
    }

    .share-copy {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .template-hero {
        padding: 60px 0 40px;
    }

    .template-hero-title {
        font-size: 24px;
    }

    .template-hero-desc {
        font-size: 16px;
    }

    .mytemplate-breadcrumb {
        font-size: 12px;
    }

    .mytemplate-title {
        font-size: 24px;
    }

    .mytemplate-excerpt {
        font-size: 16px;
    }

    .mytemplate-tab-content {
        padding: 20px;
    }
}

/* Loading State */
.template-loading {
    text-align: center;
    padding: 40px;
}

.template-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--template-border);
    border-top-color: var(--template-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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