/**
 * Public Profile Styles
 * Consolidated CSS for public profile pages
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ===== GLOBAL STYLES ===== */
* {
    box-sizing: border-box;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes gradientMove {

    0%,
    100% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 0%;
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===== MAIN PROFILE CONTAINER ===== */
.public-profile-wrap {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: fadeIn 0.6s ease-out;
}

/* ===== PROFILE BANNER SECTION ===== */
.profile-banner-section {
    position: relative;
    height: 450px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ff6b95 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease-in-out infinite;
}

.profile-banner-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.profile-rating-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    border-radius: 12px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 10;
}

.profile-rating-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
}

.profile-rating-star {
    font-size: 1.2rem;
    color: #fbbf24;
}

.profile-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-banner-container:hover .profile-banner {
    transform: scale(1.05);
}

.profile-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.3) 50%, transparent);
    padding: 50px;
    color: white;
    display: flex;
    align-items: flex-end;
    gap: 40px;
    animation: slideInUp 0.8s ease-out 0.2s both;
}

.profile-avatar-container {
    flex-shrink: 0;
    position: relative;
}

.profile-avatar-container::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b95, #667eea, #764ba2);
    animation: rotate 3s linear infinite;
    z-index: -1;
}

.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 6px solid white;
    object-fit: cover;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.profile-avatar:hover {
    transform: scale(1.05);
}

.profile-basic-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 15px 0;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.6);
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.profile-role-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.profile-role-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.profile-stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    text-align: center;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.stat-item:hover {
    transform: translateY(-3px);
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    display: block;
    font-size: 0.95rem;
    opacity: 0.95;
    margin-top: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== PROFILE CONTACT INFO ===== */
.profile-contact-info {
    flex-shrink: 0;
    min-width: 300px;
    max-width: 350px;
}

.contact-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.contact-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.contact-value,
.contact-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    word-break: break-all;
    line-height: 1.3;
}

.contact-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* ===== PROFILE CONTENT SECTION ===== */
.profile-content-section {
    position: relative;
}

.profile-content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2, #ff6b95);
}

.profile-content-container {
    display: grid;
    gap: 35px;
    animation: slideInUp 0.8s ease-out 0.4s both;
}

.profile-card {
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #ff6b95);
    background-size: 200% 100%;
    animation: gradientMove 3s ease-in-out infinite;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    padding: 30px 20px 0;
    color: #1e293b;
    position: relative;
}


.card-content {
    padding: 25px 30px 30px 30px;
}

.user-intro {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #374151;
    margin: 0 0 15px 0;
    font-weight: 500;
}

.user-description {
    color: #6b7280;
    line-height: 1.7;
    margin: 0;
    font-size: 1rem;
}

.profile-intro-section {
    position: relative;
}

.profile-intro-text {
    display: inline;
    line-height: 1.7;
    color: #374151;
    font-size: 1rem;
}

.profile-desc {
    color: #6b7280;
}

