/**
 * TeachAcademy Dokan Stores Styles
 * Modern design for creator/store listings with premium features
 * Brand Colors: #6CD3C2 (teal), #27282c (dark)
 */

/* Main Wrapper */
.teachacademy-stores-wrapper {
    position: relative;
    padding: 24px 0 40px;
}

/* Header Section */
.teachacademy-stores-header {
    margin-bottom: 24px;
}

.stores-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
}

.stores-count h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #27282c;
}

.stores-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

/* Search and Filter */
.stores-search-filter {
    flex: 1;
    min-width: 0;
    width:100%;
}

/* Hide default Dokan filters we don't want */
.stores-filter-form .store-category,
.stores-filter-form .store-search,
.stores-filter-form [name="store_categories"],
.stores-filter-form [name="open_now"],
.stores-filter-form .item:not(.filter-item) {
    display: none !important;
}

.stores-filter-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-item {
    flex: 1;
    min-width: 180px;
}

.filter-item.search-box {
    flex: 2;
    position: relative;
}

.filter-item.featured-filter {
    flex: 0 0 auto;
    min-width: auto;
    display: flex;
    align-items: center;
}

.featured-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    user-select: none;
}

.featured-label:hover {
    border-color: #6CD3C2;
    background: rgba(108, 211, 194, 0.05);
}

.featured-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #6CD3C2;
}

.featured-label input[type="checkbox"]:checked + span {
    color: #6CD3C2;
    font-weight: 600;
}

.featured-label span {
    line-height: 1;
    transition: color 0.2s ease;
}

.filter-item input[type="text"],
.filter-item select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-item input[type="text"]:focus,
.filter-item select:focus {
    outline: none;
    border-color: #6CD3C2;
    box-shadow: 0 0 0 3px rgba(108, 211, 194, 0.15);
}

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #222222;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
}

.search-button:hover {
    background: #333333;
    transform: translateY(-50%) scale(1.05);
}

/* Stores Grid */
.teachacademy-stores-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

/* Store Card */
.store-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 30px 16px 8px 16px;
    border: 1px solid #f5f5f5;
    text-align: center;
}

.store-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: #6CD3C2;
}

.store-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    pointer-events: none;
    z-index: -1;
}

.store-card-link {
    text-decoration: none !important;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.store-card-link:hover,
.store-card-link:focus {
    text-decoration: none !important;
}

.store-card-link * {
    text-decoration: none !important;
}

/* Arrow in vendor name */
.store-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* Verified Badge */
.verified-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: white;
    border-radius: 50%;
    padding: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.name-arrow {
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #6CD3C2;
    flex-shrink: 0;
}

.store-card:hover .name-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Premium Badge - Hidden, only verified checkmark used */
.premium-badge {
    display: none;
}

/* Store Banner - Hidden for minimalistic design */
.store-banner {
    display: none;
}

/* Store Avatar */
.store-avatar {
    position: relative;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    margin-right: 12px;
}

.store-avatar img {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50%;
    border: 3px solid #f8f8f8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.store-card:hover .store-avatar img {
    border-color: #6CD3C2;
}

/* Store Info */
.store-info {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.store-header {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 8px;
}

.store-header-content {
    flex: 1;
    min-width: 0;
}

.store-name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    text-align: left;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    word-break: break-word;
    line-height: 1.4;
}

.store-name a {
    color: #27282c;
    text-decoration: none;
    transition: color 0.2s ease;
}

.store-name a:hover {
    color: #6CD3C2;
}

/* Rating (in meta) */
.rating-stars {
    display: flex;
    gap: 0px;
    font-size: 11px;
}

.rating-stars .star {
    color: #e5e7eb;
}

.rating-stars .star.full {
    color: #f59e0b;
}

.rating-stars .star.half {
    background: linear-gradient(90deg, #f59e0b 50%, #e5e7eb 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rating-value {
    font-size: 11px;
    font-weight: 600;
    color: #27282c;
    margin-left: 2px;
}

/* Description */
.store-description {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    margin: 0 0 6px 0;
    text-align: left;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Store Meta */
.store-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 8px;
    padding-top: 2px;
    padding-bottom: 15px;
    flex-wrap: wrap;
    margin-bottom: 0px;
}
.store-meta span {
    font-size: 13px;
    font-weight: 300;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item.rating-meta {
    padding-right: 8px;
    border-right: 1px solid #e5e7eb;
}

.meta-item.products-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 8px;
    border-right: 1px solid #e5e7eb;
}

.meta-item.products-meta span,
.meta-item.followers-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.meta-item.products-meta svg,
.meta-item.followers-meta svg {
    color: #6CD3C2;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* No Stores Found */
.no-stores-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-stores-found svg {
    color: #d1d5db;
    margin-bottom: 20px;
}

.no-stores-found h3 {
    font-size: 1.5rem;
    margin: 0 0 12px 0;
    color: #27282c;
}

.no-stores-found p {
    margin: 0;
    font-size: 1rem;
}

/* Pagination */
.teachacademy-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.teachacademy-pagination ul {
    display: flex;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.teachacademy-pagination li {
    list-style: none;
}

.teachacademy-pagination li a,
.teachacademy-pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.teachacademy-pagination li a:hover {
    background: #6CD3C2;
    border-color: #6CD3C2;
    color: white;
}

.teachacademy-pagination li.current span {
    background: #6CD3C2;
    border-color: #6CD3C2;
    color: white;
}

/* Hide default Dokan elements that we're replacing */
.dokan-store-wrap .seller-listing-content {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stores-header-inner {
        flex-direction: column;
    }

    .stores-filter-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    /* Search takes full row */
    .filter-item.search-box {
        grid-column: 1 / -1;
        min-width: 0;
    }

    /* Sort and featured share a row */
    .filter-item.sort-filter {
        min-width: 0;
    }

    .filter-item.featured-filter {
        min-width: 0;
    }

    .filter-item input[type="text"],
    .filter-item select {
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 8px;
    }

    .featured-label {
        padding: 10px 12px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
        border-radius: 8px;
    }

    .search-button {
        padding: 6px 10px;
    }

    .teachacademy-stores-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .store-card {
        padding: 20px 12px 8px;
    }

    .stores-count h2 {
        font-size: 1.5rem;
    }

    .teachacademy-stores-wrapper {
        padding: 16px 0 32px;
    }

    .teachacademy-stores-header {
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .teachacademy-stores-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .teachacademy-stores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
