/**
 * Kártyák és Popup Modal - Sötét Téma
 * Termékkártyák, főoldali kártyák és modal stílusok
 */

/* === HEADER SZEKCIÓ === */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
}

.header .description {
    font-size: 1.1em;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

/* === CARD CONTAINER === */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin: 30px 0;
}

/* === FŐOLDALI KÁRTYÁK === */
.card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    width: 100%;
    max-width: 380px;
    transition: var(--transition-normal);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, transparent 40%, var(--accent-primary) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: var(--transition-normal);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    background: var(--accent-gradient);
    padding: 25px;
    text-align: center;
    position: relative;
}

.card:nth-child(2) .card-header {
    background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%);
}

.card-title {
    font-size: 1.35em;
    margin: 0;
    color: white;
}

.card-body {
    padding: 25px;
}

.card-text {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.card .btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: var(--accent-gradient);
    color: white;
    text-align: center;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition-normal);
}

.card .btn:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.card:nth-child(2) .btn {
    background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%);
}

.card:nth-child(2) .btn:hover {
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

/* === INACTIVE CARD === */
.card.inactive {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.3);
    pointer-events: none;
    position: relative;
}

.card.inactive .card-header,
.card.inactive .card-body {
    filter: blur(6px);
    opacity: 0.5;
}

.card.inactive::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(45deg, transparent 46%, rgba(239, 68, 68, 0.6) 48%, rgba(239, 68, 68, 0.6) 52%, transparent 54%),
        linear-gradient(135deg, transparent 46%, rgba(239, 68, 68, 0.6) 48%, rgba(239, 68, 68, 0.6) 52%, transparent 54%);
    z-index: 2;
}

.admin-access-ribbon {
    position: absolute;
    width: 200%;
    top: 50%;
    left: -50%;
    text-align: center;
    line-height: 2.5em;
    font-weight: 700;
    font-size: 1em;
    background: linear-gradient(135deg, var(--color-error) 0%, #dc2626 100%);
    color: white;
    transform: rotate(-20deg);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* === SYSTEM INFO === */
.system-info {
    margin-top: 50px;
    padding: 25px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.system-info h2 {
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.system-info p {
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.system-info strong {
    color: var(--text-primary);
}

/* === PRODUCT GRID === */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin: 30px 0;
    padding: 30px;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
}

/* === PRODUCT CARD === */
.product-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: var(--transition-normal);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
    border-color: var(--border-glow);
}

/* === PRODUCT IMAGE === */
.product-image-container {
    height: 200px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: var(--transition-slow);
}

.product-image:hover {
    transform: scale(1.05);
}

.no-image {
    color: var(--text-muted);
    font-size: 14px;
}

/* === PRODUCT BADGES === */
.product-premium {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1a1a2e;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    z-index: 2;
    text-transform: uppercase;
}

.product-weighted {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%);
    color: white;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    z-index: 2;
}

.product-stock {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
}

.product-stock.AVAILABLE {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.product-stock.UNAVAILABLE {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.product-stock.LIMITED {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}

/* === PRODUCT DETAILS === */
.product-details {
    padding: 20px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    height: 48px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-brand {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 10px;
}

.product-amount {
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-bottom: 12px;
}

/* === PRODUCT PRICE === */
.product-price {
    margin: 15px 0;
}

.price-original {
    color: var(--text-muted);
    text-decoration: line-through;
    font-size: 14px;
    margin-right: 8px;
}

.price-sale {
    color: var(--color-error);
    font-weight: 700;
    font-size: 18px;
}

.price-regular {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 18px;
}

.price-unit {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* === PRODUCT VIEW BUTTON === */
.product-view-button {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-normal);
    text-align: center;
    text-decoration: none;
    margin-top: 15px;
}

.product-view-button:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* === PRODUCT META === */
.product-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
}

.product-id::before {
    content: '#';
    color: var(--accent-primary);
}

/* === PRODUCT MODAL === */
.product-modal {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.4s ease;
}

.product-modal.show {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    visibility: visible;
    opacity: 1;
}

.product-modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(0, 217, 255, 0.1);
    border: 1px solid var(--border-color);
    position: relative;
    transform: scale(0.8) translateY(50px);
    opacity: 0;
    transition: var(--transition-slow);
}

.product-modal.show .product-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.product-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-normal);
}

.product-modal-close:hover {
    background: var(--color-error);
    border-color: var(--color-error);
    transform: rotate(90deg);
}

/* === MODAL BODY === */
.product-modal-body {
    padding: 35px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px;
}

/* === PRODUCT GALLERY === */
.product-gallery {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 15px;
    align-items: start;
}

.product-gallery.single-image-gallery {
    grid-template-columns: 1fr;
}

.product-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.thumbnail {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition-fast);
    background: var(--bg-tertiary);
}

