/* =============================================
   eSIM Shop â Main Stylesheet
   ============================================= */

/* -- Reset & Container -- */
#esim-shop {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1a1a2e;
}

/* -- Breadcrumbs -- */
.esim-breadcrumbs {
    padding: 16px 0;
    font-size: 13px;
    color: #888;
}
.esim-breadcrumbs a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}
.esim-breadcrumbs a:hover {
    color: #1a1a2e;
}
.esim-breadcrumbs .sep {
    margin: 0 6px;
    color: #ccc;
}
.esim-breadcrumbs .current {
    color: #1a1a2e;
    font-weight: 500;
}

/* -- Search Bar -- */
.esim-search-wrap {
    margin: 8px 0 24px;
}
.esim-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 0 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.esim-search-box:focus-within {
    border-color: #1a1a2e;
    box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.08);
}
.esim-search-icon {
    flex-shrink: 0;
    color: #999;
    margin-right: 10px;
}
.esim-search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 14px 0;
    background: transparent;
    color: #1a1a2e;
}
.esim-search-box input::placeholder {
    color: #aaa;
}
.esim-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #999;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}
.esim-search-clear:hover {
    color: #333;
}

/* -- Tab Navigation -- */
.esim-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e8e8e8;
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.esim-tabs::-webkit-scrollbar {
    display: none;
}
.esim-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #888;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
}
.esim-tab svg {
    flex-shrink: 0;
}
.esim-tab:hover {
    color: #555;
}
.esim-tab.active {
    color: #1a1a2e;
    border-bottom-color: #1a1a2e;
}
.esim-tab.active svg {
    stroke: #1a1a2e;
}

/* -- Tab Description -- */
.esim-tab-description {
    margin-bottom: 20px;
}
.esim-tab-description h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #1a1a2e;
}
.esim-tab-description p {
    font-size: 14px;
    color: #777;
    margin: 0;
}

/* -- Product Grid -- */
.esim-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* -- Product Card -- */
.esim-product-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    text-decoration: none;
    color: #1a1a2e;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    cursor: pointer;
}
.esim-product-card:hover {
    border-color: #ccc;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}
.esim-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}
.esim-card-flag {
    width: 32px;
    height: 22px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f0f0;
}
.esim-card-flag-placeholder {
    background: linear-gradient(135deg, #ddd 0%, #eee 100%);
}
.esim-card-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.esim-card-right {
    flex-shrink: 0;
    margin-left: 8px;
}
.esim-card-price {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    white-space: nowrap;
}

/* -- Loading Spinner -- */
.esim-loading {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}
.esim-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e8e8e8;
    border-top-color: #1a1a2e;
    border-radius: 50%;
    animation: esim-spin 0.7s linear infinite;
}
@keyframes esim-spin {
    to { transform: rotate(360deg); }
}

/* -- Load More -- */
.esim-load-more-wrap {
    text-align: center;
    padding: 24px 0;
}
.esim-load-more {
    display: inline-block;
    padding: 12px 36px;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.esim-load-more:hover {
    background: #2a2a4e;
    transform: translateY(-1px);
}

/* -- No Results -- */
.esim-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 16px;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .esim-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .esim-product-card {
        padding: 10px 12px;
    }
    .esim-card-name {
        font-size: 13px;
    }
    .esim-card-price {
        font-size: 13px;
    }
    .esim-tab {
        padding: 10px 14px;
        font-size: 13px;
    }
    .esim-tab-description h2 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .esim-product-grid {
        grid-template-columns: 1fr;
    }
    .esim-tabs {
        gap: 0;
    }
    .esim-tab {
        padding: 10px 10px;
        font-size: 12px;
    }
    .esim-tab svg {
        display: none;
    }
}
