/* GPL City Theme Styles */

/* General Styles */
.gplcity-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    margin: 2px;
}

.gplcity-badge-new {
    background: #46b450;
    color: white;
}

.gplcity-badge-updated {
    background: #0073aa;
    color: white;
}

.gplcity-badge-type {
    background: #666;
    color: white;
}

/* Product Page Enhancements */
.gplcity-product-page .summary {
    position: relative;
}

.gplcity-version-info,
.gplcity-last-update,
.gplcity-download-count {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.gplcity-version-info strong,
.gplcity-last-update strong,
.gplcity-download-count strong {
    color: #333;
}

/* Search Form Enhancements */
.gplcity-search-form {
    position: relative;
    max-width: 600px;
    margin: 20px auto;
}

.gplcity-search-form .search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gplcity-search-form .search-wrapper:focus-within {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.gplcity-search-form .search-field {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
}

.gplcity-search-form .search-submit {
    padding: 12px 20px;
    background: #0073aa;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.gplcity-search-form .search-submit:hover {
    background: #005a87;
}

/* Search Suggestions */
#search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
}

#search-suggestions ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#search-suggestions li {
    margin: 0;
}

#search-suggestions a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f1f3f4;
    transition: background 0.3s ease;
}

#search-suggestions a:hover {
    background: #f8f9fa;
}

#search-suggestions li:last-child a {
    border-bottom: none;
}

/* Header Notice */
.gplcity-header-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 0;
    text-align: center;
    font-size: 14px;
}

.gplcity-header-notice p {
    margin: 0;
}

/* Product Cards */
.gplcity-product-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gplcity-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-color: #0073aa;
}

.gplcity-product-card .product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.gplcity-product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.gplcity-product-card .product-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

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

.gplcity-product-card .product-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    line-height: 1.3;
}

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

.gplcity-product-card .product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
}

.gplcity-product-card .product-actions {
    display: flex;
    gap: 10px;
}

.gplcity-product-card .btn {
    flex: 1;
    padding: 10px 15px;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid;
}

.gplcity-product-card .btn-primary {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.gplcity-product-card .btn-primary:hover {
    background: #005a87;
    border-color: #005a87;
    transform: translateY(-1px);
}

.gplcity-product-card .btn-secondary {
    background: transparent;
    color: #0073aa;
    border-color: #0073aa;
}

.gplcity-product-card .btn-secondary:hover {
    background: #0073aa;
    color: white;
}

/* Product Rating */
.gplcity-product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 10px 0;
}

.gplcity-product-rating .stars {
    display: flex;
    gap: 2px;
}

.gplcity-product-rating .star {
    color: #ddd;
    cursor: pointer;
    transition: color 0.3s ease;
    font-size: 16px;
}

.gplcity-product-rating .star.filled,
.gplcity-product-rating .star:hover {
    color: #ffc107;
}

.gplcity-product-rating .rating-text {
    font-size: 14px;
    color: #666;
    margin-left: 5px;
}

/* Favorites */
.add-to-favorites {
    background: none;
    border: 2px solid #e9ecef;
    color: #666;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.add-to-favorites:hover {
    border-color: #dc3545;
    color: #dc3545;
}

.add-to-favorites.favorited {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Product Comparison */
.compare-product {
    background: none;
    border: 2px solid #e9ecef;
    color: #666;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.compare-product:hover {
    border-color: #0073aa;
    color: #0073aa;
}

.compare-product.active {
    background: #0073aa;
    border-color: #0073aa;
    color: white;
}

.comparison-counter {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #0073aa;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,115,170,0.3);
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.comparison-counter:hover {
    transform: scale(1.1);
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: none;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

#back-to-top:hover {
    background: #555;
    transform: translateY(-2px);
}

/* Limit Warning */
.gplcity-limit-warning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    z-index: 9999;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Update Notifications */
.gplcity-update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #0073aa;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    animation: slideInRight 0.5s ease-out;
    cursor: pointer;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* License Status */
.license-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.license-status.valid {
    background: #d4edda;
    color: #155724;
}

.license-status.invalid {
    background: #f8d7da;
    color: #721c24;
}

.license-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gplcity-product-card .product-content {
        padding: 15px;
    }
    
    .gplcity-product-card .product-title {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .gplcity-search-form {
        margin: 15px;
    }
    
    .gplcity-product-card .product-image {
        height: 150px;
    }
    
    .gplcity-product-card .product-actions {
        flex-direction: column;
    }
    
    .gplcity-header-notice {
        font-size: 12px;
        padding: 8px 15px;
    }
    
    .comparison-counter,
    #back-to-top {
        bottom: 15px;
        right: 15px;
    }
    
    .gplcity-update-notification {
        top: 15px;
        right: 15px;
        left: 15px;
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .gplcity-product-card .product-content {
        padding: 12px;
    }
    
    .gplcity-product-card .product-title {
        font-size: 15px;
    }
    
    .gplcity-product-card .btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .gplcity-product-card {
        background: #2c3e50;
        border-color: #34495e;
        color: #ecf0f1;
    }
    
    .gplcity-product-card .product-title {
        color: #ecf0f1;
    }
    
    .gplcity-product-card .product-excerpt {
        color: #bdc3c7;
    }
    
    .gplcity-product-card .product-meta {
        color: #95a5a6;
    }
    
    #search-suggestions {
        background: #2c3e50;
        border-color: #34495e;
    }
    
    #search-suggestions a {
        color: #ecf0f1;
        border-color: #34495e;
    }
    
    #search-suggestions a:hover {
        background: #34495e;
    }
}

/* Print Styles */
@media print {
    .gplcity-header-notice,
    .comparison-counter,
    #back-to-top,
    .gplcity-update-notification,
    .add-to-favorites,
    .compare-product {
        display: none !important;
    }
    
    .gplcity-product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .gplcity-product-card {
        border-width: 2px;
    }
    
    .btn {
        border-width: 3px;
    }
    
    .gplcity-badge {
        border: 1px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .gplcity-product-card,
    .btn,
    .add-to-favorites,
    .compare-product,
    #back-to-top,
    .comparison-counter {
        transition: none;
    }
    
    .gplcity-product-card:hover {
        transform: none;
    }
    
    .gplcity-update-notification {
        animation: none;
    }
}