.thumbnail:hover {
    border-color: var(--accent-primary);
}

.thumbnail.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
}

.main-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    min-height: 350px;
    overflow: hidden;
}

.main-image {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
}

/* === PRODUCT INFO === */
.product-info h2 {
    margin-top: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
    line-height: 1.4;
    max-width: 100%;
}

.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.product-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.product-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.product-flag {
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.product-flag.premium {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.product-flag.weighted {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
}

.product-flag.archived {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-error);
}

.product-flag.stock-AVAILABLE {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
}

.product-flag.stock-UNAVAILABLE {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-error);
}

.product-flag.stock-LIMITED {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
}

/* === PRODUCT PRICE CARD === */
.product-price-card {
    background: var(--bg-glass);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.price-main {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 10px 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-currency {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
}

.price-original-large {
    font-size: 18px;
    text-decoration: line-through;
    color: var(--text-muted);
}

.price-discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--color-error) 0%, #dc2626 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.price-emphasis {
    font-size: 14px;
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 6px;
    color: var(--text-secondary);
}

.price-saving-details {
    background: rgba(16, 185, 129, 0.1);
    padding: 14px;
    border-radius: var(--radius-md);
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.price-saving-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.price-saving-value {
    font-weight: 700;
    color: var(--color-success);
    font-size: 18px;
}

.price-unit-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* === PRODUCT SPEC === */
.product-spec {
    margin: 20px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.spec-item {
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.spec-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.spec-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

/* === COUNTRY TAG === */
.country-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--color-success);
    margin: 3px;
}

.country-flag {
    width: 20px;
    height: auto;
    margin-right: 8px;
}

/* === CATEGORY TAGS === */
.product-category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.category-tag-static {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.2);
    color: var(--accent-primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.category-tag-static::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    margin-right: 8px;
}

/* === UNIT PRICE WARNING === */
.unit-price-warning,
.card-unit-price-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    padding: 15px;
    margin: 15px 0;
    color: var(--color-warning);
}

.card-unit-price-warning {
    padding: 8px 12px;
    font-size: 12px;
    text-align: center;
}

/* === PAGINATION === */
.modern-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 35px;
    flex-wrap: wrap;
}

.modern-pagination a,
.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.modern-pagination a:hover,
.pagination a:hover:not(.active) {
    background: rgba(0, 217, 255, 0.1);
    color: var(--accent-primary);
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

.modern-pagination a.active,
.pagination a.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

.modern-pagination .page-nav {
    font-weight: 600;
}

/* === NO DATA === */
.no-product-data {
    text-align: center;
    padding: 60px 40px;
    background: var(--bg-glass);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.no-product-data h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.no-product-data p {
    color: var(--text-muted);
}

/* === RESZPONZÍV === */
@media (max-width: 768px) {
    .product-modal-body {
        grid-template-columns: 1fr;
        padding: 25px;
    }

    .product-gallery {
        grid-template-columns: 1fr;
    }

    .product-thumbnails {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .thumbnail {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }

    .product-spec {
        grid-template-columns: 1fr;
    }

    .product-grid {
        padding: 15px;
    }

    .price-main {
        font-size: 26px;
    }
}