/**
 * Best Deals of Loose Diamonds Component Styles
 */

.diamond-best-deals {
    /* background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%); */
    padding: 64px 0;
}

.diamond-deals-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.diamond-deals-header {
    margin-bottom: 32px;
}

.diamond-deals-header-left {
    max-width: 600px;
}

.diamond-deals-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #254264;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.diamond-deals-eyebrow-line {
    width: 32px;
    height: 2px;
    background: #254264;
    border-radius: 2px;
}

.diamond-deals-title {
    font-size: 2rem;
    font-weight: 800;
    color: #254264;
    margin: 0 0 12px;
    font-family: 'Nunito Sans', sans-serif;
    line-height: 1.2;
}

.diamond-deals-title em {
    font-style: italic;
    background: #4f6073;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.diamond-deals-desc {
    font-size: 1.05rem;
    color: #254264;
    margin: 0;
    line-height: 1.6;
}

/* Shape Tabs */
.diamond-deals-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.diamond-deals-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.diamond-deals-tab:hover {
    border-color: #264265;
    color: #264265;
}

.diamond-deals-tab.active {
    background: #254264;
    border-color: transparent;
    color: #ffffff;
}

.diamond-deals-tab-icon {
    width: 30px;
    height: 20px;
    object-fit: contain;
    opacity: 0.8;
}

.diamond-deals-tab.active .diamond-deals-tab-icon {
    /* filter: brightness(0) invert(1); */
    opacity: 1;
}

/* Carousel */
.diamond-deals-carousel-wrapper {
    position: relative;
}

.diamond-deals-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 8px 0;
}

.diamond-deals-carousel::-webkit-scrollbar {
    display: none;
}

.diamond-deals-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    color: #0f172a;
}

.diamond-deals-arrow:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.diamond-deals-arrow-left {
    left: -22px;
}

.diamond-deals-arrow-right {
    right: -22px;
}

/* Diamond Card */
.diamond-deal-card {
    flex: 0 0 258px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.diamond-deal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    /* border-color: #3b82f6; */
}

.diamond-deal-image {
    position: relative;
    /* aspect-ratio: 1; */
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* height: 204px; */
    aspect-ratio: 275 / 218;
}

.diamond-deal-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #254264;
    border-radius: 50%;
    animation: diamond-spin 0.8s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.diamond-deal-image.loading::before {
    opacity: 1;
}

@keyframes diamond-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.diamond-deal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease, opacity 0.5s ease;
    opacity: 0;
}

.diamond-deal-image img.loaded {
    opacity: 1;
}

.diamond-deal-image img.loading {
    opacity: 0;
}

.diamond-deal-card:hover .diamond-deal-image img {
    transform: scale(1.05);
}

.diamond-deal-type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.diamond-deal-type-badge.natural {
    background: #4f5f73;
    color: #ffffff;
}

.diamond-deal-type-badge.lab {
    background: white;
    color: #4f5f73;
}

.diamond-deal-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.diamond-deal-shape {
    font-size: 0.875rem;
    font-weight: 700;
    color: #4f5f73;
}

.diamond-deal-specs {
    font-size: 19px;
    color: #64748b;
    font-weight: 500;
}

.diamond-deal-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 4px;
}

.diamond-deal-vendor {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    display: none;
}

/* Footer */
.diamond-deals-footer {
    text-align: center;
    margin-top: 32px;
}

.diamond-deals-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #254264;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.diamond-deals-view-all:hover {
    /* background: linear-gradient(135deg, #1e293b, #334155); */
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgb(15 23 42 / 24%);
}

/* Skeleton Loading */
.diamond-deal-skeleton {
    pointer-events: none;
}

.diamond-skeleton-shimmer {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: diamond-shimmer 1.5s infinite;
}

@keyframes diamond-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.diamond-deal-skeleton .diamond-deal-image {
    aspect-ratio: 1;
    border-radius: 12px 12px 0 0;
}

.diamond-skeleton-line {
    height: 16px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.diamond-skeleton-line.short {
    width: 60%;
}

/* No Products / Error */
.diamond-deals-no-products,
.diamond-deals-error {
    text-align: center;
    padding: 48px 24px;
    color: #64748b;
    font-size: 1rem;
    width: 100%;
}

/* Responsive */
@media (max-width: 1024px) {
    .diamond-deals-arrow-left { left: 8px; }
    .diamond-deals-arrow-right { right: 8px; }
}

@media (max-width: 768px) {
    .diamond-best-deals {
        padding: 48px 0;
    }

    .diamond-deals-title {
        font-size: 1.5rem;
    }

    .diamond-deals-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .diamond-deals-tab {
        padding: 8px 16px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .diamond-deal-card {
        flex: 0 0 200px;
    }

    .diamond-deals-arrow {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .diamond-deals-container {
        padding: 0 16px;
    }

    .diamond-deals-tab-icon {
        width: 16px;
        height: 16px;
    }

    .diamond-deal-card {
        flex: 0 0 180px;
    }

    .diamond-deal-info {
        padding: 12px;
    }

    .diamond-deal-price {
        font-size: 1.1rem;
    }
}

