/**
 * Version 2 Product Card - Enhanced Mobile Responsive Styles
 * Optimized text sizes and spacing for perfect viewing across all devices
 */

/* ============================================
   Base Card Styles
   ============================================ */

.version2-product-card {
    display: flex;
    padding: 12px;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 16px;
    border: 1px solid rgba(234, 236, 239, 0.04);
    background-image: url("../../img/version2/product-card-bg.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    min-width: 0;
}

.version2-product-card:hover {
    border-color: #f0890b;
    box-shadow: 0 8px 24px rgba(240, 137, 11, 0.15);
}

/* ============================================
   Header Section
   ============================================ */

.version2-product-card-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.version2-product-card-lot {
    color: #8b949e;
    text-align: center;
    font-family: "Inter", "Helvetica", Arial, sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.3;
    align-self: stretch;
}

.version2-product-card-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    align-self: stretch;
    overflow: hidden;
    color: #eaecef;
    text-align: center;
    text-overflow: ellipsis;
    font-family: "Montserrat", "Helvetica", Arial, sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.3;
    text-transform: capitalize;
    margin: 0;
}

.version2-product-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.version2-product-card-title a:hover {
    color: #f0890b;
}

/* ============================================
   Main Timer (Top of Image)
   ============================================ */

.version2-product-card-main-timer {
    position: absolute;
    top: -12px;
    z-index: 100;
    display: inline-flex;
    padding: 4px 12px;
    justify-content: center;
    align-items: center;
    border-radius: 32px;
    background: #0b0e11;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    color: #eaecef;
    text-align: center;
    font-family: "Montserrat", "Helvetica", Arial, sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* ============================================
   Image Section
   ============================================ */

.version2-product-card-image {
    margin-top: 12px;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    background-color: #0b0e11;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
}

.version2-product-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.version2-product-card-image img {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    object-fit: cover;
}

/* ============================================
   Footer (Timer + Price on Image)
   ============================================ */

.version2-product-card-footer {
    position: absolute;
    bottom: 8px;
    padding: 0 8px;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

/* Small Timer */
.version2-product-card-small-timer {
    display: flex;
    padding: 4px 8px;
    justify-content: center;
    align-items: center;
    border-radius: 32px;
    background: #1e2329;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    gap: 4px;
    color: #8b949e;
    text-align: center;
    font-family: "Montserrat", "Helvetica", Arial, sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.version2-product-card-small-timer svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.version2-product-card-small-timer span {
    font-family: "Courier New", "Consolas", monospace;
    letter-spacing: 0.5px;
}

/* Price Button */
.version2-product-card-price-button {
    display: inline-flex;
    padding: 6px 10px;
    justify-content: center;
    align-items: center;
    border-radius: 32px;
    background: rgba(240, 137, 11, 0.16);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    color: #f0890b;
    text-align: center;
    font-family: "Montserrat", "Helvetica", Arial, sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.version2-product-card-price-button:hover:not(:disabled) {
    background: rgba(240, 137, 11, 0.25);
    transform: scale(1.05);
}

.version2-product-card-price-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* ============================================
   Product Footer (Outside Card)
   ============================================ */

.version2-product-footer {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    gap: 8px;
}

.version2-product-footer-icon {
    display: flex;
    width: 32px;
    height: 32px;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.04) 0%,
            rgba(255, 255, 255, 0.04) 100%
        ),
        #1e2329;
    box-shadow: 0 -1px 0 0 rgba(255, 255, 255, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 0 1px #1e2329,
        0 0 1px 1.5px rgba(0, 0, 0, 0.24), 0 2px 2px 0 rgba(0, 0, 0, 0.24);
    color: #eaecef;
    flex-shrink: 0;
}

.version2-product-footer-icon svg {
    width: 16px;
    height: 16px;
}

.version2-product-footer-btn {
    display: flex;
    height: 32px;
    justify-content: center;
    align-items: center;
    flex: 1 0 0;
    border-radius: 32px;
    background: linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.04) 0%,
            rgba(255, 255, 255, 0.04) 100%
        ),
        #1e2329;
    box-shadow: 0 -1px 0 0 rgba(255, 255, 255, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 0 1px #1e2329,
        0 0 1px 1.5px rgba(0, 0, 0, 0.24), 0 2px 2px 0 rgba(0, 0, 0, 0.24);
    color: #eaecef;
    font-family: "Montserrat", "Helvetica", Arial, sans-serif;
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Button state cursor styles - all buttons except finished should have pointer */
.version2-product-footer-btn {
    cursor: pointer;
}

.version2-product-footer-btn.finished,
.version2-product-footer-btn.disabled-btn {
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}

/* Coming Soon button (Скоро начнется) */
.version2-product-footer-btn.btn_commingsoon,
.version2-product-footer-btn.notstarted.btn_commingsoon {
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
    background: linear-gradient(
            0deg,
            rgba(105, 194, 243, 0.15) 0%,
            rgba(66, 239, 231, 0.15) 100%
        ),
        linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0.08) 100%
        ),
        #1e2329;
}

/* Ensure hover/active effects work for clickable buttons */
.version2-product-footer-btn:not(.finished):not(.disabled-btn):not(.btn_commingsoon):hover {
    background: linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0.08) 100%
        ),
        #1e2329;
    transform: scale(1.02);
}

