/* ===== Product cards (Home + Products page) ===== */
.card {
    --tx: transform .55s var(--ease), box-shadow .5s var(--ease), border-color .3s;
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
    transition: var(--tx)
}

.card.tilting { --tx: transform .14s ease-out, box-shadow .5s var(--ease), border-color .3s }

/* top bar reveal par left se "charge" hoti hai */
.card::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 14px;
    right: 14px;
    height: 4px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, var(--blue), var(--blue-l));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1s var(--ease) calc(var(--d, 0s) + .25s);
    z-index: 2
}

.card.in::before, html:not(.js) .card::before { transform: scaleX(1) }

.card:hover { transform: translateY(-8px); box-shadow: 0 34px 60px -30px rgba(11, 95, 216, .55); border-color: rgba(11, 95, 216, .55) }
.card:hover::before { background: linear-gradient(90deg, var(--blue), var(--amber)) }

.card .tag {
    align-self: flex-start;
    justify-self: start;
    font-size: .8rem;
    font-weight: 600;
    color: var(--blue);
    background: var(--sky);
    border-radius: 999px;
    padding: 3px 11px;
    margin-bottom: 10px
}

.card h3 { font-size: 1.04rem; line-height: 1.3 }
.card p { color: var(--mut); font-size: .97rem; flex: 1 }

.card > a {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    justify-self: start;
    font-weight: 600;
    text-decoration: none;
    padding-bottom: 3px;
    background: linear-gradient(var(--amber), var(--amber)) left bottom/0% 2px no-repeat;
    transition: background-size .45s var(--ease), color .3s
}

.card > a:hover, .card:hover > a { background-size: 100% 2px }

/* image area: blueprint grid + glow */
.card .ph {
    position: relative;
    aspect-ratio: 4/3;
    margin: -22px -22px 18px;
    overflow: hidden;
    border-radius: 17px 17px 0 0;
    background: radial-gradient(60% 55% at 50% 60%, #fff 0, rgba(255, 255, 255, 0) 100%), linear-gradient(rgba(11, 95, 216, .06) 1px, transparent 1px) 0 0/22px 22px, linear-gradient(90deg, rgba(11, 95, 216, .06) 1px, transparent 1px) 0 0/22px 22px, #eef4fc
}

/* image ke peeche ghoomta ring */
.card .ph::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 52%;
    width: 64%;
    aspect-ratio: 1;
    translate: -50% -50%;
    border-radius: 50%;
    border: 2px dashed rgba(11, 95, 216, .18);
    transition: border-color .4s, scale .6s var(--ease);
    animation: spin 30s linear infinite
}

.card:hover .ph::before { border-color: rgba(242, 165, 22, .55); scale: 1.12 }

.card .ph img { position: relative; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s var(--ease), filter .5s }
.card:hover .ph img { transform: scale(1.07) }

/* Asli product photo (seedhi/khadi photo): kaate bina poori dikhe */
.card .ph img.photo { object-fit: contain; object-position: center; padding: 16px; box-sizing: border-box; filter: drop-shadow(0 14px 14px rgba(10, 30, 70, .2)) }
.card:hover .ph img.photo { transform: translateY(-6px) scale(1.06); filter: drop-shadow(0 24px 18px rgba(10, 30, 70, .3)) }

/* ===== Filter chips (Products page) — active chip ke peeche sliding pill ===== */
.chips { position: relative; display: inline-flex; gap: 6px; flex-wrap: wrap; margin-bottom: 34px; padding: 6px; background: var(--mist); border: 1px solid var(--line); border-radius: 999px }

.chip-pill {
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    border-radius: 999px;
    background: var(--blue);
    box-shadow: 0 10px 22px -10px rgba(11, 95, 216, .9);
    transition: transform .55s var(--spring), width .55s var(--spring), height .3s;
    z-index: 0
}

.chip {
    position: relative;
    z-index: 1;
    border: 0;
    background: transparent;
    border-radius: 999px;
    padding: .5em 1.2em;
    font: 600 .95rem "Source Sans 3";
    cursor: pointer;
    color: var(--ink);
    transition: color .35s
}

.chip:hover { color: var(--blue) }
.chip[aria-pressed=true] { color: #fff }
.no-pill .chip[aria-pressed=true] { background: var(--blue) }

/* phone par card horizontal: photo left, text right (page chhota rehta hai) */
@media(max-width:560px) {
    .card { display: grid; grid-template-columns: 112px 1fr; grid-template-rows: auto auto 1fr auto; column-gap: 16px; padding: 18px 18px 18px 0; border-radius: 16px }
    .card .ph { grid-row: 1/5; margin: -18px 0 -18px 0; aspect-ratio: auto; border-radius: 15px 0 0 15px }
    .card .ph img.photo { padding: 10px }
    .card .ph::before { width: 90% }
    .card::before { left: 0; right: auto; width: 4px; top: 14px; bottom: 14px; height: auto; border-radius: 0 4px 4px 0; transform: scaleY(0); transform-origin: top }
    .card.in::before { transform: scaleY(1) }
    .card .tag { margin-bottom: 6px }
    .card h3 { font-size: .98rem; margin-bottom: .4em }
    .card p { font-size: .93rem; margin-bottom: .7em }
    .chips { border-radius: 18px }
    .chip-pill { border-radius: 12px }
    .chip { border-radius: 12px; padding: .45em .95em }
}