.profile-intro-toggle {
    display: inline-block;
    margin: 0 0 0 5px;
    background: none;
    border: none;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    height: unset;
    min-height: unset;
    line-height: unset;
    padding: 0;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.profile-intro-toggle:hover {
    color: #764ba2;
    text-decoration: underline;
}

.info-grid {
    display: grid;
    gap: 18px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.info-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #fff, #f8fafc);
}

.info-item:hover::before {
    opacity: 1;
}

.info-icon {
    font-size: 1.4rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea20, #764ba220);
    border-radius: 8px;
    flex-shrink: 0;
}

.info-label {
    font-weight: 600;
    color: #374151;
    min-width: 120px;
    font-size: 0.95rem;
}

.info-value {
    color: #1f2937;
    flex: 1;
    font-weight: 500;
}

.info-link {
    color: #667eea;
    text-decoration: none;
    flex: 1;
    font-weight: 500;
    transition: color 0.3s ease;
}

.info-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ===== PRODUCTS GRID STYLES ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.product-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

.product-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.product-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-item:hover::before {
    opacity: 1;
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-item:hover .product-image {
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
    position: relative;
    z-index: 2;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #1f2937;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.product-item:hover .product-title {
    color: #667eea;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #059669;
    margin: 0 0 15px 0;
}

.product-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-link:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.no-products {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 60px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

/* ===== USER PRODUCTS CONTAINER ===== */
.user-products-container {
    width: 100%;
    margin: 0 auto;
}

.user-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-avatar img {
    border-radius: 50%;
    border: 3px solid #ddd;
}

.user-name {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.user-stats {
    display: flex;
    gap: 20px;
}

.user-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
}

.user-stats .stat-item i {
    color: #ed7400;
}

.products-filters {
    display: flex;
    gap: 20px;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.form-control {
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.products-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    color: #666;
}

.loading-spinner i {
    font-size: 1.5rem;
    margin-right: 10px;
}

.user-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    padding: 0;
    position: relative;
}

.user-product-item {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    cursor: pointer;
}

.user-product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #d1d5db;
}

.user-product-item .product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f9fafb;
}

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

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

.no-image-placeholder {
    width: 100%;
    height: 200px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 2.5rem;
    position: relative;
}

.user-product-item .product-info {
    padding: 12px;
    position: relative;
    background: #ffffff;
}

.user-product-item .product-title {
    margin: 0 0 6px 0;
    font-size: 14px;
    line-height: 1.3;
    height: auto;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.user-product-item .product-title a {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.user-product-item .product-title a:hover {
    color: #3b82f6;
}

.user-product-item .product-description {
    margin: 4px 0 6px 0;
    font-size: 12px;
    line-height: 1.4;
    color: #6b7280;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    height: 2.4em;
}

.user-product-item .product-price bdi {
    font-size: 14px;
    font-weight: 700;
    color: red;
    margin: 4px 0 6px 0;
}

.product-meta {
    margin: 0;
    padding: 5px 10px;
    border: none;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: absolute;
    bottom: 0;
    width: 100%;
    justify-content: flex-end;
}

.product-date,
.product-sales,
.product-views,
.product-rating {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f3f4f6;
    color: #6b7280;
}

.product-sales {
    color: #16a34a;
    background: #dcfce7;
}

.product-rating {
    color: #f59e0b;
    background: #fef3c7;
}

.product-actions {
    display: flex;
    margin-top: 8px;
    gap: 6px;
}

.btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    flex: 1;
}

.btn-primary {
    background-color: #ed7400;
    color: white;
}

.btn-primary:hover {
    background: #16a34a;
    color: white;
}

.btn-secondary {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #e5e7eb;
    color: #374151;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.products-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding:0 20px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pagination-controls button {
    margin: 0;
}
.page-numbers {
    display: flex;
    gap: 5px;
}

.page-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.page-number:hover,
.page-number.active {
    background: #ed7400;
    color: white;
    border-color: #ed7400;
}

.load-more-btn {
    margin: 20px auto;
    display: block;
}

.no-products-message {
    text-align: center;
    padding: 60px 20px;
}

.empty-state {
    max-width: 400px;
    margin: 0 auto;
}

.empty-state i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: #666;
}

.empty-state p {
    color: #999;
    margin: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .profile-content-section {
        padding: 40px 30px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

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

@media (max-width: 900px) {
    .user-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .profile-overlay {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 30px 20px;
        gap: 25px;
    }

    .profile-avatar {
        width: 120px;
        height: 120px;
    }

    .profile-name {
        font-size: 2.2rem;
    }

    .profile-stats {
        justify-content: center;
        gap: 25px;
    }

    .profile-content-section {
        padding: 30px 20px;
    }

    .card-title {
        font-size: 1.2rem;
        padding: 20px
    }

    .card-content {
        padding: 0 15px;
    }

    .info-grid {
        gap: 15px;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 15px;
    }

    .info-label {
        min-width: auto;
        font-size: 0.9rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .profile-rating-badge {
        top: 15px;
        right: 15px;
        padding: 6px 12px;
    }

    .profile-rating-number {
        font-size: 1rem;
    }

    .profile-rating-star {
        font-size: 1.1rem;
    }

    /* User Products Responsive */
    .user-products-header {
        flex-direction: column;
        gap: 20px;
    }

    .user-info {
        flex-direction: column;
        text-align: center;
    }

    .products-filters {
        gap: 10px;
        width: 100%;
    }

    .user-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
	.user-products-grid .product-actions .btn {
		padding: 5px;
		font-size: 12px;
	}
    .products-pagination {
        flex-direction: column;
        gap: 15px;
    }

    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    .profile-content-container {
        gap: 0;
    }
    .profile-intro-section {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .profile-banner-section {
        height: 650px;
    }

    .profile-name {
        font-size: 1.8rem;
    }

    .profile-stats {
        gap: 15px;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .profile-content-section {
        padding:0;
    }
}