/**
 * @fileoverview Plugin Marketplace Styles for Chahua Web Store
 * @description Comprehensive styling for plugin listing, search, filtering, and marketplace interface
 * @dependencies 
 *   - global.css (CSS variables and base styles)
 *   - Font Awesome icons (for ratings and UI elements)
 * @features
 *   - Plugin card grid layout with hover effects
 *   - Advanced search and filtering interface
 *   - Rating stars and pricing displays
 *   - Modal dialogs for plugin details
 *   - Responsive design for all screen sizes
 *   - Category filtering and sorting
 * @interactivity
 *   - Hover animations on plugin cards
 *   - Search input with live filtering
 *   - Modal overlays for plugin details
 *   - Category tag interactions
 * @performance 
 *   - CSS Grid for efficient layout
 *   - Optimized for large plugin lists
 *   - Smooth transitions and animations
 * @calledBy plugins.html
 * @example
 * // Plugin card structure:
 * <div class="plugin-card">
 *   <div class="plugin-header">
 *     <h3 class="plugin-title">Plugin Name</h3>
 *   </div>
 *   <div class="plugin-content">Description</div>
 * </div>
 */

/* Page Header */
.page-header {
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--text-primary), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Filter Section */
.filter-section {
    padding: 2rem 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.filter-controls {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 2rem;
    align-items: center;
}

.search-box {
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* Plugin Cards - New Dashboard Style */
#plugins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.plugin-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    position: relative;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.plugin-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 170, 255, 0.2);
    border-color: #00aaff;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-image {
    position: relative;
    height: 140px;
    overflow: hidden;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    cursor: pointer;
    border-radius: 8px 8px 0 0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.plugin-card:hover .card-image img {
    transform: scale(1.02);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-image:hover .image-overlay {
    opacity: 1;
}

.zoom-icon {
    font-size: 1.5rem;
    color: white;
    background: rgba(0, 170, 255, 0.8);
    padding: 0.5rem;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

.status-free {
    background: rgba(0, 255, 157, 0.9);
    color: #000;
    box-shadow: 0 2px 8px rgba(0, 255, 157, 0.3);
}

.status-premium {
    background: rgba(255, 193, 7, 0.9);
    color: #000;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.status-coming-soon {
    background: rgba(255, 69, 58, 0.9);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 69, 58, 0.3);
}

.card-header {
    padding: 1rem 1.5rem 0.5rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.card-category {
    display: inline-block;
    font-size: 0.75rem;
    color: #00aaff;
    background: rgba(0, 170, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 170, 255, 0.3);
    font-weight: 500;
}

.card-body {
    padding: 0 1.5rem 1rem;
}

.card-description {
    color: #b0b0b0;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.card-features {
    margin-bottom: 1rem;
}

.features-title {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    color: #b0b0b0;
    font-size: 0.8rem;
    padding: 0.2rem 0;
    position: relative;
    padding-left: 1rem;
}

.features-list li:before {
    content: '•';
    color: #00aaff;
    position: absolute;
    left: 0;
}

.features-list li.more-features {
    color: #888;
    font-style: italic;
}

.card-rating {
    margin-bottom: 1rem;
}

.rating-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-label {
    color: #888;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 4px;
}

/* ⭐ Star Rating System - Fixed Version */
.card-rating {
    margin: 1rem 0;
    padding: 0.5rem 0;
    border-top: 1px solid #333;
}

.rating-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    gap: 2px;
    justify-content: flex-start;
    align-items: center;
}

.star-rating .star {
    appearance: none;
    width: 20px;
    height: 20px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
}

.star-rating .star:before {
    content: '★';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #444;
    font-size: 18px;
    transition: all 0.3s ease;
    user-select: none;
}

/* Hover effects */
.star-rating .star:hover:before,
.star-rating .star:hover~.star:before {
    color: #ffd700;
    transform: translate(-50%, -50%) scale(1.1);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Selected state */
.star-rating .star:checked:before,
.star-rating .star:checked~.star:before {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* Focus state for accessibility */
.star-rating .star:focus {
    outline: 2px solid #00aaff;
    outline-offset: 2px;
    border-radius: 50%;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: 2% auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 0, 0, 0.7);
}

#modalImage {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 170, 255, 0.3);
}

.modal-caption {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem 2rem;
    text-align: center;
    width: 100%;
    margin-top: 1rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.modal-caption h3 {
    margin: 0;
    color: #00aaff;
    font-size: 1.2rem;
}

.card-info {
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid #333;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
}

.info-value {
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
}

.info-value.price {
    color: #00ff9d;
    font-weight: 700;
}

.card-actions {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    gap: 0.75rem;
}

.btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin: 0.25rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #00aaff, #0088cc);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 170, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0088cc, #0066aa);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 170, 255, 0.4);
}

.btn-primary.coming-soon {
    background: #666;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-primary.coming-soon:hover {
    transform: none;
    background: #666;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    #plugins-grid {
        grid-template-columns: 1fr;
        padding: 1rem 0;
    }

    .card-actions {
        flex-direction: column;
    }

    .card-image {
        height: 120px;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    #modalImage {
        max-height: 60vh;
    }

    .close-modal {
        top: -35px;
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .plugin-card {
        margin: 0 -0.5rem;
    }

    #plugins-grid {
        gap: 1rem;
    }

    .card-image {
        height: 100px;
    }

    .zoom-icon {
        font-size: 1.2rem;
        width: 2.5rem;
        height: 2.5rem;
    }

    .modal-content {
        width: 98%;
        margin: 2% auto;
    }

    #modalImage {
        max-height: 50vh;
    }
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.filter-options {
    display: flex;
    gap: 1rem;
}

.filter-select {
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.1);
}

.filter-select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Plugins Section */
.plugins-section {
    padding: 3rem 0;
}

.plugins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.plugin-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: slideInUp 0.6s ease forwards;
    display: flex;
    flex-direction: column;
}

