/**
 * Green-Rank Seller Card Component
 * Sürdürülebilir üretici kartı tasarımı
 * Follows CLAUDE.md Design System
 * Version: 1.0
 */

/* ============================================
   TOPSELLERS HOMEPAGE SECTION - Green Background
   ============================================ */

.topsellers-homepage-section {
    background: linear-gradient(180deg, #1A6355 0%, #14524a 100%);
    padding: 50px 0 60px;
    margin-top: 30px;
}

.topsellers-homepage-section .green-rank-section-header {
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.topsellers-homepage-section .green-rank-section-title {
    color: #ffffff;
}

.topsellers-homepage-section .green-rank-section-title svg {
    color: #8BC34A;
}

.topsellers-homepage-section .green-rank-section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.topsellers-homepage-section .green-rank-view-all {
    color: #FFF3E5;
}

.topsellers-homepage-section .green-rank-view-all:hover {
    color: #ffffff;
}

/* Button style override for green section */
.topsellers-homepage-section .button-color-2 {
    background: #ffffff;
    color: #1A6355;
    border-color: #ffffff;
}

.topsellers-homepage-section .button-color-2:hover {
    background: #FFF3E5;
    color: #1A6355;
    border-color: #FFF3E5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .topsellers-homepage-section {
        padding: 40px 0 50px;
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .topsellers-homepage-section {
        padding: 30px 0 40px;
        margin-top: 15px;
    }
}

/* ============================================
   SWIPER CONTAINER - Mobile Horizontal Scroll
   ============================================ */

.green-rank-swiper-container {
    position: relative;
    overflow: hidden;
    padding: 10px 0 30px;
}

.green-rank-swiper {
    overflow: visible;
}

.green-rank-swiper .swiper-wrapper {
    display: flex;
}

.green-rank-swiper .swiper-slide {
    width: auto;
    flex-shrink: 0;
}

/* Swiper pagination bullets */
.green-rank-swiper .swiper-pagination {
    bottom: 0;
}

.green-rank-swiper .swiper-pagination-bullet {
    background: #c8c0bb;
    opacity: 1;
    width: 8px;
    height: 8px;
}

.green-rank-swiper .swiper-pagination-bullet-active {
    background: #1A6355;
    width: 20px;
    border-radius: 4px;
}

/* Swiper navigation arrows */
.green-rank-swiper .swiper-button-prev,
.green-rank-swiper .swiper-button-next {
    color: #1A6355;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.green-rank-swiper .swiper-button-prev:after,
.green-rank-swiper .swiper-button-next:after {
    font-size: 18px;
    font-weight: bold;
}

.green-rank-swiper .swiper-button-prev:hover,
.green-rank-swiper .swiper-button-next:hover {
    background: #1A6355;
    color: #fff;
}

/* ============================================
   GRID CONTAINER - Desktop Layout
   ============================================ */

.green-rank-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px 0;
}

/* ============================================
   SELLER CARD BASE
   ============================================ */

.green-rank-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.green-rank-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(26, 99, 85, 0.15);
}

/* ============================================
   CARD HEADER - Avatar + Info
   ============================================ */

.green-rank-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #FFF3E5 0%, #ffffff 100%);
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

/* Green Badge (Top Right) */
.green-rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.green-rank-badge svg {
    width: 14px;
    height: 14px;
}

/* Badge Levels */
.badge-green-premium {
    background: linear-gradient(135deg, #1A6355 0%, #2d8a78 100%);
    color: #fff;
}

.badge-green-verified {
    background: linear-gradient(135deg, #4CAF50 0%, #66bb6a 100%);
    color: #fff;
}

.badge-green-certified {
    background: linear-gradient(135deg, #bf833a 0%, #d4a05a 100%);
    color: #fff;
}

.badge-green-standard {
    background: #f0f0f0;
    color: #7d91a3;
}

/* Producer Avatar */
.green-rank-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.green-rank-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid #1A6355;
    object-fit: cover;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.green-rank-avatar-link:hover .green-rank-avatar {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(26, 99, 85, 0.25);
}

/* Avatar placeholder when no image */
.green-rank-avatar.no-image,
.green-rank-avatar[src*="noimage"],
.green-rank-avatar[src*="default-avatar"] {
    background: linear-gradient(135deg, #FFF3E5 0%, #f0e8df 100%);
}

/* Avatar Ring for Premium */
.green-rank-avatar-wrapper.is-premium .green-rank-avatar {
    border-color: #1A6355;
    box-shadow: 0 0 0 3px rgba(26, 99, 85, 0.2);
}

/* Producer Info */
.green-rank-info {
    flex: 1;
    min-width: 0;
    padding-right: 60px; /* Space for badge */
}

.green-rank-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #1A6355;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.green-rank-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.green-rank-name a:hover {
    color: #b9475e;
}

.green-rank-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #7d91a3;
    margin: 0 0 6px;
}

.green-rank-location svg {
    width: 14px;
    height: 14px;
    color: #b9475e;
    flex-shrink: 0;
}

/* Rating */
.green-rank-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.green-rank-rating-stars {
    display: flex;
    gap: 2px;
}

.green-rank-rating-stars svg {
    width: 14px;
    height: 14px;
    color: #f5a623;
}

.green-rank-rating-score {
    font-size: 14px;
    font-weight: 600;
    color: #1A6355;
}

.green-rank-rating-count {
    font-size: 12px;
    color: #7d91a3;
}

/* ============================================
   CARD BODY - Products Preview
   ============================================ */

.green-rank-card-body {
    padding: 15px 20px;
    flex: 1;
}

/* Product count badge */
.green-rank-product-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FFF3E5;
    color: #1A6355;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
}

.green-rank-product-count svg {
    width: 16px;
    height: 16px;
}

/* Product thumbnails grid */
.green-rank-products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.green-rank-product-thumb {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e6e6e6;
    transition: transform 0.2s, border-color 0.2s;
}

.green-rank-product-thumb:hover {
    transform: scale(1.05);
    border-color: #1A6355;
}

.green-rank-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.green-rank-product-thumb-placeholder {
    background: linear-gradient(145deg, #f8faf9 0%, #e8f0ed 50%, #dce8e4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 1px dashed #c8d8d2;
}

.green-rank-product-thumb-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(26, 99, 85, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(76, 175, 80, 0.05) 0%, transparent 50%);
}

.green-rank-product-thumb-placeholder svg {
    width: 26px;
    height: 26px;
    color: #1A6355;
    opacity: 0.35;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 1px rgba(26, 99, 85, 0.1));
}

/* ============================================
   CARD FOOTER - Actions
   ============================================ */

.green-rank-card-footer {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
}

.green-rank-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.green-rank-btn svg {
    width: 16px;
    height: 16px;
}

/* Primary Button (Follow) */
.green-rank-btn-primary {
    background: #b9475e;
    color: #fff;
    border-color: #b9475e;
}

.green-rank-btn-primary:hover {
    background: #e79275;
    border-color: #e79275;
}

/* Follow Button Integration */
.green-rank-card-footer .follow-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

.green-rank-card-footer .follow-button svg {
    flex-shrink: 0;
}

.green-rank-card-footer .follow-button span {
    display: inline-block;
}

/* Follow Button - Following state (button-color-3) */
.green-rank-card-footer .follow-button.button-color-3,
.green-rank-btn-primary.button-color-3 {
    background: #1A6355;
    border-color: #1A6355;
    color: #fff;
}

.green-rank-card-footer .follow-button.button-color-3:hover,
.green-rank-btn-primary.button-color-3:hover {
    background: #14524a;
    border-color: #14524a;
}

/* Follow Button - Not following state (button-color-2) */
.green-rank-card-footer .follow-button.button-color-2 {
    background: #b9475e;
    border-color: #b9475e;
    color: #fff;
}

.green-rank-card-footer .follow-button.button-color-2:hover {
    background: #e79275;
    border-color: #e79275;
}

/* Secondary Button (View Profile) */
.green-rank-btn-secondary {
    background: #fff;
    color: #1A6355;
    border-color: #1A6355;
}

.green-rank-btn-secondary:hover {
    background: #1A6355;
    color: #fff;
}

/* ============================================
   GREEN SCORE INDICATOR (Optional)
   ============================================ */

.green-rank-score-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #f9fafb;
    border-top: 1px solid #f0f0f0;
}

