/* Professional style.css */

:root {
    --primary: #0f172a;
    --secondary: #475569;
    --accent: #2563eb;
    --success: #10b981;
    --bg: #f8fafc;
    --white: #fff;
    --border: #e2e8f0;
    --shadow: 0 20px 45px rgba(15,23,42,.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

body {
    font-family: Inter,Arial,sans-serif;
    background: linear-gradient(180deg,#f8fafc,#eef2f7);
    color: #0f172a;
}

/* ================= VISITING CARD (hero) ================= */
.visiting-card {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    /*background-size: cover;*/
    background-position: center;
}

    .visiting-card img {
        width: 100%;
        height: auto;
        display: block;
    }

/* ================= SHARE STRIP ================= */
.card-hero-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    max-width: 560px;
    margin: 0 auto;
}

    .card-hero-row .visiting-card-wrap {
        margin: 24px 0 0;
        padding: 0;
        flex: 1 1 auto;
        min-width: 0;
    }

.share-strip {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

.share-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(15,23,42,.15);
    transition: .25s;
}

    .share-icon svg {
        width: 19px;
        height: 19px;
    }

    .share-icon:hover {
        transform: translateY(-3px) scale(1.06);
        box-shadow: 0 10px 20px rgba(15,23,42,.22);
    }

    .share-icon:active {
        transform: scale(.95);
    }

.share-whatsapp { background: #25D366; }
.share-facebook { background: #1877F2; }
.share-twitter  { background: #0f172a; }
.share-telegram { background: #229ED9; }
.share-copy     { background: var(--accent); }

.share-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 20px);
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: .25s;
    z-index: 50;
}

    .share-toast.show {
        opacity: 1;
        transform: translate(-50%, 0);
    }

@media (max-width: 576px) {
    .card-hero-row {
        flex-direction: column;
    }

    .share-strip {
        flex-direction: row;
        justify-content: center;
        margin-top: 12px;
    }

    .card-hero-row .visiting-card-wrap {
        width: 100%;
    }
}

/* ================= INFO BLOCK ================= */
.info-block {
    max-width: 480px;
    margin: 24px auto;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.info-tabbar {
    display: flex;
    background: #0f172a;
    padding: 6px;
    gap: 6px
}
.info-tab {
    flex: 1;
    border: 0;
    background: transparent;
    color: #cbd5e1;
    padding: 14px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: .3s;
}

/*.info-tab {
    flex: 1;
    border: 0;
    background: transparent;
    color: #cbd5e1;
    padding: 14px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: .3s
}*/

    .info-tab:hover, .info-tab.active {
        background: var(--accent);
        color: #fff
    }
/* preview-only, not part of style.css */
.visiting-card-wrap {
    max-width: 480px;
    margin: 24px auto 0;
    padding: 0 24px;
}

.visiting-card {
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg,#0B4FA0,#2563eb 55%,#22C7C4);
    box-shadow: 0 20px 45px rgba(15,23,42,.18);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
   /* padding: 20px 22px;*/
    color: #fff;
    font-family: Inter, Arial, sans-serif;
}

    .visiting-card .phone {
        align-self: flex-end;
        font-size: 13px;
        background: rgba(255,255,255,.18);
        padding: 5px 10px;
        border-radius: 999px;
    }

    .visiting-card .brand {
        font-size: 20px;
        font-weight: 700;
    }

    .visiting-card .addr {
        font-size: 12px;
        opacity: .85;
        margin-top: 2px;
    }

.note {
    max-width: 480px;
    margin: 8px auto 0;
    padding: 0 24px;
    font-size: 12px;
    color: #94a3b8;
    font-family: Inter, Arial, sans-serif;
}

/* ---- Panel show/hide (this was missing) ---- */
.info-panel {
    display: none;
    padding: 24px;
    animation: infoFadeIn .2s ease;
}

    .info-panel.active {
        display: block
    }

@keyframes infoFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@media (prefers-reduced-motion: reduce) {
    .info-panel {
        animation: none
    }
}

/* ---- About panel ---- */
.about-heading {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary)
}

.about-text {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--secondary)
}

/* ---- Empty state ---- */
.info-empty {
    font-size: 13px;
    color: var(--secondary);
    text-align: center;
    padding: 24px 8px
}

/* ================= PRODUCT CATALOG (one row each) ================= */
.catalog-grid {
    display: flex;
    flex-direction: column;
    gap: 16px
}

.product-card {
    display: flex;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(0,0,0,.05);
    transition: .3s
}

    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow)
    }

.product-media {
    width: 110px;
    height: 110px;
    flex: 0 0 110px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative
}

.product-img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    transition: .3s
}

.product-card:hover .product-img {
    transform: scale(1.08)
}

.spec-tag {
    position: absolute;
    left: 8px;
    bottom: 8px;
    background: #111827;
    color: #fff;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 999px
}

.product-body {
    flex: 1;
    min-width: 0;
    padding: 14px;
    display: flex;
    flex-direction: column
}

.product-name {
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.product-desc {
    font-size: 13px;
    color: var(--secondary);
    margin: 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

/* ---- Price row: MRP strikethrough + Sale price + Discount badge ---- */
.price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin: 2px 0
}

.product-mrp {
    font-size: 12.5px;
    color: #94a3b8;
    text-decoration: line-through;
    white-space: nowrap
}

.product-price {
    color: var(--success);
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap
}

.discount-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--success);
    background: rgba(16,185,129,.1);
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap
}

