/**
 * Navratna Promotional Card
 * Shared between homepage and shop page.
 *
 * @package Ratna_Gems
 * @since   3.6.0
 */

/* ---------- Base (light mode) ---------- */
.navratna-section {
    margin: 1.25rem 0.75rem;
    padding: 0;
    background: linear-gradient(135deg, #fffdf7 0%, #fef5e7 35%, #fcecd4 70%, #f5e1c4 100%);
    border-radius: 0.75rem;
    box-shadow: 0 12px 28px -20px rgba(124, 45, 18, 0.55);
    overflow: hidden;
}

.navratna-card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 0.85rem;
}

.navratna-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: #78350f;
}

.navratna-top img {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    padding: 6px;
    border: 2px solid rgba(249, 115, 22, 0.35);
    box-shadow: 0 8px 20px -12px rgba(124, 45, 18, 0.5);
}

.navratna-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.navratna-info h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #92400e;
    line-height: 1.3;
}

.navratna-info h2 span {
    font-weight: 500;
    opacity: 0.85;
}

.navratna-stones {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: #78350f;
    opacity: 0.9;
}

.navratna-meta {
    margin: 0.15rem 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.9rem;
}

.navratna-price {
    color: #b45309;
    font-weight: 700;
}

.navratna-cert {
    color: #166534;
    font-weight: 600;
}

.navratna-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    padding: 0.7rem 1.75rem;
    background: #7c2d12;
    color: #fff;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 8px 20px -10px rgba(124, 45, 18, 0.6);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.navratna-cta:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -12px rgba(124, 45, 18, 0.7);
    color: #fff;
}

/*
 * Shop page Navratna markup comes from classic editor and includes
 * wpautop-generated <p>/<br> nodes. Remove visual artifacts.
 */
.navratna-section br,
.navratna-section p:empty {
    display: none;
}

.navratna-card > p {
    margin: 0;
}

.navratna-card > p .navratna-top {
    display: none;
}

.navratna-card > p .navratna-cta {
    display: inline-flex;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
    .navratna-section {
        margin: 1rem 0.45rem;
        border-radius: 0.65rem;
    }

    .navratna-card {
        padding: 0.85rem;
        gap: 0.65rem;
    }

    .navratna-top {
        align-items: flex-start;
        gap: 0.75rem;
    }

    .navratna-top img {
        width: 64px;
        height: 64px;
        padding: 5px;
    }

    .navratna-info h2 {
        font-size: 1rem;
        line-height: 1.25;
    }

    .navratna-stones {
        font-size: 0.8rem;
        line-height: 1.35;
    }

    .navratna-meta {
        margin: 0.1rem 0 0;
        gap: 0.45rem;
        font-size: 0.82rem;
    }

    .navratna-cta {
        width: 100%;
        padding: 0.62rem 0.9rem;
        font-size: 0.9rem;
        border-radius: 0.45rem;
    }
}

@media (min-width: 768px) {
    .navratna-section {
        margin: 1.25rem 1rem;
    }

    .navratna-card {
        padding: 1rem 1.25rem;
        gap: 0.85rem;
    }

    .navratna-top {
        gap: 1.25rem;
    }

    .navratna-top img {
        width: 90px;
        height: 90px;
        padding: 8px;
    }

    .navratna-info h2 {
        font-size: 1.15rem;
    }

    .navratna-stones {
        font-size: 0.85rem;
    }

    .navratna-meta {
        font-size: 0.9rem;
    }

    .navratna-cta {
        padding: 0.7rem 2rem;
        font-size: 0.95rem;
    }
}

@media (min-width: 1024px) {
    .navratna-section {
        margin: 1.5rem auto;
        max-width: 1180px;
    }

    .navratna-card {
        display: grid;
        grid-template-columns: 1fr 3fr;
        align-items: center;
        padding: 2rem 3rem;
        column-gap: 2rem;
        row-gap: 0.75rem;
    }

    .navratna-top {
        display: contents;
    }

    .navratna-top img {
        grid-column: 1;
        grid-row: 1 / 3;
        width: 180px;
        height: 180px;
        padding: 10px;
        justify-self: center;
    }

    .navratna-info {
        grid-column: 2;
        grid-row: 1;
    }

    .navratna-info h2 {
        font-size: 1.5rem;
    }

    .navratna-stones {
        font-size: 0.95rem;
    }

    .navratna-meta {
        font-size: 1rem;
    }

    .navratna-cta {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
        padding: 0.85rem 2.5rem;
        font-size: 1.05rem;
    }
}

/* ---------- Dark mode ---------- */
@media (prefers-color-scheme: dark) {
    .navratna-section {
        background: #111827;
    }

    .navratna-card {
        background: #1e293b;
        border: 1px solid #334155;
        box-shadow: none;
    }

    .navratna-top {
        color: #e2e8f0;
    }

    .navratna-top img {
        background: #0b1220;
        border-color: #334155;
        box-shadow: none;
    }

    .navratna-info h2,
    .navratna-stones,
    .navratna-meta {
        color: #e2e8f0 !important;
    }

    .navratna-price {
        color: #f97316;
    }

    .navratna-cert {
        color: #16a34a;
    }

    .navratna-cta {
        background: #8a2f10;
        color: #fff;
        box-shadow: none;
    }

    .navratna-cta:hover {
        filter: brightness(1.08);
        color: #fff;
    }
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
    .navratna-cta {
        transition: none;
    }

    .navratna-cta:hover {
        transform: none;
    }
}