.green-rank-score-label {
    font-size: 12px;
    color: #7d91a3;
    white-space: nowrap;
}

.green-rank-score-track {
    flex: 1;
    height: 6px;
    background: #e6e6e6;
    border-radius: 3px;
    overflow: hidden;
}

.green-rank-score-fill {
    height: 100%;
    background: linear-gradient(90deg, #1A6355 0%, #4CAF50 50%, #8BC34A 100%);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.green-rank-score-value {
    font-size: 12px;
    font-weight: 600;
    color: #1A6355;
    min-width: 40px;
    text-align: right;
}

/* ============================================
   CERTIFICATES LIST (Compact)
   ============================================ */

.green-rank-certificates {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.green-rank-cert-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.green-rank-cert-tag svg {
    width: 12px;
    height: 12px;
}

.green-rank-cert-tag.cert-organic {
    background: #e8f5e9;
    color: #1A6355;
}

.green-rank-cert-tag.cert-geographical {
    background: #fff3e0;
    color: #bf833a;
}

.green-rank-cert-tag.cert-good-agriculture {
    background: #e3f2fd;
    color: #1976d2;
}

/* ============================================
   SECTION HEADER
   ============================================ */

.green-rank-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #1A6355;
}

.green-rank-section-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #1A6355;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.green-rank-section-title svg {
    width: 28px;
    height: 28px;
    color: #4CAF50;
}

