.product-card {
    position: relative;
    overflow: visible;
}

.product-card:hover,
.product-card:focus-within {
    z-index: 80;
}

.product-media-shell {
    position: relative;
    min-height: 136px;
}

.product-media-shell::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    opacity: 0;
    transition: opacity 0.2s ease, backdrop-filter 0.2s ease, -webkit-backdrop-filter 0.2s ease;
    pointer-events: none;
}

.product-card-coupon-inline-badge {
    z-index: 20;
    align-items: center;
    gap: 4px;
    border: 1px solid #BBF7D0;
    border-radius: 9999px;
    background: #DCFCE7;
    padding: 2px 6px 2px 4px;
    color: #15803D;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    text-transform: none;
}

.product-card-coupon-inline-badge svg {
    color: #16A34A;
    fill: #16A34A;
    stroke: #FFFFFF;
    stroke-width: 1.8;
}

.product-card-coupon-inline-label {
    display: inline-block;
    max-width: 58px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card-coupon-inline-tooltip {
    z-index: 70;
}

.product-detail-coupon-alert {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    border: 1px solid #BBF7D0;
    border-radius: 16px;
    background: #DCFCE7;
    padding: 0;
    color: #15803D;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.product-detail-coupon-alert:hover {
    border-color: #86EFAC;
    background: #BBF7D0;
}

.product-detail-coupon-alert:active {
    transform: translateY(1px);
}

.product-detail-coupon-alert-content {
    display: inline-flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
}

.product-detail-coupon-copy-action {
    display: inline-flex;
    align-self: stretch;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #BBF7D0;
    padding: 0 14px;
}

.product-detail-coupon-alert:hover .product-detail-coupon-copy-action {
    border-left-color: #86EFAC;
}

.product-detail-coupon-alert svg {
    color: #16A34A;
    fill: #16A34A;
    stroke: #FFFFFF;
    stroke-width: 1.8;
}

.product-detail-coupon-alert .product-detail-coupon-copy-icon {
    color: #15803D;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.product-media-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: max-content;
    max-width: calc(100% - 24px);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, calc(-50% - 4px));
    transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
    .card:hover .product-media-actions,
    .card:focus-within .product-media-actions {
        opacity: 1;
        pointer-events: auto;
        transform: translate(-50%, -50%);
    }

    .card:hover .product-media-shell::after,
    .card:focus-within .product-media-shell::after {
        opacity: 1;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
}

.product-media-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: 100%;
    height: 36px;
    padding: 0 18px;
    border: 1px solid #C1C1C1;
    border-radius: 9999px;
    background: #FFFFFF;
    color: #0F172A;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 10px 24px -16px rgba(15, 23, 42, 0.28);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.product-media-action svg {
    flex-shrink: 0;
}

.product-media-action:hover {
    background: #2563EB;
    border-color: #2563EB;
    color: #FFFFFF;
    box-shadow: 0 8px 18px -6px rgba(37, 99, 235, 0.45);
    transform: translateY(-1px);
}

.product-media-action:active {
    background: #1D4ED8;
    border-color: #1D4ED8;
    box-shadow: 0 3px 8px -4px rgba(29, 78, 216, 0.5);
    transform: translateY(0);
}

.page-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.96);
    padding: 24px;
}

.page-loading-card {
    width: 100%;
    max-width: 28rem;
    text-align: center;
}

.page-loading-spinner {
    width: 64px;
    height: 64px;
    border: 8px solid #D1D5DB;
    border-top-color: #2563EB;
    border-radius: 9999px;
    animation: product-card-spin 1s linear infinite;
    margin: 64px auto;
}

@keyframes product-card-spin {
    to {
        transform: rotate(360deg);
    }
}

.product-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8rem;
    max-height: 2.8rem;
    font-size: 0.875rem;
    line-height: 1.4rem;
}

.product-card-title-wrap {
    position: relative;
    z-index: 30;
}

.product-card-title-tooltip {
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 70;
    width: max-content;
    max-width: min(320px, calc(100vw - 32px));
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 0.75rem;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    color: #0F172A;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    visibility: hidden;
}

.product-card-verified-badge {
    z-index: 45;
}

.product-card-verified-tooltip {
    z-index: 70;
}

.product-card-title-wrap:hover .product-card-title-tooltip,
.product-primary-link:focus-visible .product-card-title-tooltip {
    z-index: 90;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

@media (max-width: 639px) {
    .product-media-shell-mobile {
        min-height: 96px;
    }

    .product-card-title {
        min-height: auto;
        max-height: none;
        line-height: 1.45rem;
    }

    .product-card-title-tooltip {
        display: none;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .product-list-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .product-card > .flex {
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }

    .product-card .product-media-shell {
        width: 112px !important;
        min-height: 96px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        flex-shrink: 0 !important;
        padding: 0.5rem !important;
    }

    .product-card .product-media-shell > .flex {
        min-height: 96px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .product-card .product-media-shell img {
        width: 96px !important;
        height: 96px !important;
    }

    .product-card-title {
        min-height: auto;
        max-height: none;
        line-height: 1.45rem;
    }

    .product-card-title-wrap {
        margin-top: 0 !important;
    }

    .product-card-title-tooltip {
        display: none;
    }
}
