/* 
  Jewellery Discovery & Intent Platform: Components
  Theme: Premium Editorial Curation
*/

/* --- PHASE 3: CARD STANDARDIZATION --- */
.design-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding-bottom: 80px;
}

@media (max-width: 768px) {
    .design-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding-bottom: 40px;
    }

    .design-card__content,
    .card-content {
        padding: 8px !important;
    }

    .design-card__title,
    .card-title {
        font-size: 0.85rem !important;
        margin-bottom: 4px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .card-price {
        font-size: 0.95rem !important;
        margin-bottom: 0 !important;
    }

    .tag-pill {
        font-size: 0.55rem;
        padding: 4px 8px;
        top: 8px;
        left: 8px;
    }

    .card-like-btn {
        width: 28px;
        height: 28px;
        top: 8px;
        right: 8px;
    }

    .card-like-btn svg {
        width: 14px;
        height: 14px;
    }

    /* Hide extra info to minimize card height on mobile */
    .design-card__specs,
    .transparency-breakdown .price-item:not(.price-item--total),
    .btn-block,
    .seller-info,
    .seller-info-inline,
    .card-social,
    .card-category {
        display: none !important;
    }

    .transparency-breakdown {
        border-top: none !important;
        padding-top: 0 !important;
        margin-top: auto !important;
    }

    .price-item--total {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        margin-top: 8px !important;
    }

    .price-item--total span:first-child {
        font-size: 0.8rem !important;
        line-height: 1.1 !important;
        color: var(--color-gray-dark) !important;
        opacity: 0.8 !important;
    }

    .price-item--total span:last-child {
        font-size: 1.15rem !important;
        font-weight: 700 !important;
        color: var(--color-noir) !important;
        white-space: nowrap !important;
    }
}

.design-card {
    background: var(--color-ivory);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: var(--shadow-soft);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.design-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.design-card__media {
    width: 100%;
    aspect-ratio: 4/5;
    /* Fixed Aspect Ratio */
    background-color: var(--color-gray-soft);
    position: relative;
    overflow: hidden;
}

.design-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures no stretching */
    display: block;
    transition: transform 0.5s ease;
}

.design-card:hover .design-card__media img {
    transform: scale(1.05);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    color: #ccc;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-heading);
}

.design-card__content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.design-card__category {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--color-gold);
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
}

.design-card__title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--color-noir);
    line-height: 1.3;
}

.design-card__specs {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--color-gray-dark);
    margin-bottom: 20px;
}

.transparency-breakdown {
    border-top: 1px solid var(--color-gray-soft);
    padding-top: 16px;
    margin-top: auto;
    /* Pushes to bottom */
}

.price-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.price-item--total {
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 8px;
    color: var(--color-noir);
}

.btn-block {
    width: 100%;
    margin-top: 24px;
}

/* --- BUTTONS & INTERACTIVTY --- */
.card-like-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    z-index: 10;
    transition: all 0.2s ease;
    padding: 0;
}

.card-like-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-noir);
    fill: none;
    transition: all 0.2s ease;
}

.card-like-btn.active svg {
    fill: #d12424 !important;
    stroke: #d12424 !important;
}

.tag-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(4px);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 5;
    pointer-events: none;
}

/* --- MODALS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--color-linen);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    border-radius: var(--radius-md);
    position: relative;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}