/**
 * MegaPrice Theme - Shortcodes Stylesheet
 * Version: 1.0.0
 * 
 * Styling for shortcode outputs
 */

/* =============================================================================
   PRODUCTS SHORTCODE [megaprice_products]
   ============================================================================= */
.megaprice-products-shortcode {
    padding: 40px 0;
}

.megaprice-products-shortcode .products-grid {
    display: grid;
    gap: 24px;
}

.megaprice-products-shortcode .products-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.megaprice-products-shortcode .products-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.megaprice-products-shortcode .products-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.megaprice-products-shortcode .products-grid.columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* =============================================================================
   CATEGORIES SHORTCODE [megaprice_categories]
   ============================================================================= */
.megaprice-categories-shortcode {
    padding: 40px 0;
}

.megaprice-categories-shortcode .categories-grid {
    display: grid;
    gap: 20px;
}

.megaprice-categories-shortcode .categories-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.megaprice-categories-shortcode .categories-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.megaprice-categories-shortcode .categories-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.megaprice-categories-shortcode .categories-grid.columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

.megaprice-categories-shortcode .category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    background: var(--color-white, #fff);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    transition: all 0.3s ease;
}

.megaprice-categories-shortcode .category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.megaprice-categories-shortcode .category-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    background: var(--color-gray-100, #f3f4f6);
}

.megaprice-categories-shortcode .category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.megaprice-categories-shortcode .category-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-gray-800, #1f2937);
    margin-bottom: 5px;
    text-align: center;
}

.megaprice-categories-shortcode .category-count {
    font-size: 0.875rem;
    color: var(--color-gray-500, #6b7280);
}

/* =============================================================================
   COMPARISON SHORTCODE [megaprice_comparison]
   ============================================================================= */
.megaprice-comparison-shortcode {
    padding: 20px 0;
}

.megaprice-comparison-shortcode .comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--color-white, #fff);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.megaprice-comparison-shortcode .comparison-table th,
.megaprice-comparison-shortcode .comparison-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--color-gray-100, #f3f4f6);
}