.green-rank-section-subtitle {
    font-size: 14px;
    color: #7d91a3;
    margin: 5px 0 0;
}

.green-rank-view-all {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #b9475e;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.green-rank-view-all:hover {
    color: #e79275;
}

.green-rank-view-all svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.green-rank-view-all:hover svg {
    transform: translateX(3px);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet Wide (1170px) */
@media (max-width: 1170px) {
    .green-rank-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet (1050px) */
@media (max-width: 1050px) {
    .green-rank-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .green-rank-card {
        max-width: none;
    }
}

/* Mobile Large (750px) */
@media (max-width: 750px) {
    /* Show grid on topsellers page, swiper on homepage */
    .green-rank-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* Only hide grid if swiper is available */
    .green-rank-swiper-container + .green-rank-grid,
    .has-swiper .green-rank-grid {
        display: none;
    }

    .green-rank-swiper-container {
        display: block;
    }

    .green-rank-swiper .swiper-slide {
        width: 280px;
    }

    .green-rank-card {
        width: 100%;
        height: auto;
    }

    .green-rank-card-header {
        padding: 15px;
    }

    .green-rank-avatar {
        width: 60px;
        height: 60px;
    }

    .green-rank-name {
        font-size: 18px;
    }

    .green-rank-info {
        padding-right: 50px;
    }

    .green-rank-badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .green-rank-card-body {
        padding: 12px 15px;
    }

    .green-rank-card-footer {
        padding: 12px 15px;
    }

    .green-rank-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .green-rank-section-title {
        font-size: 24px;
    }

    .green-rank-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Mobile (670px) */
@media (max-width: 670px) {
    .green-rank-swiper .swiper-slide {
        width: 260px;
    }

    .green-rank-products {
        gap: 6px;
    }

    .green-rank-product-count {
        font-size: 12px;
        padding: 5px 10px;
    }

    /* Stack buttons vertically on small mobile */
    .green-rank-card-footer {
        flex-direction: column;
        padding: 12px;
    }

    .green-rank-btn {
        width: 100%;
        padding: 10px 12px;
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        box-sizing: border-box;
    }

    .green-rank-btn svg {
        flex-shrink: 0;
        width: 14px;
        height: 14px;
    }
}

/* Mobile Small (400px) */
@media (max-width: 400px) {
    .green-rank-swiper .swiper-slide {
        width: 240px;
    }

    .green-rank-avatar {
        width: 55px;
        height: 55px;
    }

    .green-rank-name {
        font-size: 16px;
    }

    .green-rank-location {
        font-size: 12px;
    }

    .green-rank-rating-stars svg {
        width: 12px;
        height: 12px;
    }

    .green-rank-rating-score {
        font-size: 13px;
    }
}

/* Desktop - Hide swiper, show grid */
@media (min-width: 751px) {
    .green-rank-swiper-container {
        display: none;
    }

    .green-rank-grid {
        display: grid;
    }
}

/* ============================================
   TOPSELLERS PAGE SPECIFIC
   ============================================ */

/* Topsellers page - always show grid, hide swiper */
.body-topsellers .green-rank-grid {
    display: grid !important;
}

.body-topsellers .green-rank-swiper-container {
    display: none !important;
}

/* Topsellers mobile adjustments */
@media (max-width: 750px) {
    .body-topsellers .green-rank-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 500px) {
    .body-topsellers .green-rank-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* ============================================
   2-COLUMN HORIZONTAL CARD LAYOUT (New Design)
   Sol: Store Logo | Orta: Bilgiler | Sağ: Profil Fotosu
   ============================================ */

/* 2 Kolonlu Grid */
.green-rank-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px 0;
}

/* Horizontal Kart Tasarımı */
.green-rank-card-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 16px 20px;
    gap: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    height: auto;
    min-height: 100px;
}

.green-rank-card-horizontal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 99, 85, 0.12);
    border-color: #1A6355;
}