.plugin-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.plugin-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
}

.plugin-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    filter: brightness(0.9);
    background: var(--bg-primary);
}

.plugin-image:not([src]) {
    background: linear-gradient(45deg, #333 25%, transparent 25%),
        linear-gradient(-45deg, #333 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #333 75%),
        linear-gradient(-45deg, transparent 75%, #333 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.plugin-card:hover .plugin-image {
    transform: scale(1.08);
    filter: brightness(1);
}

.plugin-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
            rgba(0, 170, 255, 0.1) 0%,
            transparent 50%,
            rgba(0, 170, 255, 0.05) 100%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.plugin-card:hover .plugin-image-container::after {
    opacity: 0.7;
}

.plugin-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.plugin-category {
    display: inline-block;
    background: rgba(0, 170, 255, 0.9);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.coming-soon-badge {
    display: inline-block;
    background: rgba(255, 152, 0, 0.9);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    text-align: center;
}

.plugin-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.plugin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.plugin-title {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.plugin-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.plugin-features {
    margin-bottom: 1.5rem;
}

.plugin-features h4 {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 0.2rem 0;
    position: relative;
    padding-left: 1rem;
}

.features-list li::before {
    content: "•";
    color: var(--accent-blue);
    position: absolute;
    left: 0;
}

.plugin-footer {
    margin-top: auto;
    padding-top: 1rem;
}

.plugin-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-blue);
    white-space: nowrap;
    margin-bottom: 0.75rem;
}

.plugin-price.free {
    color: var(--success-color);
}

/* Star Rating System - Single Unified System */
.plugin-rating {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.btn-buy {
    width: 100%;
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-buy:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.btn-buy:disabled {
    background: var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-buy.coming-soon {
    background: var(--warning-color);
    color: white;
    cursor: not-allowed;
}

.btn-buy.coming-soon:hover {
    background: var(--warning-color);
    transform: none;
    box-shadow: none;
}

/* Coming Soon Card Style */
.plugin-card:has(.coming-soon-badge) {
    opacity: 0.8;
    filter: grayscale(20%);
}

.plugin-card:has(.coming-soon-badge) .star {
    --color: #555 !important;
    cursor: not-allowed;
}

.plugin-card:has(.coming-soon-badge) .star:hover,
.plugin-card:has(.coming-soon-badge) .star:checked {
    --color: #555 !important;
    animation: none !important;
}

/* Slider Coming Soon Badge */
.price-container .coming-soon-badge {
    background: rgba(255, 152, 0, 0.9);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    text-align: center;
    margin-top: 0.5rem;
}

.load-more-container {
    text-align: center;
}

.btn-load-more {
    background: transparent;
    color: var(--accent-blue);
    border: 2px solid var(--accent-blue);
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background: var(--accent-blue);
    color: white;
    transform: translateY(-2px);
}

/* Modal Styles - เหมือนหน้าแรก */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border: 2px solid var(--accent-blue);
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    color: var(--accent-blue);
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--accent-blue);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.1);
}

.btn-submit {
    padding: 1rem;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-submit:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-2px);
}

.modal-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.modal-footer p {
    color: var(--text-secondary);
}

.link-btn {
    background: none;
    border: none;
    color: var(--accent-blue);
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.link-btn:hover {
    color: var(--accent-blue-hover);
}

/* Turnstile Container - แทนที่ CAPTCHA */
.turnstile-container {
    margin: 1rem 0;
    min-height: 40px;
    display: flex;
    justify-content: center;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {

    /* Container responsive */
    .container {
        padding: 0 15px;
    }

    /* Page header responsive */
    .page-header {
        padding: 2rem 0;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    /* Filter section responsive */
    .filter-section {
        padding: 1.5rem 0;
    }

    .filter-controls {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .filter-options {
        flex-direction: column;
        gap: 0.75rem;
    }

    .filter-select {
        min-width: auto;
        width: 100%;
        min-height: 44px;
        /* Minimum touch target size */
        font-size: 16px;
        /* Prevent zoom on mobile */
    }

    .search-input {
        font-size: 16px;
        /* ป้องกันการ zoom บนมือถือ */
        min-height: 44px;
        /* Minimum touch target size */
    }

    /* Plugins grid responsive */
    .plugins-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Plugin card responsive */
    .plugin-image-container {
        height: 180px;
    }

    .plugin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .plugin-title {
        font-size: 1.1rem;
        line-height: 1.4;
    }

    .plugin-price {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .plugin-description {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .plugin-features {
        margin-bottom: 1rem;
    }

    .features-list li {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    /* Star rating responsive */
    .radio-input {
        scale: 0.08;
        justify-content: center;
    }

    .plugin-rating {
        margin-bottom: 0.5rem;
        padding: 0.25rem 0;
    }

    /* Button responsive */
    .btn-buy {
        font-size: 16px;
        /* Prevent zoom on mobile */
        padding: 0.8rem 1.2rem;
        width: 100%;
        min-height: 44px;
        /* Minimum touch target size */
    }

    /* Modal responsive */
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        margin: 1rem;
        max-width: 400px;
    }

    .modal-header h3 {
        font-size: 1.3rem;
    }

    .form-group input {
        font-size: 16px;
        /* ป้องกันการ zoom บนมือถือ */
        min-height: 44px;
        /* Minimum touch target size */
    }

    /* Improve text readability */
    body {
        font-size: 16px;
        line-height: 1.6;
    }

    /* Improve button accessibility */
    button,
    .btn,
    .btn-buy,
    .btn-auth {
        min-height: 44px;
        min-width: 44px;
    }
}

.slider .list .item .content p:first-child {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.slider .list .item .content h2 {
    font-size: 1.8rem;
    margin: 0.5rem 0;
    line-height: 1.2;
}

.slider .list .item .content p:last-of-type {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

/* Price container responsive */
.price-container {
    margin-top: 1rem;
    padding: 0.8rem;
    gap: 0.5rem;
}

.price-tag {
    font-size: 1.2rem;
}

.buy-button {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
    width: 100%;
    max-width: 200px;
}

/* Image container responsive */
.slider .list .item .image-container {
    position: relative;
    width: 100%;
    height: 200px;
    order: -1;
}

.slider .list .item .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: static;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
}

/* Star rating responsive in slider */
.slider .radio-input {
    scale: 0.06;
    justify-content: center;
}

.coming-soon-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
}

/* Navigation responsive */
.slider-nav {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}


/* Plugins Mobile Responsive */
@media (max-width: 768px) {
    .plugins-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }

    .plugin-card {
        width: 100%;
        margin: 10px 0;
    }

    .plugin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .plugin-actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .plugin-details {
        padding: 15px;
    }

    .plugin-screenshot {
        height: 200px;
    }

    .plugin-filters {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .search-box {
        width: 100%;
    }

    .filter-group {
        width: 100%;
    }

    .plugin-stats {
        flex-wrap: wrap;
        gap: 10px;
    }

    .stat-item {
        flex: 1 1 calc(50% - 10px);
    }
}

@media (max-width: 480px) {

    /* Further optimize for very small screens */
    .container {
        padding: 0 10px;
    }

    .plugin-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .plugin-description {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .plugin-screenshot {
        height: 140px;
    }

    .stat-item {
        flex: 1 1 100%;
        min-height: 44px;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .page-subtitle {
        font-size: 0.9rem;
    }

    /* Improve spacing for very small screens */
    .plugins-grid {
        gap: 1rem;
    }

    .plugin-card {
        padding: 1rem;
    }

    .btn-buy {
        padding: 0.8rem;
        font-size: 14px;
        font-weight: 600;
    }

    /* Stack filter controls vertically */
    .filter-controls {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .search-input,
    .filter-select {
        padding: 0.75rem;
    }
}

/* =============================================== */
/* ===           MOBILE NAVIGATION V2          === */
/* =============================================== */

/* 1. สไตล์ปุ่มเมนูแฮมเบอร์เกอร์ */
.mobile-menu-btn {
    display: none;
    /* ซ่อนปุ่มนี้ในหน้าจอเดสก์ท็อปเป็นค่าเริ่มต้น */
    z-index: 1010;
    /* ตั้งค่า z-index ให้สูงกว่า nav-menu */
    width: 60px;
    /* ปรับขนาดให้พอดีกับไอคอน */
    height: 50px;
    border-radius: 5px;
    border: none;
    transition: all 0.3s ease-in-out;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-weight: 600;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0;
    margin: 0;
}

/* Mobile menu icon hamburger lines */
.menu-icon {
    position: relative;
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-icon::before,
.menu-icon::after,
.menu-icon {
    background-color: currentColor;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
}

.menu-icon::before {
    top: 0;
}

.menu-icon::after {
    bottom: 0;
}

.menu-icon {
    background-color: currentColor;
    height: 3px;
    position: relative;
}

/* Active state - transform hamburger to X */
.mobile-menu-btn.active .menu-icon {
    background-color: transparent;
}

.mobile-menu-btn.active .menu-icon::before {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.mobile-menu-btn.active .menu-icon::after {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

.mobile-menu-btn:hover {
    color: var(--accent-blue);
    background-color: rgba(0, 170, 255, 0.1);
}

.mobile-menu-btn .icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.mobile-menu-btn .icon svg {
    width: 30px;
    /* ปรับขนาดไอคอนให้เหมาะสม */
    height: 30px;
}

.mobile-menu-btn .text {
    display: none;
    /* ไม่ต้องแสดงข้อความ "MENU" */
}

.mobile-menu-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-blue);
}

/* 2. การจัดวางสำหรับหน้าจอมือถือและแท็บเล็ต */
@media (max-width: 1023px) {

    /* แสดงปุ่มแฮมเบอร์เกอร์ */
    .mobile-menu-btn {
        display: flex;
    }
}