body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 20px;
    padding-top: 35px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== UTILITY CLASSES ========== */

.product-layout {
    display: flex;
    gap: 30px;
}

.product-column {
    flex: 1;
}

.content-padding {
    padding: 30px;
}

/* ========== CONTAINER =.skeleton-image {
    height: 300px;
    margin-bottom: 20px;
}

.skeleton-image.skeleton-large {
    height: 400px;
}

.skeleton-spec {=== */

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: visible;
    position: relative;
}

.product-content {
    display: flex;
    padding: 30px;
    gap: 30px;
    overflow-x: hidden;
}

/* ========== HEADER ========== */

.product-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: visible;
    border-radius: 10px 10px 0 0;
}

.product-header h1 {
    font-size: 18px;
    margin: 0;
}

.header-logo {
    width: 75px;
    height: 75px;
    object-fit: contain;
    position: absolute;
    left: -15px;
    top: -20px;
    z-index: 10;
}

.header-service-logo {
    height: 20px;
    width: auto;
    object-fit: contain;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.9;
    border-radius: 4px;
}

/* ========== FOOTER ========== */

.footer {
    background: linear-gradient(135deg, #6b7b8c, #8b9dad);
    color: white;
    padding: 8px 20px;
    text-align: center;
    margin-top: 0;
    position: relative;
    overflow: visible;
    border-radius: 0 0 10px 10px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.footer p {
    margin: 5px 0;
    font-size: 14px;
    opacity: 0.9;
}

.footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

/* ========== PRODUCT IMAGE & GALLERY ========== */

.product-image {
    flex: 1;
    text-align: center;
}

.image-swiper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide img {
    max-width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.swiper-pagination {
    position: relative;
    margin-top: 15px;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #ccc;
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: #667eea;
}

/* ========== PRODUCT DETAILS ========== */

.product-details {
    flex: 1;
}

.product-title-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.product-meta-tags {
    display: flex;
    justify-content: flex-end; /* Притискаємо все вправо */
    width: 100%;
    gap: 8px; /* Додаємо проміжок між елементами */
}

.product-article, .product-code {
    display: inline-flex;
    align-items: center;
    gap: 6px; /* Додаємо проміжок між іконкою та текстом */
    border-radius: 20px;
    padding: 5px 12px; /* Змінюємо внутрішні відступи */
    font-size: 12px;
    overflow: hidden;
}

.product-code {
    margin-right: auto; /* Відштовхуємо цей елемент вліво */
    background-color: #e8f5e9; /* Світло-зелений фон */
}

.product-article {
    background-color: #fff3e0; /* Світло-оранжевий фон */
}

.meta-label {
    /* Прибираємо стилі кружечка */
    display: flex;
    align-items: center;
    justify-content: center;
}

.meta-label i {
    font-size: 12px; /* Трохи збільшимо іконку */
    /* color: white; - прибираємо білий колір */
}

.meta-value {
    padding: 0; /* Прибираємо зайві відступи */
    font-weight: 600;
    line-height: 1; /* Вирівнюємо текст по вертикалі */
}

.product-code {
    background-color: #e8f5e9; /* Світло-зелений фон */
}

.product-code .meta-label i,
.product-code .meta-value {
    color: #1B5E20; /* Темно-зелений колір для іконки та тексту */
}

.product-article {
    background-color: #fff3e0; /* Світло-оранжевий фон */
}

.product-article .meta-label i,
.product-article .meta-value {
    color: #E65100; /* Темно-оранжевий колір для іконки та тексту */
}

.product-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #333;
    width: 100%;
}

/* ========== PRICE SECTION ========== */

.price-section {
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    position: relative;
    margin: 20px 0;
}

.price-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
}

.price-badge-container {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
}

.discount-badge {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(255, 65, 108, 0.3);
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.current-price {
    font-size: 58px;
    font-weight: 900;
    color: #1a1a1a;
    line-height: 1;
    position: relative;
}

.currency-symbol {
    font-size: 32px;
    vertical-align: super;
}

.per-unit-text {
    font-size: 16px;
    color: #666;
    font-weight: 400;
}

.old-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    font-weight: 500;
}

.product-info {
    margin-top: 25px;
}

.spec-section {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    border: 1px solid #e1e8ed;
}

/* ========== SPECIFICATIONS ========== */

.spec-title {
    font-weight: 600;
    font-size: 15px;
    padding: 10px 14px;
    margin: 0;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
}

.spec-title.high {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.spec-title.medium {
    background: linear-gradient(135deg, #ffa726, #ff9800);
}

.spec-title.low {
    background: linear-gradient(135deg, #78909c, #607d8b);
}

.spec-items {
    background: #ffffff;
    padding: 2px 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid #f0f3f7;
    transition: background-color 0.2s ease;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item:hover {
    background-color: #f8fafe;
}

.info-label {
    font-weight: 500;
    color: #5a6c7d;
    font-size: 14px;
    flex: 1;
}

.info-value {
    color: #2c3e50;
    font-weight: 400;
    font-size: 14px;
    text-align: right;
    max-width: 60%;
    word-wrap: break-word;
}

.spec-list {
    background: #ffffff;
    padding: 6px 14px 6px 32px;
    margin: 0;
    list-style: none;
    position: relative;
}

.spec-list li {
    padding: 6px 0;
    color: #2c3e50;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    border-bottom: 1px solid #f0f3f7;
}

.spec-list li:last-child {
    border-bottom: none;
}

.spec-list li::before {
    content: "•";
    color: #4a90e2;
    font-weight: bold;
    font-size: 30px;
    position: absolute;
    left: -18px;
    top: -7px;
}

.description {
    margin-top: 20px;
    line-height: 1.6;
    color: #555;
    white-space: pre-line;
}

.availability {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    margin-top: 15px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.availability:hover {
    transform: translateY(-2px);
}

.in-stock {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
}

.in-stock::before {
    content: '✓';
    font-size: 18px;
    font-weight: bold;
}

.out-of-stock {
    background: linear-gradient(135deg, #e17055, #d63031);
    color: white;
}

.out-of-stock::before {
    content: '✕';
    font-size: 18px;
    font-weight: bold;
}

/* ========== CUSTOM SECTIONS ========== */

#after-header-full-container,
#after-description-full-container {
    overflow: hidden;
    width: 100%;
    display: block;
}

#after-header-full-container > div {
    margin: 0 -30px;
    padding: 20px 50px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

#after-description-full-container > div {
    margin: 20px -30px 0 -30px;
    padding: 30px 50px;
    background: linear-gradient(135deg, #005541, #003d2f);
    color: white;
    text-align: center;
}

#after-description-full-container h3 {
    margin: 0 0 12px 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
}

#after-description-full-container p {
    margin: 0 0 15px 0;
    color: #e8f5f1;
    font-size: 15px;
    line-height: 1.5;
}

#after-description-full-container a {
    display: inline-block;
    background: #ffffff;
    color: #005541;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

#after-description-full-container a:hover {
    transform: translateY(-2px);
}

/* ========== QR SCANNER ========== */

.qr-scanner-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-scanner-btn i {
    font-size: 26px;
}

.qr-scanner-btn:hover {
    transform: scale(1.1);
}

/* Alpine.js states */
.loader-container,
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 40px;
    text-align: center;
}

/* ========== SKELETON LOADERS ========== */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-header {
    height: 60px;
    border-radius: 10px 10px 0 0;
    margin-bottom: 20px;
}

.skeleton-image {
    height: 300px;
    margin-bottom: 20px;
}

.skeleton-title {
    height: 30px;
    width: 80%;
    margin-bottom: 15px;
}

.skeleton-price {
    height: 80px;
    margin-bottom: 20px;
}

.skeleton-spec {
    height: 100px;
    margin-bottom: 15px;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== ANIMATIONS ========== */

/* Fade-in animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Lazy loading placeholder */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ========== TOAST NOTIFICATIONS ========== */

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 9999;
    animation: toastSlideIn 0.3s ease-out;
    max-width: 90%;
    text-align: center;
}

.toast.success {
    background: #00b894;
}

.toast.error {
    background: #d63031;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.error-content {
    max-width: 500px;
}

.error-code {
    font-size: 120px;
    font-weight: 700;
    color: #e74c3c;
    line-height: 1;
    margin-bottom: 20px;
    font-family: 'Roboto Condensed', sans-serif;
}

.error-title {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: 600;
}

.error-message {
    color: #7f8c8d;
    margin: 0 0 30px 0;
    font-size: 16px;
    line-height: 1.5;
}

.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.error-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.error-btn i {
    font-size: 16px;
}

.error-btn-primary {
    background: #3498db;
    color: white;
}

.error-btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.error-btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.error-btn-secondary:hover {
    background: #bdc3c7;
    transform: translateY(-2px);
}

.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
}

[x-cloak] { display: none !important; }

/* QR Scanner Overlay */
#qr-scanner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#qr-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qr-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    background: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.qr-close-btn:hover {
    transform: scale(1.05);
}

