/* public/css/products.css - Styling cho trang sản phẩm */

/* Products Hero Section */
.products-hero {
    padding: 140px 0 80px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.products-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--primary-color);
    transition: var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--primary-light);
}

.breadcrumb i {
    font-size: 10px;
}

.hero-title {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-number {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

/* Product Filter */
.product-filter {
    padding: 40px 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
}

.filter-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
}

.filter-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(0, 212, 255, 0.05);
}

.filter-tab.active {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: white;
}

.filter-sort {
    position: relative;
}

.sort-select {
    padding: 12px 40px 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    cursor: pointer;
    appearance: none;
    min-width: 200px;
}

.sort-select::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
}

/* Featured Product */
.featured-product {
    padding: var(--section-padding);
}

.featured-wrapper {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    border: 2px solid var(--primary-color);
    padding: 60px;
    overflow: hidden;
}

.featured-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.03) 0%, rgba(124, 58, 237, 0.03) 100%);
    z-index: 0;
}

.featured-badge {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    padding: 12px 30px;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    box-shadow: var(--shadow-lg);
}

.featured-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.product-category {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.category-tag {
    padding: 4px 12px;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
}

.category-tag.flagship {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #92400e;
}

.category-tag.automation {
    background: linear-gradient(135deg, #00d4ff, #0ea5e9);
    color: white;
}

.featured-title {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.featured-description {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.featured-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 40px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 212, 255, 0.1);
    transition: var(--transition-normal);
}

.highlight-item:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
}

.highlight-item i {
    color: var(--primary-color);
    font-size: var(--font-size-lg);
}

.highlight-item span {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    font-weight: 500;
}

.featured-pricing {
    margin-bottom: 40px;
}

.price-plans {
    display: flex;
    gap: 12px;
}

.plan-option {
    flex: 1;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    transition: var(--transition-normal);
}

.plan-option:hover {
    border-color: var(--primary-color);
    background: rgba(0, 212, 255, 0.02);
}

.plan-option.popular {
    border-color: var(--primary-color);
    background: rgba(0, 212, 255, 0.05);
}

.plan-option.popular::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
}

.plan-name {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.plan-price {
    display: block;
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--primary-color);
}

.plan-badge {
    position: absolute;
    top: -8px;
    right: 8px;
    background: var(--gradient-primary);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
}

.featured-actions {
    display: flex;
    gap: 16px;
}

/* Featured Visual */
.featured-visual {
    position: relative;
}

