/**
 * RetVN Embed Product - Embed Styles
 * Styles for embedded products on external websites
 */

/* Container */
.rep-embed-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: #1a1a1a;
    margin: 20px 0;
    max-width: 100%;
}

/* Loading Skeleton */
.rep-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: #f8f9fa;
    border-radius: 8px;
}

.rep-loading-overlay {
    position: relative;
    opacity: 0.7;
}

.rep-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.rep-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1d9bf0;
    border-radius: 50%;
    animation: rep-spin 1s linear infinite;
}

@keyframes rep-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rep-skeleton {
    display: flex;
    padding: 20px;
    gap: 16px;
    width: 100%;
    max-width: 400px;
}

.rep-skeleton-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: rep-skeleton-loading 1.5s infinite;
    border-radius: 8px;
    flex-shrink: 0;
}

.rep-skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rep-skeleton-title,
.rep-skeleton-price,
.rep-skeleton-description {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: rep-skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.rep-skeleton-title {
    height: 20px;
    width: 80%;
}

.rep-skeleton-price {
    height: 18px;
    width: 60%;
}

.rep-skeleton-description {
    height: 16px;
    width: 100%;
}

@keyframes rep-skeleton-loading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Main Product Container */
.rep-product {
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    max-width: 504px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.rep-product:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

/* Site Info Header */
.rep-site-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    background: #ffffff;
    border-bottom: none;
    font-size: 13px;
    color: #536471;
}

.rep-favicon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

.rep-site-name {
    font-weight: 700;
    color: #0f1419;
    font-size: 15px;
}

.rep-site-url {
    opacity: 1;
    color: #536471;
    font-size: 13px;
}

/* Product Content */
.rep-content {
    padding: 0 15px 15px 15px;
}

/* Product Description (now at top) */
.rep-description {
    font-size: 15px;
    color: #0f1419;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
}

.rep-description p {
    margin: 0;
}

/* Image */
.rep-image {
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #f7f9fa;
}

.rep-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.rep-image.no-image {
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.rep-image.no-image::before {
    content: "📦";
    font-size: 48px;
    opacity: 0.7;
}

/* Details */
.rep-details {
    flex: 1;
}

.rep-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f1419;
    margin: 0 0 8px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rep-price {
    font-size: 15px;
    font-weight: 700;
    color: #1d9bf0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rep-price del {
    color: #536471;
    font-weight: 400;
    font-size: 14px;
    text-decoration: line-through;
}

.rep-price .sale-badge {
    background: #ff6b35;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Actions */
.rep-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Quantity Selector */
.rep-quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rep-qty-label {
    font-size: 12px;
    color: #536471;
    font-weight: 400;
}

.rep-quantity {
    width: 50px;
    height: 26px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 12px;
    text-align: center;
    background: #ffffff;
    color: #0f1419;
}

.rep-quantity:focus {
    outline: none;
    border-color: #1d9bf0;
    box-shadow: 0 0 0 1px #1d9bf0;
}

.rep-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    background: #1d9bf0;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 16px;
    font-weight: 600;
    font-size: 12px;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    min-width: 85px;
    height: 28px;
    line-height: 1;
}

.rep-button:hover {
    background: #1a8cd8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(29,155,240,0.3);
}

.rep-button:active {
    transform: translateY(0);
}

.rep-button::before {
    content: "🛒";
    margin-right: 5px;
    font-size: 10px;
}

/* Style Variants */

/* Sold Count Display - Beautiful & Modern */
.rep-sold-count {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #1d9bf0;
    margin: 8px 16px 12px 16px;
    padding: 6px 16px;
    background: rgba(29, 155, 240, 0.1);
    border-radius: 18px;
    border: 1px solid rgba(29, 155, 240, 0.2);
    box-shadow: 0 3px 10px rgba(29, 155, 240, 0.15), 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    animation: rep-sold-pulse-blue 3s ease-in-out infinite;
    min-height: 28px;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.rep-sold-count::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: rep-sold-shine 4s ease-in-out infinite;
    z-index: 0;
}

.rep-sold-count::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    z-index: 0;
}

.rep-sold-icon {
    width: 10px;
    height: 10px;
    background: #1d9bf0;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(29, 155, 240, 0.3);
    animation: rep-icon-glow-blue 2s ease-in-out infinite alternate;
}

.rep-sold-text {
    font-weight: 600;
    font-size: 12px;
    line-height: 1.2;
    position: relative;
    z-index: 2;
    letter-spacing: 0.3px;
}

@keyframes rep-sold-pulse-blue {
    0%, 100% {
        box-shadow: 0 3px 10px rgba(29, 155, 240, 0.15), 0 1px 3px rgba(0, 0, 0, 0.05);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 5px 15px rgba(29, 155, 240, 0.25), 0 2px 6px rgba(0, 0, 0, 0.1);
        transform: scale(1.01);
    }
}

@keyframes rep-sold-pulse {
    0% {
        box-shadow: 0 3px 10px rgba(220, 38, 38, 0.3), 0 1px 3px rgba(0, 0, 0, 0.1);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
        transform: scale(1.005);
    }
    100% {
        box-shadow: 0 3px 10px rgba(220, 38, 38, 0.3), 0 1px 3px rgba(0, 0, 0, 0.1);
        transform: scale(1);
    }
}

@keyframes rep-sold-shine {
    0% {
        left: -100%;
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    60% {
        left: 100%;
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

@keyframes rep-icon-glow-blue {
    0% {
        box-shadow: 0 1px 3px rgba(29, 155, 240, 0.3);
    }
    100% {
        box-shadow: 0 1px 5px rgba(29, 155, 240, 0.5), 0 0 8px rgba(29, 155, 240, 0.3);
    }
}

@keyframes rep-icon-glow {
    0% {
        box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }
    100% {
        box-shadow: 0 2px 4px rgba(0,0,0,0.3), 0 0 8px rgba(255,255,255,0.5);
    }
}

/* Minimal Style - Text Only */
.rep-style-minimal {
    border: 1px solid #e1e4e8;
    box-shadow: none;
    background: #ffffff;
    max-width: 500px;
    min-width: 280px;
}

.rep-style-minimal:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.rep-style-minimal .rep-site-info {
    background: #f8f9fa;
    border-bottom: 1px solid #e1e4e8;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rep-style-minimal .rep-content {
    padding: 16px;
    position: relative;
}

.rep-style-minimal .rep-image {
    width: 100px;
    height: 100px;
    float: left;
    margin: 0 16px 12px 0;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.rep-style-minimal .rep-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rep-style-minimal .rep-title {
    font-size: 15px;
    color: #1d9bf0;
    margin-bottom: 8px;
    line-height: 1.4;
    font-weight: 600;
}

.rep-style-minimal .rep-title:hover {
    text-decoration: underline;
}

.rep-style-minimal .rep-price {
    font-size: 14px;
    color: #0f1419;
    margin-bottom: 10px;
    font-weight: 700;
}

.rep-style-minimal .rep-description {
    font-size: 13px;
    color: #536471;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
    line-height: 1.4;
}

.rep-style-minimal .rep-button {
    background: #ffffff;
    color: #1d9bf0 !important;
    border: 1px solid #1d9bf0;
    padding: 4px 14px;
    height: 26px;
    font-size: 11px;
    font-size: 12px;
    height: 32px;
    border-radius: 16px;
    min-width: 80px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.rep-style-minimal .rep-button:hover {
    background: #1d9bf0;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 155, 240, 0.3);
}

.rep-style-minimal .rep-button::before {
    display: none;
}

.rep-style-minimal .rep-actions {
    gap: 10px;
    margin-top: 12px;
    clear: both;
}

.rep-style-minimal .rep-visit-product {
    bottom: 16px;
    right: 16px;
    padding: 4px 8px;
    font-size: 10px;
    border-radius: 12px;
}

.rep-style-minimal .rep-sold-count {
    background: rgba(29, 155, 240, 0.1);
    color: #1d9bf0;
    font-size: 11px;
    padding: 4px 12px;
    margin: 6px 16px 8px 16px;
    border-radius: 14px;
    border: 1px solid rgba(29, 155, 240, 0.2);
    box-shadow: 0 2px 8px rgba(29, 155, 240, 0.15);
    animation: rep-sold-pulse-blue 3s ease-in-out infinite;
    gap: 6px;
    min-height: 22px;
    display: flex;
}

.rep-style-minimal .rep-sold-icon {
    width: 8px;
    height: 8px;
    background: #1d9bf0;
    animation: rep-icon-glow-blue 2s ease-in-out infinite alternate;
}

.rep-style-minimal .rep-sold-text {
    font-weight: 600;
    font-size: 10px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .rep-product {
        background: #15202b;
        border-color: #2f3336;
        color: #ffffff;
    }
    
    .rep-site-info {
        background: #15202b;
        border-color: #2f3336;
        color: #71767b;
    }
    
    .rep-site-name {
        color: #ffffff;
    }
    
    .rep-title {
        color: #ffffff;
    }
    
    .rep-description {
        color: #71767b;
    }
    
    .rep-price {
        color: #1d9bf0;
    }
    
    .rep-price del {
        color: #71767b;
    }
    
    .rep-price .sale-badge {
        background: #f91880;
        color: #ffffff;
    }
    
    .rep-button {
        background: #1d9bf0;
        color: #ffffff !important;
    }
    
    .rep-button:hover {
        background: #1a8cd8;
    }
    
    .rep-skeleton-image,
    .rep-skeleton-title,
    .rep-skeleton-price,
    .rep-skeleton-description {
        background: #2f3336;
    }
    
    .rep-image.no-image {
        background: linear-gradient(135deg, #1d9bf0 0%, #8b5cf6 100%);
    }
    
    /* Dark mode for style variants */
    .rep-style-minimal {
        background: #15202b;
        border-color: #2f3336;
    }
    
    .rep-style-minimal .rep-site-info {
        background: #192734;
        border-color: #2f3336;
    }
    
    .rep-style-minimal .rep-title {
        color: #1d9bf0;
    }
    
    .rep-style-minimal .rep-price {
        color: #ffffff;
    }
    
    .rep-style-minimal .rep-description {
        color: #71767b;
    }
    
    .rep-style-minimal .rep-button {
        background: #15202b;
        color: #1d9bf0 !important;
        border-color: #1d9bf0;
    }
    
    .rep-style-minimal .rep-button:hover {
        background: #1d9bf0;
        color: #ffffff !important;
    }
    
    /* Dark mode for quantity selector */
    .rep-qty-label {
        color: #71767b;
    }
    
    .rep-quantity {
        background: #15202b;
        border-color: #2f3336;
        color: #ffffff;
    }
    
    .rep-quantity:focus {
        border-color: #1d9bf0;
        box-shadow: 0 0 0 1px #1d9bf0;
    }
    
    .rep-sold-count {
        background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #ef4444 100%);
        color: #ffffff;
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    }
    
    .rep-style-minimal .rep-sold-count {
        background: linear-gradient(135deg, #059669 0%, #047857 50%, #10b981 100%);
        box-shadow: 0 2px 8px rgba(5, 150, 105, 0.4);
    }
}

/* Manual Dark Mode Class Override */
.rep-product.rep-dark-mode {
    background: #15202b;
    border-color: #2f3336;
    color: #ffffff;
}

.rep-product.rep-dark-mode .rep-site-info {
    background: #15202b;
    border-color: #2f3336;
    color: #71767b;
}

.rep-product.rep-dark-mode .rep-site-name {
    color: #ffffff;
}

.rep-product.rep-dark-mode .rep-site-url {
    color: #71767b;
}

.rep-product.rep-dark-mode .rep-title {
    color: #ffffff;
}

.rep-product.rep-dark-mode .rep-description {
    color: #71767b;
}

.rep-product.rep-dark-mode .rep-price {
    color: #1d9bf0;
}

.rep-product.rep-dark-mode .rep-price del {
    color: #71767b;
}

.rep-product.rep-dark-mode .rep-price .sale-badge {
    background: #f91880;
    color: #ffffff;
}

.rep-product.rep-dark-mode .rep-button {
    background: #1d9bf0;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(29, 155, 240, 0.3);
}

.rep-product.rep-dark-mode .rep-button:hover {
    background: #1a8cd8;
    box-shadow: 0 4px 12px rgba(29, 155, 240, 0.4);
}

.rep-product.rep-dark-mode .rep-image.no-image {
    background: linear-gradient(135deg, #1d9bf0 0%, #8b5cf6 100%);
}

.rep-product.rep-dark-mode .rep-sold-count {
    background: rgba(29, 155, 240, 0.15);
    color: #1d9bf0;
    border: 1px solid rgba(29, 155, 240, 0.3);
    box-shadow: 0 4px 12px rgba(29, 155, 240, 0.25);
}

.rep-product.rep-dark-mode .rep-visit-product {
    background: rgba(21, 32, 43, 0.9);
    color: #1d9bf0;
    border: 1px solid #2f3336;
}

.rep-product.rep-dark-mode .rep-visit-product:hover {
    background: rgba(29, 155, 240, 0.1);
    border-color: #1d9bf0;
}

/* Dark mode for minimal style */
.rep-product.rep-dark-mode.rep-style-minimal {
    background: #15202b;
    border-color: #2f3336;
}

.rep-product.rep-dark-mode.rep-style-minimal .rep-site-info {
    background: #192734;
    border-color: #2f3336;
}

.rep-product.rep-dark-mode.rep-style-minimal .rep-title {
    color: #1d9bf0;
}

.rep-product.rep-dark-mode.rep-style-minimal .rep-price {
    color: #ffffff;
}

.rep-product.rep-dark-mode.rep-style-minimal .rep-description {
    color: #71767b;
}

.rep-product.rep-dark-mode.rep-style-minimal .rep-button {
    background: #15202b !important;
    color: #1d9bf0 !important;
    border-color: #1d9bf0 !important;
}

.rep-product.rep-dark-mode.rep-style-minimal .rep-button:hover {
    background: #1d9bf0 !important;
    color: #ffffff !important;
}

.rep-product.rep-dark-mode.rep-style-minimal .rep-sold-count {
    background: rgba(29, 155, 240, 0.15);
    color: #1d9bf0;
    border: 1px solid rgba(29, 155, 240, 0.3);
    box-shadow: 0 2px 8px rgba(29, 155, 240, 0.25);
}

/* Error state */
.rep-error {
    padding: 16px;
    background: #ffeaea;
    border: 1px solid #fd2222;
    border-radius: 6px;
    color: #d73502;
    text-align: center;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .rep-product {
        margin: 10px;
        border-radius: 8px;
    }
    
    .rep-content {
        padding: 12px;
    }
    
    .rep-title {
        font-size: 16px;
    }
    
    .rep-price {
        font-size: 14px;
    }
    
    .rep-description {
        font-size: 13px;
    }
    
    .rep-button {
        padding: 6px;
        font-size: 11px;
        height: 30px;
        flex: 1;
        min-width: 0;
    }
    
    .rep-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .rep-quantity-wrapper {
        justify-content: center;
        align-self: center;
    }
    
    .rep-quantity {
        width: 60px;
        height: 32px;
        font-size: 14px;
    }
    
    /* Mobile optimizations for minimal style */
    .rep-style-minimal {
        max-width: 100%;
        margin: 8px;
    }
    
    .rep-style-minimal .rep-content {
        padding: 12px;
    }
    
    .rep-style-minimal .rep-image {
        width: 60px;
        height: 60px;
        margin: 0 10px 8px 0;
    }
    
    .rep-style-minimal .rep-title {
        font-size: 14px;
        margin-bottom: 6px;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .rep-style-minimal .rep-price {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .rep-style-minimal .rep-description {
        font-size: 12px;
        -webkit-line-clamp: 1;
        margin-bottom: 10px;
    }
    
    .rep-style-minimal .rep-button {
        padding: 4px 12px;
        font-size: 11px;
        height: 28px;
        border-radius: 14px;
        min-width: 70px;
    }
    
    .rep-style-minimal .rep-actions {
        gap: 8px;
        margin-top: 10px;
    }
    
    .rep-style-minimal .rep-visit-product {
        bottom: 8px;
        right: 8px;
        padding: 3px 6px;
        font-size: 9px;
        border-radius: 10px;
    }
    
    .rep-style-minimal .rep-sold-count {
        margin: 6px 12px;
        padding: 3px 8px;
        font-size: 9px;
        border-radius: 12px;
        min-height: 18px;
        gap: 4px;
    }
    
    .rep-style-minimal .rep-sold-icon {
        width: 5px;
        height: 5px;
    }
    
    .rep-style-minimal .rep-sold-text {
        font-size: 8px;
    }
    
    .rep-sold-count {
        padding: 4px 10px;
        margin: 6px 12px 8px 12px;
        font-size: 11px;
        min-height: 24px;
        gap: 6px;
        display: flex;
    }
    
    .rep-sold-icon {
        width: 8px;
        height: 8px;
    }
    
    .rep-sold-text {
        font-size: 10px;
    }

}

/* High contrast mode */
@media (prefers-contrast: high) {
    .rep-product {
        border-width: 2px;
        border-color: #000000;
    }
    
    .rep-button {
        border: 2px solid #0366d6;
    }
    
    .rep-style-minimal .rep-button {
        border-width: 2px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .rep-product,
    .rep-button,
    .rep-skeleton,
    .rep-sold-count,
    .rep-sold-icon {
        transition: none;
        animation: none;
    }
    
    .rep-product:hover,
    .rep-button:hover,
    .rep-style-minimal:hover {
        transform: none;
    }
    
    .rep-sold-count::before {
        animation: none;
    }
}

/* Print styles */
@media print {
    .rep-product {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .rep-button {
        display: none;
    }
    
    .rep-site-info {
        background: none;
    }
}

/* Focus styles for accessibility */
.rep-button:focus {
    outline: 2px solid #0366d6;
    outline-offset: 2px;
}

.rep-product a:focus {
    outline: 2px solid #0366d6;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Loading state overlay */
.rep-embed-container.loading {
    position: relative;
    pointer-events: none;
}

.rep-embed-container.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

/* RTL Support */
[dir="rtl"] .rep-site-info {
    flex-direction: row-reverse;
}



[dir="rtl"] .rep-price del {
    margin-right: 0;
    margin-left: 8px;
}

/* Visit Product Button */
.rep-visit-product {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(29, 155, 240, 0.1);
    color: #1d9bf0;
    text-decoration: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid rgba(29, 155, 240, 0.2);
    backdrop-filter: blur(10px);
    z-index: 10;
    line-height: 1;
}

.rep-visit-product:hover {
    background: rgba(29, 155, 240, 0.15);
    border-color: rgba(29, 155, 240, 0.3);
    color: #1a8cd8 !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(29, 155, 240, 0.15);
}

.rep-visit-icon {
    font-size: 14px;
    line-height: 1;
}

.rep-visit-text {
    font-size: 11px;
    white-space: nowrap;
    font-weight: 600;
}

/* Make product container relative for positioning */
.rep-product {
    position: relative;
}

/* Enhanced button styles with gradients */
.rep-button {
    background: linear-gradient(135deg, #1d9bf0 0%, #1a8cd8 100%);
    border: 1px solid #1d9bf0;
    box-shadow: 0 2px 4px rgba(29, 155, 240, 0.2);
    border-radius: 25px;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

.rep-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.rep-button:hover::before {
    left: 100%;
}

.rep-button:hover {
    background: linear-gradient(135deg, #1a8cd8 0%, #1874c7 100%);
    border-color: #1a8cd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 155, 240, 0.3);
}

/* Dark mode support for visit button */
@media (prefers-color-scheme: dark) {
    .rep-visit-product {
        background: rgba(29, 155, 240, 0.15);
        border-color: rgba(29, 155, 240, 0.3);
        color: #1d9bf0;
    }
    
    .rep-visit-product:hover {
        background: rgba(29, 155, 240, 0.2);
        color: #4da6e3 !important;
    }
}

/* Responsive adjustments for visit button */
@media (max-width: 480px) {
    .rep-visit-product {
        bottom: 8px;
        right: 8px;
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .rep-visit-icon {
        font-size: 12px;
    }
    
    .rep-visit-text {
        font-size: 10px;
    }
}

/* Fallback styles for when JavaScript is not available */
.rep-fallback-card {
    max-width: 400px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.rep-fallback-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.rep-fallback-content {
    padding: 16px;
}

.rep-fallback-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.rep-fallback-price {
    margin: 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #e74c3c;
}

.rep-fallback-description {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.rep-fallback-actions {
    margin-top: 12px;
}

.rep-fallback-button {
    display: inline-block;
    background: #1d9bf0;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.rep-fallback-button:hover {
    background: #1a8cd8;
}

/* Block placeholder styles */
.rep-block-placeholder {
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-style: italic;
} 