.version2-product-footer-btn:not(.finished):not(.disabled-btn):not(.btn_commingsoon):active {
    background: linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.12) 0%,
            rgba(255, 255, 255, 0.12) 100%
        ),
        #1e2329;
    transform: scale(0.98);
}

/* Ensure pointer cursor for all clickable states */
.version2-product-footer-btn.notstarted,
.version2-product-footer-btn.bid,
.version2-product-footer-btn.btn_pay {
    cursor: pointer !important;
    touch-action: manipulation; /* Fix mobile touch events */
    -webkit-tap-highlight-color: rgba(240, 137, 11, 0.3); /* Better mobile tap feedback */
    -webkit-user-select: none; /* Prevent text selection on tap */
    user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* Ensure buttons are clickable on mobile */
    pointer-events: auto !important;
}

/* Bid button has the same style as pay button - both use general hover/active effects */
/* Both .version2-product-footer-btn.bid and .version2-product-footer-btn.btn_pay */
/* inherit from .version2-product-footer-btn base class and use the same hover/active effects */

/* Specific hover and click effects for "Запустить" (Launch/notstarted) button */
.version2-product-footer-btn.notstarted:not(.finished):not(.disabled-btn):not(.btn_commingsoon):hover {
    background: linear-gradient(
            0deg,
            rgba(105, 194, 243, 0.15) 0%,
            rgba(66, 239, 231, 0.15) 100%
        ),
        linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0.08) 100%
        ),
        #1e2329;
    transform: scale(1.02);
    box-shadow: 0 -1px 0 0 rgba(255, 255, 255, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 0 1px #1e2329,
        0 0 2px 2px rgba(105, 194, 243, 0.2), 0 2px 4px 0 rgba(0, 0, 0, 0.3);
}

.version2-product-footer-btn.notstarted:not(.finished):not(.disabled-btn):not(.btn_commingsoon):active {
    background: linear-gradient(
            0deg,
            rgba(105, 194, 243, 0.25) 0%,
            rgba(66, 239, 231, 0.25) 100%
        ),
        linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.12) 0%,
            rgba(255, 255, 255, 0.12) 100%
        ),
        #1e2329;
    transform: scale(0.98);
    box-shadow: 0 -1px 0 0 rgba(255, 255, 255, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 0 1px #1e2329,
        0 0 1px 1.5px rgba(0, 0, 0, 0.24), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
}


/* ============================================
   Large Tablet (1024px and below)
   ============================================ */

@media (max-width: 1024px) {
    .version2-product-card {
        padding: 11px;
        gap: 10px;
    }

    .version2-product-card-lot {
        font-size: 14px;
    }

    .version2-product-card-title {
        font-size: 16px;
    }

    .version2-product-card-main-timer {
        font-size: 15px;
        padding: 3px 10px;
    }

    .version2-product-card-small-timer {
        font-size: 13px;
        padding: 3px 7px;
    }

    .version2-product-card-price-button {
        font-size: 13px;
        padding: 5px 9px;
    }
}

/* ============================================
   Tablet (768px and below) - 2-3 cards per row
   ============================================ */

@media (max-width: 768px) {
    .version2-product-card {
        padding: 10px;
        gap: 10px;
    }

    .version2-product-card-header {
        gap: 3px;
    }

    .version2-product-card-lot {
        font-size: 13px;
        line-height: 1.4;
    }

    .version2-product-card-title {
        font-size: 15px;
        line-height: 1.4;
    }

    .version2-product-card-main-timer {
        font-size: 14px;
        padding: 3px 10px;
        letter-spacing: 1px;
        top: -10px;
    }

    .version2-product-card-image {
        margin-top: 10px;
    }

    .version2-product-card-footer {
        bottom: 6px;
        padding: 0 6px;
        gap: 6px;
    }

    .version2-product-card-small-timer {
        font-size: 12px;
        padding: 3px 6px;
        gap: 3px;
    }

    .version2-product-card-small-timer svg {
        width: 13px;
        height: 13px;
    }

    .version2-product-card-price-button {
        padding: 5px 8px;
        font-size: 12px;
    }

    .version2-product-footer {
        margin-top: 6px;
        gap: 6px;
    }

    .version2-product-footer-icon {
        width: 30px;
        height: 30px;
    }

    .version2-product-footer-icon svg {
        width: 15px;
        height: 15px;
    }

    .version2-product-footer-btn {
        height: 30px;
        font-size: 12px;
    }
}

/* ============================================
   Small Tablet / Large Mobile (600px and below)
   ============================================ */