.product-showcase {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.showcase-image {
    position: relative;
    z-index: 2;
}

.mockup-container {
    width: 400px;
    height: 300px;
    background: linear-gradient(135deg, #1e1e1e, #2d2d2d);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid #3d3d3d;
}

.mockup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px !important;
    background: #2d2d2d;
    border-bottom: 1px solid #3d3d3d;
}

.mockup-controls {
    display: flex;
    gap: 6px;
}

.control-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control-dot.red {
    background: #ff5f57;
}

.control-dot.yellow {
    background: #ffbd2e;
}

.control-dot.green {
    background: #28ca42;
}

.mockup-title {
    color: #ffffff;
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.mockup-content {
    padding: 20px;
    font-family: 'Monaco', 'Menlo', monospace;
}

.code-line {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.code-line.active {
    background: rgba(0, 212, 255, 0.1);
    border-left: 3px solid var(--primary-color);
    padding-left: 13px;
}

.line-number {
    color: #666;
    font-size: var(--font-size-xs);
    min-width: 20px;
}

.code-text {
    color: #00d4ff;
    font-size: var(--font-size-xs);
}

.floating-features {
    position: absolute;
    top: 95px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999999;
}

.feature-bubble {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    animation: float 3s ease-in-out infinite;
}

.feature-bubble:nth-child(1) {
    animation-delay: 0s;
}

.feature-bubble:nth-child(2) {
    animation-delay: 1s;
}

.feature-bubble:nth-child(3) {
    animation-delay: 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.feature-bubble i {
    color: var(--primary-color);
    font-size: var(--font-size-sm);
}

.feature-bubble span {
    font-size: var(--font-size-xs);
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
}

/* Products Grid */
.products-grid {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.products-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-primary);
    overflow: hidden;
    transition: var(--transition-normal);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.05), transparent);
    transition: var(--transition-slow);
    z-index: 1;
}

.product-card:hover::before {
    left: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.product-card.trending {
    border-color: #ff6b35;
}

.product-card.hot {
    border-color: #ef4444;
}

.product-card.exclusive {
    border-color: #7c3aed;
}

.product-card.coming-soon {
    border-color: #6b7280;
    opacity: 0.8;
}

.product-header {
    position: relative;
    padding: 30px 30px 20px;
    z-index: 2;
}

.product-image {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.product-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-2xl);
    color: white;
    box-shadow: var(--shadow-lg);
}

.product-icon.kylan {
    background: linear-gradient(135deg, #ff6b35, #ff8a65);
}

.product-icon.okvip {
    background: linear-gradient(135deg, #00d4ff, #0ea5e9);
}

.product-icon.seo {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.product-icon.myaloha {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.product-icon.browser {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.product-icon.coming {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.product-badges {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 3;
}

.badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
}

.badge.trending {
    background: linear-gradient(135deg, #ff6b35, #ff8a65);
    color: white;
    animation: badge-glow 2s infinite;
}

.badge.hot {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    animation: badge-pulse 1.5s infinite;
}

.badge.new {
    background: linear-gradient(135deg, #22c55e, #4ade80);
    color: white;
}

.badge.exclusive {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
}

@keyframes badge-glow {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.8);
    }
}

@keyframes badge-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.product-content {
    padding: 0 30px 20px;
    flex: 1;
    position: relative;
    z-index: 2;
}

.category-tag.education {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.category-tag.seo {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.category-tag.browser {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.product-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.3;
}

.product-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
    font-size: var(--font-size-sm);
}

.product-features {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.feature-item i {
    color: var(--primary-color);
}

.product-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-value {
    font-weight: 700;
    color: var(--text-primary);
}

.rating {
    display: flex;
    gap: 2px;
}

.rating i {
    color: #fbbf24;
    font-size: var(--font-size-xs);
}

.reviews {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.product-footer {
    padding: 20px 30px 30px;
    border-top: 1px solid var(--border-primary);
    position: relative;
    z-index: 2;
}

.product-pricing {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.current-price {
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--primary-color);
}

.original-price {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    text-decoration: line-through;
}

.price-period {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.product-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: var(--font-size-sm);
    flex: 1;
}

/* Load More */
.load-more-section {
    text-align: center;
    padding: 40px 0;
}

.load-more-btn {
    margin-bottom: 16px;
}

.load-more-note {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

/* Newsletter */
.newsletter {
    padding: var(--section-padding);
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.newsletter-info h2 {
    font-size: var(--font-size-2xl);
    margin-bottom: 16px;
    color: var(--text-primary);
}

.newsletter-info p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.email-form {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-primary);
}

.form-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.form-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin: 0;
}

.form-note i {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-hero {
        padding: 120px 0 60px;
    }

    .hero-title {
        font-size: var(--font-size-2xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-base);
    }

    .hero-stats {
        gap: 40px;
    }

    .filter-wrapper {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .filter-tabs {
        overflow-x: auto;
        padding-bottom: 8px;
        scrollbar-width: none;
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .sort-select {
        width: 100%;
    }

    .featured-wrapper {
        padding: 40px 20px;
    }

    .featured-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .featured-highlights {
        grid-template-columns: 1fr;
    }

    .price-plans {
        flex-direction: column;
        gap: 8px;
    }

    .featured-actions {
        flex-direction: column;
    }

    .products-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .newsletter-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .form-group {
        flex-direction: column;
    }

    .mockup-container {
        width: 300px;
        height: 255px;
    }

    .floating-features {
        display: none;
    }
}

@media (max-width: 480px) {
    .featured-wrapper {
        padding: 30px 16px;
    }

    .product-card {
        margin: 0 -8px;
    }

    .product-header,
    .product-content,
    .product-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .product-features {
        flex-direction: column;
        gap: 8px;
    }

    .product-actions {
        flex-direction: column;
    }

    .email-form {
        padding: 20px;
    }

    .stat-number {
        font-size: var(--font-size-xl);
    }
}

/* Animation */
.product-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.product-card:nth-child(1) {
    animation-delay: 0.1s;
}

.product-card:nth-child(2) {
    animation-delay: 0.2s;
}

.product-card:nth-child(3) {
    animation-delay: 0.3s;
}

.product-card:nth-child(4) {
    animation-delay: 0.4s;
}

.product-card:nth-child(5) {
    animation-delay: 0.5s;
}

.product-card:nth-child(6) {
    animation-delay: 0.6s;
}

.product-card:nth-child(7) {
    animation-delay: 0.7s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

    .badge.trending,
    .badge.hot,
    .feature-bubble {
        animation: none;
    }
}

/* Print styles */
@media print {

    .products-hero::before,
    .newsletter {
        display: none;
    }

    .product-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}