/**
 * Clean Modern City Content Plugin Styles
 */

/* Simple Modern Select Element */
.ccp-city-dropdown {
    /* Layout */
    display: inline-block;
    min-width: 180px;
    max-width: 240px;
    margin: 3px 0;
    height: 35px;
    
    /* Simple Styling */
    padding: 3px 36px 3px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    font-size: 15px;
    font-weight: 400;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Remove default arrow */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    
    /* Simple custom arrow */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3e%3cpath fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M3.5 5.25l3.5 3.5 3.5-3.5'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
}

.ccp-city-dropdown:hover {
    border-color: #d1d5db;
    background-color: #f9fafb;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3e%3cpath fill='none' stroke='%233b82f6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M3.5 5.25l3.5 3.5 3.5-3.5'/%3e%3c/svg%3e");
}

.ccp-city-dropdown:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3e%3cpath fill='none' stroke='%233b82f6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M3.5 5.25l3.5 3.5 3.5-3.5'/%3e%3c/svg%3e");
}

/* Wrapper for buttons/tabs styles only */
.ccp-city-selector {
    margin: 20px 0;
    clear: both;
}

/* Button Style - Modern Pills */
.ccp-city-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ccp-city-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 24px;
    background: #f8fafc;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
}

.ccp-city-btn:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ccp-city-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.ccp-city-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.ccp-city-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Tab Style - Clean Underline */
.ccp-city-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

.ccp-city-tab {
    padding: 16px 24px 14px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    position: relative;
    margin-right: 2px;
}

.ccp-city-tab:hover {
    color: #374151;
    background: rgba(59, 130, 246, 0.04);
}

.ccp-city-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}