/* Sol: Store Logo */
.green-rank-store-logo-link {
    flex-shrink: 0;
}

.green-rank-store-logo {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #1A6355;
    background: #FFF3E5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.green-rank-store-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Orta: Bilgiler */
.green-rank-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.green-rank-store-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #1A6355;
    line-height: 1.2;
}

.green-rank-store-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.green-rank-store-title a:hover {
    color: #b9475e;
}

.green-rank-producer-name {
    font-size: 13px;
    color: #595959;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.green-rank-producer-label {
    color: #7d91a3;
}

.green-rank-producer-name a {
    color: #1A6355;
    text-decoration: none;
    font-weight: 500;
}

.green-rank-producer-name a:hover {
    color: #b9475e;
    text-decoration: underline;
}

/* Lokasyon (horizontal card) */
.green-rank-card-horizontal .green-rank-location {
    font-size: 12px;
    color: #7d91a3;
    margin: 2px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.green-rank-card-horizontal .green-rank-location svg {
    width: 12px;
    height: 12px;
    color: #b9475e;
}

/* Rating (horizontal card) */
.green-rank-card-horizontal .green-rank-rating {
    margin-top: 2px;
}

/* Sertifika Badge (Inline, küçük) */
.green-rank-cert-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 4px;
    width: fit-content;
}

.green-rank-cert-inline svg {
    width: 10px;
    height: 10px;
}