.product-footer {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px
}

.qty-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 4px 6px;
}

.qty-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15,23,42,.1);
}

.qty-value {
    min-width: 14px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

.btn-catalog {
    background: linear-gradient(135deg,#2563eb,#1d4ed8);
    color: #fff;
    border: 0;
    padding: 8px 16px;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: .3s
}

    .btn-catalog:hover {
        transform: translateY(-2px)
    }

    .btn-catalog:active {
        transform: scale(.97)
    }

.product-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}

    .product-card.selected .btn-catalog {
        background: linear-gradient(135deg,var(--success),#0e9c72);
    }

/* ================= ORDER BAR (cart) ================= */
.order-bar {
    max-width: 480px;
    margin: 0 auto 24px;
    padding: 14px 20px;
    background: var(--primary);
    color: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    bottom: 16px;
}

.order-bar-text {
    font-size: 13.5px;
    color: #cbd5e1;
}

    .order-bar-text strong {
        color: #fff;
        font-size: 16px;
    }

.btn-order {
    background: var(--success);
    color: #fff;
    border: 0;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: .3s;
    white-space: nowrap;
}

    .btn-order:hover {
        transform: translateY(-2px);
    }

    .btn-order:active {
        transform: scale(.97);
    }

/* ================= CONTACT PANEL ================= */
.contact-row {
    display: flex;
    justify-content: space-between;
    padding: 14px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 10px
}

.contact-label {
    font-weight: 700;
    color: #2563eb
}

@media(max-width:576px) {
    .info-block {
        margin: 10px;
        border-radius: 16px
    }

    .product-media {
        width: 90px;
        height: 90px;
        flex-basis: 90px
    }

    .product-img {
        width: 72px;
        height: 72px
    }
}

/* =====================================================================
   PAGE LAYOUT (single centred column)
   Card, share bar, tabs and order bar all share one 480px column, so
   their left and right edges line up. A coloured band sits behind the
   card like a profile header. Overrides the older hero/share rules above.
   ===================================================================== */
body {
    min-height: 100vh;
    background:
        radial-gradient(120% 70% at 50% 0%, rgba(96,165,250,.35) 0%, rgba(96,165,250,0) 60%) top center / 100% 260px no-repeat,
        linear-gradient(160deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%) top center / 100% 230px no-repeat,
        #eef2f7;
}

/* The page column (outer .card-body in mycard.aspx) */
form > .card-body {
    max-width: 480px;
    margin: 0 auto;
    padding: 28px 16px 32px;
}

    /* Inner wrapper around the tabs: no extra indent */
    form > .card-body .card-body {
        padding: 0;
    }

/* Card on top, share bar underneath - same width as everything below */
.card-hero-row {
    display: block;
    max-width: none;
    margin: 0;
}

    .card-hero-row .visiting-card-wrap {
        margin: 0;
        padding: 0;
        max-width: none;
        width: 100%;
    }

#cardArea.visiting-card {
    container-type: inline-size; /* card text sizes are set in cqw (see mycard.aspx.cs) */
    max-width: none;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 24px 48px -12px rgba(15,23,42,.45), 0 0 0 1px rgba(255,255,255,.12);
}

/* Same width and corners as the card and tabs panel above it */
.share-strip {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 20px 0 0; /* last item on the page, below the tabs */
    padding: 12px 18px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 24px -8px rgba(15,23,42,.25);
}

    .share-strip::before {
        content: "Share";
        font-size: 12.5px;
        font-weight: 700;
        letter-spacing: .04em;
        text-transform: uppercase;
        color: #64748b;
        margin-right: 2px;
    }

    .share-strip .share-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        box-shadow: none;
    }

        .share-strip .share-icon svg {
            width: 17px;
            height: 17px;
        }

.info-block {
    max-width: none;
    margin: 20px 0 0;
    border-radius: 18px;
}

.order-bar {
    max-width: none;
    margin: 16px 0 0;
}

.btn-catalog {
    white-space: nowrap;
}

/* Narrow screens: one solid, edge-to-edge block - card and tabs touch the
   screen edges and each other, with no side gaps or rounded corners. */
@media (max-width: 600px) {
    body {
        background: #eef2f7;
    }

    form > .card-body {
        max-width: none;
        padding: 0 0 24px;
    }

    #cardArea.visiting-card {
        border-radius: 0;
        box-shadow: none;
    }

    .info-block {
        margin: 0;
        border: 0;
        border-radius: 0;
        box-shadow: 0 10px 24px -14px rgba(15,23,42,.25);
    }

    .info-tabbar {
        border-radius: 0;
    }

    .info-tab {
        padding: 13px 6px;
        font-size: 14px;
    }

    .order-bar {
        margin: 0;
        border-radius: 0;
        bottom: 0;
    }

    .share-strip {
        margin: 12px 0 0;
        border-radius: 0;
        box-shadow: 0 10px 24px -14px rgba(15,23,42,.25);
    }
}

@media (max-width: 380px) {
    .share-strip {
        gap: 6px;
        padding: 10px 12px;
    }

        .share-strip::before {
            display: none;
        }
}