.ccp-city-tab:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* City Content - Smooth Transitions */
.ccp-city-content {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ccp-city-content.ccp-loading {
    opacity: 0.4;
    pointer-events: none;
    transform: translateY(8px);
}

/* City Restricted Message - Clean Alert */
.ccp-city-restricted {
    padding: 20px 24px;
    background: #fef3c7;
    border: none;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    color: #92400e;
    text-align: center;
    margin: 24px 0;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Loading Spinner - Modern */
.ccp-loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: ccp-spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes ccp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Posts List Styling */
.ccp-posts-list {
    margin: 20px 0;
}

.ccp-posts-list article {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    transition: box-shadow 0.3s ease;
}

.ccp-posts-list article:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ccp-posts-list h2 {
    margin: 0 0 10px 0;
    font-size: 1.4em;
    line-height: 1.3;
}

.ccp-posts-list h2 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ccp-posts-list h2 a:hover {
    color: #0073aa;
}

.ccp-posts-list .post-meta {
    margin: 10px 0;
    font-size: 0.9em;
    color: #666;
}

.ccp-posts-list .post-meta span {
    margin-right: 15px;
}

.ccp-posts-list .post-excerpt {
    margin: 15px 0;
    line-height: 1.6;
    color: #444;
}

.ccp-posts-list .post-cities {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    font-size: 0.9em;
    color: #666;
}

.ccp-posts-list .cities-label {
    font-weight: 600;
    color: #333;
}

/* Pagination */
.ccp-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 10px;
}

.ccp-pagination a,
.ccp-pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.ccp-pagination a:hover {
    border-color: #0073aa;
    color: #0073aa;
}

.ccp-pagination .current {
    background: #0073aa;
    border-color: #0073aa;
    color: white;
}

/* Widget Styles */
.widget .ccp-city-selector {
    margin: 10px 0;
    padding: 10px;
    font-size: 13px;
}

.widget .ccp-city-selector select {
    font-size: 13px;
}

.widget .ccp-city-selector button {
    font-size: 12px;
    padding: 6px 10px;
}

/* Mobile-First Responsive Design */
@media screen and (max-width: 768px) {
    .ccp-city-dropdown {
        display: block;
        width: 100%;
        max-width: 100%;
        padding: 11px 34px 11px 14px;
        font-size: 14px;
        margin: 10px 0;
    }
    
    .ccp-city-buttons {
        justify-content: center;
        gap: 8px;
    }
    
    .ccp-city-btn {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 70px;
    }
    
    .ccp-city-tabs {
        justify-content: center;
        margin-bottom: 20px;
    }
    
    .ccp-city-tab {
        padding: 14px 16px 12px;
        font-size: 14px;
        margin-right: 1px;
    }
    
    .ccp-posts-list article {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .ccp-posts-list h2 {
        font-size: 1.25em;
    }
}

@media screen and (max-width: 480px) {
    .ccp-city-dropdown {
        padding: 11px 32px 11px 12px;
        border-radius: 6px;
        font-size: 14px;
        background-position: right 10px center;
    }
    
    .ccp-city-buttons {
        gap: 6px;
    }
    
    .ccp-city-btn {
        flex: 1;
        min-width: 0;
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .ccp-city-tabs {
        border-bottom: 1px solid #e5e7eb;
        margin-bottom: 16px;
    }
    
    .ccp-city-tab {
        flex: 1;
        text-align: center;
        padding: 12px 8px 10px;
        font-size: 13px;
        margin-right: 0;
        border-bottom: 2px solid transparent;
    }
    
    .ccp-city-tab.active {
        border-bottom-color: #3b82f6;
    }
}

/* Dark Mode Support Removed */

/* Enhanced Accessibility */
.screen-reader-text {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* Focus Styles Already Included in Each Component */

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .ccp-city-dropdown,
    .ccp-city-btn,
    .ccp-city-tab {
        border: 2px solid currentColor;
    }
    
    .ccp-city-btn.active,
    .ccp-city-tab.active {
        outline: 2px solid;
        outline-offset: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .ccp-city-dropdown,
    .ccp-city-btn,
    .ccp-city-tab,
    .ccp-city-content,
    .ccp-loading-spinner {
        transition: none;
        animation: none;
    }
}

/* Merchant Display Styles */
.merchant-display {
    display: grid;
    gap: 24px;
    margin: 24px 0;
}

.merchant-display.merchant-display-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.merchant-display.merchant-display-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.merchant-display.merchant-display-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.merchant-display.merchant-display-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.merchant-display.merchant-display-cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.merchant-display.merchant-display-cols-6 {
    grid-template-columns: repeat(6, 1fr);
}

.merchant-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.merchant-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.merchant-link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.merchant-link:hover {
    text-decoration: none;
}

.merchant-link.external-link::after {
    content: "↗";
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 12px;
    color: #6b7280;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.merchant-item:hover .merchant-link.external-link::after {
    opacity: 1;
}

.merchant-image {
    width: 100%;
    aspect-ratio: 1 / 1; /* Fixed square ratio by default */
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

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

.merchant-item:hover .merchant-image img {
    transform: scale(1.05);
}

.merchant-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #94a3b8;
    font-size: 48px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
}

.merchant-info {
    margin-top: auto;
}

.merchant-name {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.merchant-excerpt {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.merchant-display-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: #6b7280;
}

.merchant-display-empty p {
    margin: 0;
    font-size: 16px;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
    .merchant-display {
        gap: 16px;
        margin: 16px 0;
    }
    
    .merchant-display.merchant-display-cols-1 {
        grid-template-columns: 1fr;
    }
    
    .merchant-display.merchant-display-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .merchant-display.merchant-display-cols-3,
    .merchant-display.merchant-display-cols-4,
    .merchant-display.merchant-display-cols-5,
    .merchant-display.merchant-display-cols-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .merchant-item {
        padding: 16px;
    }
    
    .merchant-image {
        margin-bottom: 12px;
    }
    
    .merchant-name {
        font-size: 16px;
    }
    
    .merchant-excerpt {
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .merchant-display {
        gap: 12px;
        margin: 12px 0;
    }
    
    .merchant-display.merchant-display-cols-1 {
        grid-template-columns: 1fr;
    }
    
    .merchant-display.merchant-display-cols-2,
    .merchant-display.merchant-display-cols-3,
    .merchant-display.merchant-display-cols-4,
    .merchant-display.merchant-display-cols-5,
    .merchant-display.merchant-display-cols-6 {
        grid-template-columns: 1fr;
    }
    
    .merchant-item {
        padding: 14px;
    }
    
    .merchant-name {
        font-size: 15px;
    }
}

/* Accessibility and Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    .merchant-item,
    .merchant-image img,
    .merchant-link.external-link::after {
        transition: none;
    }
    
    .merchant-item:hover {
        transform: none;
    }
    
    .merchant-item:hover .merchant-image img {
        transform: none;
    }
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    .merchant-item {
        border: 2px solid currentColor;
    }
    
    .merchant-image-placeholder {
        border: 2px solid currentColor;
    }
}

/* Print Styles */
@media print {
    .ccp-city-selector {
        display: none;
    }
    
    .merchant-item {
        break-inside: avoid;
        border: 1px solid #000;
    }
    
    .merchant-item:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Homepage Advertisement Layout Styles */
.ccp-homepage-ads {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Left 50%, Right 50% */
    gap: 24px;
    margin: 24px 0;
    align-items: stretch; /* Ensure left and right are equal height */
}

.ccp-homepage-ads-left {
    position: relative;
}

.ccp-homepage-ads-right {
    position: relative;
    height: 400px; /* Fixed height for rotation */
    overflow: hidden;
}

/* Default homepage ad item (rotation layout) */
.ccp-homepage-ads-right.ccp-rotation-layout .ccp-homepage-ad-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Grid layout styles */
.ccp-homepage-ads-right.ccp-grid-layout {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr); /* Two equal rows */
    gap: 12px;
    height: 100%; /* Match left column height */
    overflow: visible;
    padding: 0;
}

.ccp-homepage-ads-right.ccp-grid-layout .ccp-homepage-ad-item {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 180px;
    opacity: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Ensure small images fill grid cells without oversizing */
.ccp-homepage-ads-right.ccp-grid-layout .ccp-homepage-ad-image.small {
    height: 100%;
    min-height: 0;
    object-fit: cover;
}

.ccp-homepage-ads-right.ccp-grid-layout .ccp-homepage-ad-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Rotation layout specific styles */
.ccp-homepage-ad-item.ccp-rotation-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.ccp-homepage-ad-item.active {
    opacity: 1;
    z-index: 2;
}

.ccp-homepage-ad-item.inactive {
    opacity: 0;
    z-index: 1;
}

.ccp-homepage-ad-container {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ccp-homepage-ad-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.ccp-homepage-ad-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

.ccp-homepage-ad-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ccp-homepage-ad-link:hover .ccp-homepage-ad-image {
    transform: scale(1.05);
}

.ccp-homepage-ad-image.large {
    height: 400px; /* Default row height */
    min-height: 400px;
    object-fit: cover;
}

.ccp-homepage-ad-image.small {
    height: 380px;
    min-height: 380px;
}

/* Aspect ratio helpers to stabilize layout */
.ccp-homepage-ad-container.ccp-aspect-1x1 { aspect-ratio: 1 / 1; }
.ccp-homepage-ad-container.ccp-aspect-4x3 { aspect-ratio: 4 / 3; }
.ccp-homepage-ad-container.ccp-aspect-16x9 { aspect-ratio: 16 / 9; }
.ccp-homepage-ad-container.ccp-aspect-1x1 .ccp-homepage-ad-image,
.ccp-homepage-ad-container.ccp-aspect-4x3 .ccp-homepage-ad-image,
.ccp-homepage-ad-container.ccp-aspect-16x9 .ccp-homepage-ad-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ccp-homepage-ad-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.ccp-homepage-ads-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: #6b7280;
}

/* Advertisement Slider Styles */
.ccp-advertise-slider {
    position: relative;
    margin: 24px 0;
    max-width: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.ccp-slider-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.ccp-slider-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.ccp-slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ccp-slider-slide.active {
    opacity: 1;
    z-index: 2;
}

.ccp-slider-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
}

.ccp-slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ccp-slider-link:hover .ccp-slider-image {
    transform: scale(1.02);
}

.ccp-slider-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

/* Slider Controls */
.ccp-slider-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ccp-slider-control:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.ccp-slider-control.prev {
    left: 20px;
}

.ccp-slider-control.next {
    right: 20px;
}

.ccp-slider-control .dashicons {
    font-size: 20px;
    color: #333;
}

/* Slider Indicators */
.ccp-slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.ccp-slider-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.ccp-slider-indicator.active {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.2);
}

.ccp-slider-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

.ccp-advertise-slider-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: #6b7280;
    font-size: 16px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .ccp-homepage-ads {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 16px 0;
    }
    
    .ccp-homepage-ads-right.ccp-rotation-layout {
        height: 250px;
    }
    
    .ccp-homepage-ads-right.ccp-grid-layout {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 8px;
    }
    
    .ccp-homepage-ads-right.ccp-grid-layout .ccp-homepage-ad-item {
        min-height: 120px;
    }
    
    .ccp-homepage-ad-image.large,
    .ccp-homepage-ad-image.small {
        height: 250px;
        min-height: 250px;
    }
    
    .ccp-homepage-ad-title {
        font-size: 16px;
        padding: 15px;
    }
    
    .ccp-slider-container {
        height: 300px;
    }
    
    .ccp-slider-title {
        font-size: 20px;
        padding: 15px;
    }
    
    .ccp-slider-control {
        width: 40px;
        height: 40px;
    }
    
    .ccp-slider-control.prev {
        left: 10px;
    }
    
    .ccp-slider-control.next {
        right: 10px;
    }
    
    .ccp-slider-control .dashicons {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .ccp-homepage-ads-right.ccp-rotation-layout {
        height: 200px;
    }
    
    .ccp-homepage-ads-right.ccp-grid-layout {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        gap: 6px;
    }
    
    .ccp-homepage-ads-right.ccp-grid-layout .ccp-homepage-ad-item {
        min-height: 100px;
    }
    
    .ccp-homepage-ad-image.large,
    .ccp-homepage-ad-image.small {
        height: 200px;
        min-height: 200px;
    }
    
    .ccp-slider-container {
        height: 250px;
    }
    
    .ccp-slider-title {
        font-size: 18px;
        padding: 12px;
    }
    
    .ccp-slider-control {
        width: 35px;
        height: 35px;
    }
    
    .ccp-slider-indicators {
        bottom: 10px;
    }
    
    .ccp-slider-indicator {
        width: 10px;
        height: 10px;
    }
}

/* Accessibility and Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    .ccp-homepage-ad-item,
    .ccp-slider-slide,
    .ccp-homepage-ad-container,
    .ccp-homepage-ad-image,
    .ccp-slider-image,
    .ccp-slider-control,
    .ccp-slider-indicator {
        transition: none;
    }
    
    .ccp-homepage-ad-container:hover,
    .ccp-slider-link:hover .ccp-slider-image,
    .ccp-homepage-ad-link:hover .ccp-homepage-ad-image {
        transform: none;
    }
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    .ccp-homepage-ad-container,
    .ccp-advertise-slider {
        border: 2px solid currentColor;
    }
    
    .ccp-slider-control {
        border: 2px solid currentColor;
    }
}

/* Merchant Aspect Ratio Modifiers */
.merchant-image.merchant-aspect-1x1 { aspect-ratio: 1 / 1; }
.merchant-image.merchant-aspect-4x3 { aspect-ratio: 4 / 3; }
.merchant-image.merchant-aspect-16x9 { aspect-ratio: 16 / 9; }


/* Merchant Display - Mobile Columns Overrides */
@media screen and (max-width: 768px) {
    .merchant-display.merchant-display-mobile-cols-1 { grid-template-columns: 1fr !important; }
    .merchant-display.merchant-display-mobile-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
    .merchant-display.merchant-display-mobile-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
    .merchant-display.merchant-display-mobile-cols-4 { grid-template-columns: repeat(4, 1fr) !important; }
}
@media screen and (max-width: 480px) {
    .merchant-display.merchant-display-mobile-cols-1 { grid-template-columns: 1fr !important; }
    .merchant-display.merchant-display-mobile-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
    .merchant-display.merchant-display-mobile-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
    .merchant-display.merchant-display-mobile-cols-4 { grid-template-columns: repeat(4, 1fr) !important; }
}