.green-rank-cert-inline.badge-green-premium {
    background: linear-gradient(135deg, #1A6355 0%, #2d8a78 100%);
    color: #fff;
}

.green-rank-cert-inline.badge-green-verified {
    background: linear-gradient(135deg, #4CAF50 0%, #66bb6a 100%);
    color: #fff;
}

.green-rank-cert-inline.badge-green-certified {
    background: linear-gradient(135deg, #bf833a 0%, #d4a05a 100%);
    color: #fff;
}

/* Sağ: Profil Fotoğrafı */
.green-rank-user-avatar-link {
    flex-shrink: 0;
}

.green-rank-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e6e6e6;
    transition: border-color 0.2s, transform 0.2s;
}

.green-rank-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.green-rank-user-avatar-link:hover .green-rank-user-avatar {
    border-color: #b9475e;
    transform: scale(1.05);
}

/* ============================================
   2-COLUMN RESPONSIVE
   ============================================ */

@media (max-width: 1170px) {
    .green-rank-grid-2col {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .green-rank-card-horizontal {
        padding: 14px 16px;
        gap: 12px;
    }

    .green-rank-store-logo {
        width: 60px;
        height: 60px;
    }

    .green-rank-store-title {
        font-size: 16px;
    }

    .green-rank-user-avatar {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 750px) {
    .green-rank-grid-2col {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .green-rank-card-horizontal {
        padding: 12px 14px;
    }
}

@media (max-width: 500px) {
    .green-rank-card-horizontal {
        flex-wrap: wrap;
        gap: 10px;
    }

    .green-rank-store-logo {
        width: 55px;
        height: 55px;
    }

    .green-rank-card-content {
        flex: 1;
        min-width: calc(100% - 130px);
    }

    .green-rank-store-title {
        font-size: 15px;
    }

    .green-rank-producer-name {
        font-size: 12px;
    }

    .green-rank-user-avatar {
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   LOADING / SKELETON STATE
   ============================================ */

.green-rank-card.is-loading .green-rank-avatar,
.green-rank-card.is-loading .green-rank-product-thumb {
    background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   EMPTY STATE
   ============================================ */

.green-rank-empty {
    text-align: center;
    padding: 60px 20px;
    background: #FFF3E5;
    border-radius: 8px;
}

.green-rank-empty svg {
    width: 64px;
    height: 64px;
    color: #c8c0bb;
    margin-bottom: 15px;
}

.green-rank-empty-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #1A6355;
    margin: 0 0 10px;
}

.green-rank-empty-text {
    font-size: 14px;
    color: #7d91a3;
    margin: 0;
}

/* ============================================
   NEW CARD DESIGN - Vertical Layout with Header + Body + Footer
   Sol: Store Logo | Orta: Bilgiler | Sağ: User Avatar
   ============================================ */

/* Base Card - New Design */
.green-rank-card-new {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.green-rank-card-new:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(26, 99, 85, 0.12);
    border-color: #1A6355;
}

/* Header - Store Logo + Info + User Avatar */
.green-rank-card-header-new {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #FFF3E5 0%, #ffffff 100%);
    border-bottom: 1px solid #f0f0f0;
}

/* Store Logo - Left Side */
.green-rank-card-new .green-rank-store-logo {
    width: 65px;
    height: 65px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #1A6355;
    background: #FFF3E5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.green-rank-card-new .green-rank-store-logo:hover {
    transform: scale(1.03);
    box-shadow: 0 3px 10px rgba(26, 99, 85, 0.2);
}

.green-rank-card-new .green-rank-store-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.green-rank-store-logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f5e9 0%, #FFF3E5 100%);
}

.green-rank-store-logo-placeholder svg {
    width: 28px;
    height: 28px;
    color: #1A6355;
    opacity: 0.5;
}

/* Card Info - Middle */
.green-rank-card-new .green-rank-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
}

.green-rank-card-new .green-rank-store-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    color: #1A6355;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.green-rank-card-new .green-rank-store-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.green-rank-card-new .green-rank-store-title a:hover {
    color: #b9475e;
}

.green-rank-card-new .green-rank-producer-name {
    font-size: 13px;
    color: #595959;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.green-rank-card-new .green-rank-producer-label {
    color: #7d91a3;
}

.green-rank-card-new .green-rank-producer-name a {
    color: #1A6355;
    text-decoration: none;
    font-weight: 500;
}

.green-rank-card-new .green-rank-producer-name a:hover {
    color: #b9475e;
    text-decoration: underline;
}

.green-rank-card-new .green-rank-location {
    font-size: 12px;
    color: #7d91a3;
    margin: 2px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.green-rank-card-new .green-rank-location svg {
    width: 13px;
    height: 13px;
    color: #b9475e;
    flex-shrink: 0;
}

.green-rank-card-new .green-rank-rating {
    margin-top: 2px;
}

/* User Avatar - Right Side */
.green-rank-card-new .green-rank-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e6e6e6;
    flex-shrink: 0;
    transition: border-color 0.2s, transform 0.2s;
}

.green-rank-card-new .green-rank-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.green-rank-card-new .green-rank-user-avatar-link:hover .green-rank-user-avatar {
    border-color: #b9475e;
    transform: scale(1.05);
}

/* Body - Products + Green Score */
.green-rank-card-body-new {
    padding: 14px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Meta Row - Product Count + Badge */
.green-rank-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.green-rank-card-new .green-rank-product-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f0f5f4;
    color: #1A6355;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    margin: 0;
}

.green-rank-card-new .green-rank-product-count svg {
    width: 13px;
    height: 13px;
}

/* Certificate Badge */
.green-rank-cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.green-rank-cert-badge svg {
    width: 11px;
    height: 11px;
}

.green-rank-cert-badge.badge-green-premium {
    background: linear-gradient(135deg, #1A6355 0%, #2d8a78 100%);
    color: #fff;
}

.green-rank-cert-badge.badge-green-verified {
    background: linear-gradient(135deg, #4CAF50 0%, #66bb6a 100%);
    color: #fff;
}

/* Products Grid - 4 items */
.green-rank-card-new .green-rank-products,
.green-rank-card-new .green-rank-products-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.green-rank-card-new .green-rank-product-thumb {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e6e6e6;
    transition: transform 0.2s, border-color 0.2s;
}

.green-rank-card-new .green-rank-product-thumb:hover {
    transform: scale(1.03);
    border-color: #1A6355;
}

.green-rank-card-new .green-rank-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Green Score Bar */
.green-rank-card-new .green-rank-score-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: transparent;
    border: none;
}

.green-rank-card-new .green-rank-score-label {
    font-size: 11px;
    color: #7d91a3;
    white-space: nowrap;
}

.green-rank-card-new .green-rank-score-track {
    flex: 1;
    height: 5px;
    background: #e6e6e6;
    border-radius: 3px;
    overflow: hidden;
}

.green-rank-card-new .green-rank-score-fill {
    height: 100%;
    background: linear-gradient(90deg, #1A6355 0%, #4CAF50 50%, #8BC34A 100%);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.green-rank-card-new .green-rank-score-value {
    font-size: 11px;
    font-weight: 600;
    color: #1A6355;
    min-width: 30px;
    text-align: right;
}

/* Footer - Buttons */
.green-rank-card-footer-new {
    padding: 12px 18px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
    background: #fafafa;
}

.green-rank-card-new .green-rank-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.green-rank-card-new .green-rank-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.green-rank-card-new .green-rank-btn-primary {
    background: #b9475e;
    color: #fff;
    border-color: #b9475e;
}

.green-rank-card-new .green-rank-btn-primary:hover {
    background: #e79275;
    border-color: #e79275;
}

/* Store Follow Button - Active State (Twitter-style) */
.green-rank-card-new .event-store-follow.active {
    background: #fff;
    color: #1A6355;
    border-color: #1A6355;
}

.green-rank-card-new .event-store-follow.active svg {
    fill: #1A6355;
}

.green-rank-card-new .event-store-follow.active:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #dc2626;
}

.green-rank-card-new .event-store-follow.active:hover svg {
    fill: #dc2626;
}

/* Loading state */
.green-rank-card-new .event-store-follow.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.green-rank-card-new .green-rank-btn-secondary {
    background: #fff;
    color: #1A6355;
    border-color: #1A6355;
}

.green-rank-card-new .green-rank-btn-secondary:hover {
    background: #1A6355;
    color: #fff;
}

/* Follow Button Integration - New Card */
.green-rank-card-footer-new .follow-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

.green-rank-card-footer-new .follow-button.button-color-2 {
    background: #b9475e;
    border-color: #b9475e;
    color: #fff;
}

.green-rank-card-footer-new .follow-button.button-color-2:hover {
    background: #e79275;
    border-color: #e79275;
}

.green-rank-card-footer-new .follow-button.button-color-3 {
    background: #1A6355;
    border-color: #1A6355;
    color: #fff;
}

.green-rank-card-footer-new .follow-button.button-color-3:hover {
    background: #14524a;
    border-color: #14524a;
}

/* ============================================
   NEW CARD RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1170px) {
    .green-rank-card-new .green-rank-store-logo {
        width: 58px;
        height: 58px;
    }

    .green-rank-card-new .green-rank-store-title {
        font-size: 16px;
    }

    .green-rank-card-new .green-rank-user-avatar {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 900px) {
    .green-rank-card-header-new {
        padding: 14px 15px;
        gap: 12px;
    }

    .green-rank-card-new .green-rank-store-logo {
        width: 55px;
        height: 55px;
    }

    .green-rank-card-new .green-rank-store-title {
        font-size: 15px;
    }

    .green-rank-card-new .green-rank-producer-name {
        font-size: 12px;
    }

    .green-rank-card-body-new {
        padding: 12px 15px;
    }

    .green-rank-card-footer-new {
        padding: 10px 15px;
    }
}

@media (max-width: 750px) {
    .green-rank-grid-2col {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .green-rank-card-header-new {
        padding: 12px 14px;
        gap: 10px;
    }

    .green-rank-card-new .green-rank-store-logo {
        width: 52px;
        height: 52px;
    }

    .green-rank-card-new .green-rank-user-avatar {
        width: 42px;
        height: 42px;
    }

    .green-rank-card-body-new {
        padding: 10px 14px;
        gap: 10px;
    }

    .green-rank-card-new .green-rank-products {
        gap: 6px;
    }
}

@media (max-width: 500px) {
    .green-rank-card-header-new {
        padding: 10px 12px;
    }

    .green-rank-card-new .green-rank-store-logo {
        width: 48px;
        height: 48px;
        border-radius: 8px;
    }

    .green-rank-store-logo-placeholder svg {
        width: 22px;
        height: 22px;
    }

    .green-rank-card-new .green-rank-store-title {
        font-size: 14px;
    }

    .green-rank-card-new .green-rank-producer-name {
        font-size: 11px;
    }

    .green-rank-card-new .green-rank-location {
        font-size: 11px;
    }

    .green-rank-card-new .green-rank-user-avatar {
        width: 38px;
        height: 38px;
    }

    .green-rank-meta-row {
        flex-wrap: wrap;
    }

    .green-rank-card-new .green-rank-product-count {
        font-size: 11px;
        padding: 4px 8px;
    }

    .green-rank-cert-badge {
        font-size: 9px;
        padding: 3px 8px;
    }

    .green-rank-card-footer-new {
        padding: 10px 12px;
        flex-direction: column;
        gap: 8px;
    }

    .green-rank-card-new .green-rank-btn,
    .green-rank-card-footer-new .follow-button {
        padding: 10px 12px;
        font-size: 13px;
    }
}