.megaprice-comparison-shortcode .comparison-table th {
    background: var(--color-gray-50, #f9fafb);
    font-weight: 600;
    color: var(--color-gray-700, #374151);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.megaprice-comparison-shortcode .comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.megaprice-comparison-shortcode .comparison-table tbody tr:hover {
    background: var(--color-gray-50, #f9fafb);
}

.megaprice-comparison-shortcode .vendor-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.megaprice-comparison-shortcode .vendor-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.megaprice-comparison-shortcode .vendor-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.megaprice-comparison-shortcode .vendor-name {
    font-weight: 600;
    color: var(--color-gray-800, #1f2937);
}

.megaprice-comparison-shortcode .verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--color-success, #10b981);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.megaprice-comparison-shortcode .availability {
    display: flex;
    align-items: center;
    gap: 6px;
}

.megaprice-comparison-shortcode .availability-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.megaprice-comparison-shortcode .availability-dot.in-stock {
    background: var(--color-success, #10b981);
}

.megaprice-comparison-shortcode .availability-dot.out-of-stock {
    background: var(--color-danger, #ef4444);
}

.megaprice-comparison-shortcode .price-cell {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-primary, #ff6b35);
}

.megaprice-comparison-shortcode .best-price {
    background: rgba(16, 185, 129, 0.1);
}

.megaprice-comparison-shortcode .best-price .price-cell {
    color: var(--color-success, #10b981);
}

.megaprice-comparison-shortcode .action-cell {
    text-align: right;
}

.megaprice-comparison-shortcode .go-to-shop-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--color-primary, #ff6b35);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.megaprice-comparison-shortcode .go-to-shop-btn:hover {
    background: var(--color-primary-dark, #e55a2b);
    transform: translateY(-2px);
}

/* =============================================================================
   SEARCH SHORTCODE [megaprice_search]
   ============================================================================= */
.megaprice-search-shortcode {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 0;
}

.megaprice-search-shortcode .search-form {
    display: flex;
    background: var(--color-white, #fff);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.megaprice-search-shortcode .search-form.has-autocomplete {
    position: relative;
}

.megaprice-search-shortcode .search-input-wrap {
    flex: 1;
    position: relative;
}

.megaprice-search-shortcode .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gray-400, #9ca3af);
}

.megaprice-search-shortcode .search-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: none;
    font-size: 1rem;
    color: var(--color-gray-800, #1f2937);
}

.megaprice-search-shortcode .search-input:focus {
    outline: none;
}

.megaprice-search-shortcode .search-btn {
    padding: 16px 28px;
    background: var(--color-primary, #ff6b35);
    color: white;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.megaprice-search-shortcode .search-btn:hover {
    background: var(--color-primary-dark, #e55a2b);
}

.megaprice-search-shortcode .autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 100;
}

.megaprice-search-shortcode .autocomplete-results.active {
    display: block;
}

.megaprice-search-shortcode .autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.megaprice-search-shortcode .autocomplete-item:hover {
    background: var(--color-gray-50, #f9fafb);
}

/* =============================================================================
   NEWSLETTER SHORTCODE [megaprice_newsletter]
   ============================================================================= */
.megaprice-newsletter-shortcode {
    padding: 30px 0;
}

/* Default Style */
.megaprice-newsletter-shortcode.style-default .newsletter-wrap {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.megaprice-newsletter-shortcode .newsletter-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-gray-800, #1f2937);
    margin-bottom: 10px;
}

.megaprice-newsletter-shortcode .newsletter-description {
    color: var(--color-gray-600, #4b5563);
    margin-bottom: 20px;
}

.megaprice-newsletter-shortcode .newsletter-form {
    display: flex;
    gap: 12px;
}

.megaprice-newsletter-shortcode .newsletter-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--color-gray-200, #e5e7eb);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.megaprice-newsletter-shortcode .newsletter-input:focus {
    outline: none;
    border-color: var(--color-primary, #ff6b35);
}

.megaprice-newsletter-shortcode .newsletter-btn {
    padding: 14px 28px;
    background: var(--color-primary, #ff6b35);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.megaprice-newsletter-shortcode .newsletter-btn:hover {
    background: var(--color-primary-dark, #e55a2b);
}

/* Inline Style */
.megaprice-newsletter-shortcode.style-inline .newsletter-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.megaprice-newsletter-shortcode.style-inline .newsletter-content {
    flex: 1;
    min-width: 200px;
}

.megaprice-newsletter-shortcode.style-inline .newsletter-title {
    font-size: 1.25rem;
    margin-bottom: 5px;
}

.megaprice-newsletter-shortcode.style-inline .newsletter-description {
    margin-bottom: 0;
}

.megaprice-newsletter-shortcode.style-inline .newsletter-form {
    flex: 1;
    min-width: 300px;
}

/* Boxed Style */
.megaprice-newsletter-shortcode.style-boxed .newsletter-wrap {
    background: linear-gradient(135deg, var(--color-primary, #ff6b35) 0%, var(--color-primary-dark, #e55a2b) 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    color: white;
}

.megaprice-newsletter-shortcode.style-boxed .newsletter-title {
    color: white;
}

.megaprice-newsletter-shortcode.style-boxed .newsletter-description {
    color: rgba(255, 255, 255, 0.9);
}

.megaprice-newsletter-shortcode.style-boxed .newsletter-form {
    max-width: 450px;
    margin: 0 auto;
}

.megaprice-newsletter-shortcode.style-boxed .newsletter-input {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.megaprice-newsletter-shortcode.style-boxed .newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.megaprice-newsletter-shortcode.style-boxed .newsletter-btn {
    background: white;
    color: var(--color-primary, #ff6b35);
}

.megaprice-newsletter-shortcode.style-boxed .newsletter-btn:hover {
    background: var(--color-gray-100, #f3f4f6);
}

/* =============================================================================
   CTA SHORTCODE [megaprice_cta]
   ============================================================================= */
.megaprice-cta-shortcode {
    padding: 30px 0;
}

.megaprice-cta-shortcode .cta-box {
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

/* Primary Style */
.megaprice-cta-shortcode.style-primary .cta-box {
    background: linear-gradient(135deg, var(--color-primary, #ff6b35) 0%, var(--color-primary-dark, #e55a2b) 100%);
    color: white;
}

.megaprice-cta-shortcode.style-primary .cta-btn {
    background: white;
    color: var(--color-primary, #ff6b35);
}

/* Secondary Style */
.megaprice-cta-shortcode.style-secondary .cta-box {
    background: var(--color-gray-100, #f3f4f6);
    color: var(--color-gray-800, #1f2937);
}

.megaprice-cta-shortcode.style-secondary .cta-btn {
    background: var(--color-primary, #ff6b35);
    color: white;
}

/* Dark Style */
.megaprice-cta-shortcode.style-dark .cta-box {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
}

.megaprice-cta-shortcode.style-dark .cta-btn {
    background: var(--color-primary, #ff6b35);
    color: white;
}

/* CTA Elements */
.megaprice-cta-shortcode .cta-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.megaprice-cta-shortcode .cta-description {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.megaprice-cta-shortcode .cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.megaprice-cta-shortcode .cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Alignment */
.megaprice-cta-shortcode.align-left .cta-box {
    text-align: left;
}

.megaprice-cta-shortcode.align-left .cta-description {
    margin-left: 0;
}

.megaprice-cta-shortcode.align-right .cta-box {
    text-align: right;
}

.megaprice-cta-shortcode.align-right .cta-description {
    margin-right: 0;
}

/* =============================================================================
   STATS SHORTCODE [megaprice_stats]
   ============================================================================= */
.megaprice-stats-shortcode {
    padding: 60px 0;
}

.megaprice-stats-shortcode .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.megaprice-stats-shortcode .stat-item {
    text-align: center;
    padding: 30px 20px;
    background: var(--color-white, #fff);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.megaprice-stats-shortcode .stat-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-light, rgba(37, 99, 235, 0.1));
    border-radius: 50%;
    color: var(--color-primary, #ff6b35);
}

.megaprice-stats-shortcode .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-gray-800, #1f2937);
    line-height: 1;
    margin-bottom: 8px;
}

.megaprice-stats-shortcode .stat-label {
    font-size: 0.9375rem;
    color: var(--color-gray-600, #4b5563);
}

/* =============================================================================
   PRICE ALERT SHORTCODE [megaprice_price_alert]
   ============================================================================= */
.megaprice-price-alert-shortcode {
    padding: 20px 0;
}

.megaprice-price-alert-shortcode .price-alert-box {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: var(--color-gray-50, #f9fafb);
    border-radius: 12px;
    border: 2px dashed var(--color-gray-200, #e5e7eb);
}

.megaprice-price-alert-shortcode .price-alert-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-warning, #f59e0b);
    color: white;
    border-radius: 50%;
}

.megaprice-price-alert-shortcode .price-alert-content {
    flex: 1;
}

.megaprice-price-alert-shortcode .price-alert-title {
    font-weight: 600;
    color: var(--color-gray-800, #1f2937);
    margin-bottom: 5px;
}

.megaprice-price-alert-shortcode .price-alert-text {
    font-size: 0.875rem;
    color: var(--color-gray-600, #4b5563);
}

.megaprice-price-alert-shortcode .price-alert-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.megaprice-price-alert-shortcode .price-alert-input {
    padding: 10px 14px;
    border: 1px solid var(--color-gray-300, #d1d5db);
    border-radius: 8px;
    font-size: 0.9375rem;
    width: 180px;
}

.megaprice-price-alert-shortcode .price-alert-input:focus {
    outline: none;
    border-color: var(--color-primary, #ff6b35);
}

.megaprice-price-alert-shortcode .price-alert-btn {
    padding: 10px 20px;
    background: var(--color-primary, #ff6b35);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.megaprice-price-alert-shortcode .price-alert-btn:hover {
    background: var(--color-primary-dark, #e55a2b);
}

/* =============================================================================
   POSTS SHORTCODE [megaprice_posts]
   ============================================================================= */
.megaprice-posts-shortcode {
    padding: 40px 0;
}

.megaprice-posts-shortcode .posts-grid {
    display: grid;
    gap: 24px;
}

.megaprice-posts-shortcode .posts-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.megaprice-posts-shortcode .posts-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.megaprice-posts-shortcode .posts-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.megaprice-posts-shortcode .post-card {
    background: var(--color-white, #fff);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.megaprice-posts-shortcode .post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.megaprice-posts-shortcode .post-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.megaprice-posts-shortcode .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.megaprice-posts-shortcode .post-card:hover .post-image img {
    transform: scale(1.05);
}

.megaprice-posts-shortcode .post-content {
    padding: 20px;
}

.megaprice-posts-shortcode .post-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8125rem;
    color: var(--color-gray-500, #6b7280);
    margin-bottom: 10px;
}

.megaprice-posts-shortcode .post-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-gray-800, #1f2937);
    margin-bottom: 10px;
    line-height: 1.4;
}

.megaprice-posts-shortcode .post-title a {
    color: inherit;
    text-decoration: none;
}

.megaprice-posts-shortcode .post-title a:hover {
    color: var(--color-primary, #ff6b35);
}

.megaprice-posts-shortcode .post-excerpt {
    font-size: 0.9375rem;
    color: var(--color-gray-600, #4b5563);
    line-height: 1.6;
    margin-bottom: 15px;
}

.megaprice-posts-shortcode .post-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--color-primary, #ff6b35);
    font-weight: 500;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.megaprice-posts-shortcode .post-link:hover {
    gap: 10px;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 1200px) {
    .megaprice-stats-shortcode .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .megaprice-products-shortcode .products-grid.columns-4,
    .megaprice-products-shortcode .products-grid.columns-5,
    .megaprice-categories-shortcode .categories-grid.columns-4,
    .megaprice-categories-shortcode .categories-grid.columns-6,
    .megaprice-posts-shortcode .posts-grid.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .megaprice-products-shortcode .products-grid.columns-3,
    .megaprice-products-shortcode .products-grid.columns-4,
    .megaprice-products-shortcode .products-grid.columns-5,
    .megaprice-categories-shortcode .categories-grid.columns-3,
    .megaprice-categories-shortcode .categories-grid.columns-4,
    .megaprice-categories-shortcode .categories-grid.columns-6,
    .megaprice-posts-shortcode .posts-grid.columns-3,
    .megaprice-posts-shortcode .posts-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .megaprice-comparison-shortcode .comparison-table {
        display: block;
        overflow-x: auto;
    }

    .megaprice-newsletter-shortcode .newsletter-form {
        flex-direction: column;
    }

    .megaprice-newsletter-shortcode.style-inline .newsletter-wrap {
        flex-direction: column;
        text-align: center;
    }

    .megaprice-cta-shortcode .cta-box {
        padding: 30px 20px;
    }

    .megaprice-cta-shortcode .cta-title {
        font-size: 1.5rem;
    }

    .megaprice-stats-shortcode .stats-grid {
        gap: 20px;
    }

    .megaprice-stats-shortcode .stat-item {
        padding: 20px 15px;
    }

    .megaprice-stats-shortcode .stat-number {
        font-size: 2rem;
    }

    .megaprice-price-alert-shortcode .price-alert-box {
        flex-direction: column;
        text-align: center;
    }

    .megaprice-price-alert-shortcode .price-alert-form {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .megaprice-products-shortcode .products-grid,
    .megaprice-categories-shortcode .categories-grid,
    .megaprice-posts-shortcode .posts-grid {
        grid-template-columns: 1fr;
    }

    .megaprice-stats-shortcode .stats-grid {
        grid-template-columns: 1fr;
    }

    .megaprice-search-shortcode .search-form {
        flex-direction: column;
    }

    .megaprice-search-shortcode .search-btn {
        width: 100%;
    }

    .megaprice-price-alert-shortcode .price-alert-input {
        width: 100%;
    }

    .megaprice-price-alert-shortcode .price-alert-btn {
        width: 100%;
    }
}
