/* Product Plugin Styles - Version 1.1.3 */
/* Tavsiya qilinganlar cover to'liq moslashadi - object-fit: cover */

/* Archive Container */
.product-archive-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.product-archive-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #ffffff;
}

.product-archive-description {
    margin-bottom: 30px;
    padding: 15px;
    background: #1e1e1e;
    border-radius: 8px;
    color: #cccccc;
}

/* Archive Grid - Responsive */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin: 0 0 40px 0;
}

.product-item {
    display: block;
    margin: 0;
    padding: 0;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.product-image {
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
    background: #2a2a2a;
}

.product-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.product-image:hover img {
    transform: scale(1.03);
}

/* Badges */
.product-new-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 36, 0, 0.9);
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    z-index: 10;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.product-title-wrap {
    margin: 12px 12px 8px 12px;
}

.product-link {
    display: block;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    text-align: center;
    transition: color 0.3s ease;
}

.product-link:hover {
    color: #FF2400 !important;
}

.product-archive-price {
    text-align: center;
    margin: 0 12px 12px 12px;
    padding: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.product-archive-discount-price {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff !important;
}

.product-archive-original-price {
    font-size: 13px;
    color: #888888;
    text-decoration: line-through;
}

.product-archive-price-value {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff !important;
}

.product-discount-badge-inline {
    background: #FF2400;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    display: inline-block;
}

/* Pagination */
.product-pagination {
    text-align: center;
    margin: 40px 0;
    clear: both;
}

.product-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    background: #2a2a2a;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid #444;
    transition: all 0.3s ease;
}

.product-pagination .page-numbers.current {
    background: #FF2400 !important;
    color: #fff !important;
    border-color: #FF2400 !important;
}

.product-pagination .page-numbers:hover:not(.current) {
    background: #FF2400 !important;
    border-color: #FF2400 !important;
    color: #fff !important;
}

/* Single Page */
.product-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: transparent;
}

.product-single-cover {
    position: relative;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.product-single-cover img {
    width: 100%;
    height: auto;
    display: block;
}

/* Single Image */
.product-single-image {
    margin: 25px 0;
    border-radius: 12px;
    overflow: hidden;
}

.product-single-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* HTML Content */
.product-html-content {
    margin: 20px 0;
    line-height: 1.7;
    color: #333333;
}

.product-html-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 30px 0 15px 0;
    color: #1a1a1a;
}

.product-html-content h3 {
    font-size: 20px;
    font-weight: 500;
    margin: 25px 0 12px 0;
    color: #2c3e50;
}

.product-html-content p {
    margin-bottom: 16px;
    color: #4a5568;
}

/* Link Button */
.product-h3-link-wrapper {
    margin: 20px 0 30px;
}

.product-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #FF2400 !important;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 40px;
    font-size: 14px !important;
    transition: all 0.3s ease;
}

.product-link-btn:hover {
    background: #cc1d00 !important;
    transform: translateX(4px);
}

.product-single-content {
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: #4a5568 !important;
    margin-top: 30px;
}

/* Screenshots Section */
.product-screenshots-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.product-screenshots-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-screenshots-title svg {
    stroke: currentColor;
    fill: none;
}

/* Screenshot Grid */
.product-screenshots-grid-single {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.product-screenshot-item-single {
    cursor: pointer;
    min-width: 0;
}

.product-screenshot-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    width: 100%;
    background: #f5f5f5;
}

.product-screenshot-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.product-screenshot-img-wrapper:hover .product-screenshot-img {
    transform: scale(1.05);
}

.product-screenshot-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-screenshot-img-wrapper:hover .product-screenshot-overlay {
    opacity: 1;
}

.product-screenshot-zoom svg {
    width: 32px;
    height: 32px;
}

/* Recommended Section */
.product-recommended-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.product-recommended-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-recommended-title svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Native Horizontal Scroll */
.product-hscroll-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #FF2400 #e0e0e0;
    padding: 10px 0 20px 0;
}

.product-hscroll-container::-webkit-scrollbar {
    height: 6px;
}

.product-hscroll-container::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 10px;
}

.product-hscroll-container::-webkit-scrollbar-thumb {
    background: #FF2400;
    border-radius: 10px;
}

.product-hscroll-track {
    display: flex;
    gap: 20px;
    padding: 5px 0 15px 0;
}

.product-hscroll-item {
    flex: 0 0 auto;
    width: 260px;
    transition: transform 0.2s ease;
}

.product-hscroll-item:hover {
    transform: translateY(-4px);
}

.product-hscroll-link {
    display: block;
    text-decoration: none;
}

.product-hscroll-image-wrapper {
    border-radius: 12px;
    overflow: hidden;
    background: #f0f0f0;
    aspect-ratio: 300 / 200;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-hscroll-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.product-hscroll-item:hover .product-hscroll-img {
    transform: scale(1.05);
}

.product-hscroll-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.product-hscroll-title {
    text-align: center;
    margin-top: 12px;
    padding: 0 8px;
}

.product-hscroll-title span {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a !important;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-hscroll-link:hover .product-hscroll-title span {
    color: #FF2400 !important;
}

/* Modal */
.product-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
}

.product-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
}

.product-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
}

.product-modal-close:hover {
    color: #FF2400;
}

/* Empty State */
.product-empty {
    text-align: center;
    padding: 60px;
    font-size: 16px;
    color: #999;
    background: #f8f9fa;
    border-radius: 12px;
}

/* Lazy Load */
.product-lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-lazy.loaded {
    opacity: 1;
}

/* Responsive */
@media (max-width: 1200px) and (min-width: 769px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .product-archive-container {
        padding: 30px 15px;
    }
    .product-archive-title {
        font-size: 24px;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .product-single {
        padding: 30px 15px;
    }
    .product-screenshots-grid-single {
        gap: 12px;
    }
    .product-hscroll-item {
        width: 200px;
    }
    .product-hscroll-track {
        gap: 15px;
    }
    .product-new-badge {
        top: 6px;
        left: 6px;
        font-size: 9px;
        padding: 2px 6px;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .product-html-content h2 {
        font-size: 20px;
    }
    .product-html-content h3 {
        font-size: 18px;
    }
    .product-screenshots-grid-single {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    .product-screenshot-zoom svg {
        width: 18px;
        height: 18px;
    }
    .product-hscroll-item {
        width: 150px;
    }
    .product-hscroll-title span {
        font-size: 11px;
    }
    .product-hscroll-track {
        gap: 12px;
    }
}

/* Dark Mode support */
@media (prefers-color-scheme: dark) {
    .product-html-content {
        color: #cccccc;
    }
    .product-html-content h2,
    .product-html-content h3 {
        color: #ffffff;
    }
    .product-html-content p {
        color: #cccccc;
    }
    .product-single-content {
        color: #cccccc !important;
    }
    .product-screenshots-title,
    .product-recommended-title {
        color: #ffffff;
    }
    .product-screenshots-section,
    .product-recommended-section {
        border-top-color: #333;
    }
    .product-hscroll-title span {
        color: #ffffff !important;
    }
    .product-hscroll-image-wrapper {
        background: #2a2a2a;
    }
    .product-hscroll-container::-webkit-scrollbar-track {
        background: #333;
    }
}