.qr-scan-region {
    position: absolute;
    width: 250px;
    height: 250px;
    border: 3px solid #00ff00;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

@media (max-width: 768px) {
    .product-content {
        flex-direction: column;
        padding: 20px;
    }
    
    .current-price {
        font-size: 44px;
    }
    
    .currency-symbol {
        font-size: 26px;
    }
    
    .per-unit-text {
        font-size: 14px;
    }
    
    .discount-badge {
        font-size: 14px;
        padding: 5px 12px;
    }
    
    .old-price {
        font-size: 14px;
    }
    
    .price-section {
        padding: 25px 20px;
    }
    
    .price-badge-container {
        top: 12px;
        right: 12px;
        gap: 8px;
    }
    
    #after-header-full-container > div {
        margin: 0 -20px;
        padding: 20px 30px;
    }
    
    #after-description-full-container > div {
        margin: 20px -20px 0 -20px;
        padding: 25px 30px;
    }
    
    .qr-scan-region {
        width: 200px;
        height: 200px;
    }
}

/* ========== ABOUT MODAL ========== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 450px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-logo {
    margin-bottom: 20px;
}

.modal-logo img {
    width: 80px;
    height: auto;
    object-fit: contain;
}

.modal-title {
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.modal-description {
    font-size: 16px;
    color: #5a6c7d;
    line-height: 1.6;
    margin: 0 0 30px 0;
}

.modal-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.modal-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: left;
    transition: all 0.2s ease;
}

.modal-feature:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.modal-feature i {
    font-size: 20px;
    color: #667eea;
    min-width: 24px;
}

.modal-feature span {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 500;
}

.modal-footer {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e9ecef;
}

.modal-version {
    font-size: 13px;
    color: #95a5a6;
    margin: 0 0 8px 0;
}

.modal-copyright {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
}

.modal-copyright strong {
    color: #667eea;
    font-weight: 600;
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.modal-btn i {
    font-size: 14px;
}

.install-btn-modal {
    border: none;
    cursor: pointer;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    width: 100%;
    justify-content: center;
}

.install-btn-modal:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
}

.install-btn-modal i {
    font-size: 16px;
}

/* Mobile styles for modal */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0;
        align-items: flex-start;
    }
    
    .modal-content {
        padding: 25px 20px 30px;
        max-width: 100%;
        border-radius: 0 0 20px 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-close-btn {
        top: 12px;
        right: 12px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-description {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .modal-logo {
        margin-bottom: 15px;
    }
    
    .modal-logo img {
        width: 60px;
    }
    
    .modal-features {
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .modal-feature {
        padding: 10px 15px;
    }
    
    .modal-feature i {
        font-size: 18px;
    }
    
    .modal-feature span {
        font-size: 14px;
    }
    
    .modal-footer {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }
    
    .modal-btn {
        display: none;
    }
}