@media (max-width: 600px) {
    .version2-product-card {
        padding: 10px;
        gap: 8px;
    }

    .version2-product-card-lot {
        font-size: 12px;
    }

    .version2-product-card-title {
        font-size: 14px;
        line-height: 1.3;
    }

    .version2-product-card-main-timer {
        font-size: 13px;
        padding: 3px 9px;
        top: -10px;
    }

    .version2-product-card-small-timer {
        font-size: 11px;
        padding: 3px 6px;
    }

    .version2-product-card-small-timer svg {
        width: 12px;
        height: 12px;
    }

    .version2-product-card-price-button {
        font-size: 11px;
        padding: 4px 7px;
    }

    .version2-product-footer-icon {
        width: 28px;
        height: 28px;
    }

    .version2-product-footer-icon svg {
        width: 14px;
        height: 14px;
    }

    .version2-product-footer-btn {
        height: 28px;
        font-size: 11px;
    }
}

/* ============================================
   Mobile (480px and below) - 2 cards per row
   ============================================ */

@media (max-width: 480px) {
    .version2-product-card {
        padding: 9px;
        gap: 8px;
        border-radius: 14px;
    }

    .version2-product-card-header {
        gap: 2px;
    }

    .version2-product-card-lot {
        font-size: 11px;
        line-height: 1.3;
    }

    .version2-product-card-title {
        font-size: 13px;
        line-height: 1.3;
    }

    .version2-product-card-main-timer {
        font-size: 12px;
        padding: 2px 8px;
        letter-spacing: 0.5px;
        top: -9px;
    }

    .version2-product-card-image {
        margin-top: 8px;
        border-radius: 14px;
    }

    .version2-product-card-image img {
        border-radius: 14px;
    }

    .version2-product-card-footer {
        bottom: 5px;
        padding: 0 5px;
        gap: 5px;
    }

    .version2-product-card-small-timer {
        font-size: 10px;
        padding: 2px 5px;
        gap: 2px;
        font-weight: 700;
    }

    .version2-product-card-small-timer svg {
        width: 11px;
        height: 11px;
    }

    .version2-product-card-price-button {
        font-size: 10px;
        padding: 3px 6px;
        font-weight: 700;
    }

    .version2-product-footer {
        margin-top: 6px;
        gap: 5px;
    }

    .version2-product-footer-icon {
        width: 26px;
        height: 26px;
    }

    .version2-product-footer-icon svg {
        width: 13px;
        height: 13px;
    }

    .version2-product-footer-btn {
        height: 26px;
        font-size: 11px;
    }
}

/* ============================================
   Small Mobile (380px and below)
   ============================================ */

@media (max-width: 380px) {
    .version2-product-card {
        padding: 8px;
        gap: 6px;
    }

    .version2-product-card-lot {
        font-size: 10px;
    }

    .version2-product-card-title {
        font-size: 12px;
    }

    .version2-product-card-main-timer {
        font-size: 11px;
        padding: 2px 7px;
        top: -8px;
    }

    .version2-product-card-small-timer {
        font-size: 9px;
        padding: 2px 4px;
    }

    .version2-product-card-small-timer svg {
        width: 10px;
        height: 10px;
    }

    .version2-product-card-price-button {
        font-size: 9px;
        padding: 3px 5px;
    }

    .version2-product-footer-icon {
        width: 24px;
        height: 24px;
    }

    .version2-product-footer-icon svg {
        width: 12px;
        height: 12px;
    }

    .version2-product-footer-btn {
        height: 24px;
        font-size: 10px;
    }
}

/* ============================================
   Extra Small Mobile (320px and below)
   ============================================ */

@media (max-width: 320px) {
    .version2-product-card {
        padding: 7px;
        gap: 5px;
    }

    .version2-product-card-lot {
        font-size: 9px;
    }

    .version2-product-card-title {
        font-size: 11px;
    }

    .version2-product-card-main-timer {
        font-size: 10px;
        padding: 2px 6px;
    }

    .version2-product-card-small-timer {
        font-size: 8px;
        padding: 2px 4px;
    }

    .version2-product-card-small-timer svg {
        width: 9px;
        height: 9px;
    }

    .version2-product-card-price-button {
        font-size: 8px;
        padding: 2px 4px;
    }
}

/* ============================================
   Accessibility
   ============================================ */

.version2-product-card:focus-within {
    outline: 2px solid #f0890b;
    outline-offset: 2px;
}

.version2-product-card-title a:focus-visible,
.version2-product-card-price-button:focus-visible,
.version2-product-footer-btn:focus-visible {
    outline: 2px solid #f0890b;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .version2-product-card,
    .version2-product-card-title a,
    .version2-product-card-price-button,
    .version2-product-footer-btn {
        transition: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .version2-product-card {
        border: 2px solid currentColor;
    }

    .version2-product-card-main-timer,
    .version2-product-card-small-timer,
    .version2-product-card-price-button {
        border: 1px solid currentColor;
    }
}
