/* Preserve native text entry, selection and touch behavior on every editable control. */
:where(input, textarea, select, [contenteditable="true"], [role="textbox"]) {
    -webkit-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default;
    pointer-events: auto;
    touch-action: auto;
}

/* A pair of translucent, expanding water rings; no dark wash over the control. */
.pp-button-ripple {
    position: fixed;
    z-index: 2147483000;
    display: block;
    overflow: hidden;
    border-radius: var(--pp-ripple-radius, 0);
    pointer-events: none;
}
.pp-button-ripple::before,
.pp-button-ripple::after {
    position: absolute;
    top: var(--pp-ripple-y, 50%);
    left: var(--pp-ripple-x, 50%);
    display: block;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 1.5px solid rgba(255,255,255,.96);
    border-radius: 47% 53% 51% 49% / 52% 46% 54% 48%;
    background: radial-gradient(ellipse at 35% 28%,rgba(255,255,255,.29),rgba(126,211,255,.12) 40%,rgba(64,175,255,.025) 72%,transparent 100%);
    box-shadow: inset 0 0 8px rgba(255,255,255,.33), 0 0 0 1px rgba(71,184,255,.42), 0 0 12px rgba(116,214,255,.42);
    content: "";
    opacity: 0;
    transform: scale(.12);
    pointer-events: none;
    will-change: transform, opacity;
}
.pp-button-ripple::after {
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-color: rgba(198,238,255,.78);
    border-radius: 54% 46% 43% 57% / 45% 57% 43% 55%;
    background: rgba(193,235,255,.12);
    box-shadow: inset 0 0 5px rgba(255,255,255,.35), 0 0 0 1px rgba(255,255,255,.35), 0 0 15px rgba(82,190,255,.35);
}
.pp-button-ripple.is-running::before { animation: pp-water-wave 510ms cubic-bezier(.16,.72,.28,1) both; }
.pp-button-ripple.is-running::after { animation: pp-water-wave 510ms cubic-bezier(.16,.72,.28,1) 55ms both; }
@keyframes pp-water-wave {
    0% { opacity: 0; transform: scale(.08) rotate(-8deg); }
    14% { opacity: .92; }
    54% { opacity: .55; transform: scale(var(--pp-ripple-mid-scale, 6)) rotate(5deg) skewX(-2deg); }
    100% { opacity: 0; transform: scale(var(--pp-ripple-scale, 12)) rotate(13deg) skewX(2deg); }
}
@media (prefers-reduced-motion: reduce) {
    .pp-button-ripple, .pp-button-ripple::before, .pp-button-ripple::after { display: none !important; animation: none !important; }
}

#auth-sec button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* Product cards get richer depth without running decorative animation loops. */
#products-grid .product-card {
    border-color: #e5eaf2;
    border-radius: 15px;
    background: linear-gradient(145deg,#fff 0%,#fff 70%,#f8fbff 100%);
    box-shadow: 0 5px 15px rgba(24,39,75,.055), inset 0 1px 0 rgba(255,255,255,.9);
    transition: transform .18s cubic-bezier(.2,.7,.2,1), box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}
#products-grid .product-card.selected {
    border-color: #e04462 !important;
    background: linear-gradient(145deg,#fff5f6,#fff 74%,#fff7f2) !important;
    box-shadow: 0 0 0 3px rgba(225,29,72,.09), 0 9px 23px rgba(190,24,60,.12), inset 0 1px 0 rgba(255,255,255,.9);
}
#product-checkout-card {
    border-color: rgba(191,205,224,.72) !important;
    background: linear-gradient(145deg,#fff 0%,#fcfdff 58%,#f2fbf7 100%) !important;
    box-shadow: 0 17px 42px rgba(32,48,76,.105), 0 2px 10px rgba(8,132,95,.07), inset 0 1px 0 rgba(255,255,255,.95) !important;
}
#product-checkout-card::after {
    position: absolute;
    z-index: 0;
    inset: 1px;
    border: 1px solid rgba(255,255,255,.74);
    border-radius: inherit;
    background: linear-gradient(125deg,rgba(255,255,255,.22),transparent 42%,rgba(16,185,129,.035));
    content: "";
    pointer-events: none;
}

/* One consistent, perceptible press response on touch and pointer controls. */
:where(button, [role="button"], a[href], input[type="button"], input[type="submit"], input[type="reset"]) {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: transform .16s cubic-bezier(.2,.75,.25,1);
}
:where(button:not(:disabled), [role="button"]:not([aria-disabled="true"]), a[href], input[type="button"], input[type="submit"], input[type="reset"]):active {
    transform: translateY(1px) scale(.975) !important;
    filter: saturate(.98);
}
@media (prefers-reduced-motion: reduce) {
    :where(button, [role="button"], a[href], input[type="button"], input[type="submit"], input[type="reset"]) { transition-duration: .01ms; }
}

@media (hover: hover) and (pointer: fine) {
    #products-grid .product-card:not(.selected):hover { transform: translateY(-2px); border-color: #cbd8e9; box-shadow: 0 10px 24px rgba(24,39,75,.1), 0 0 15px rgba(59,130,246,.06); }
    #product-checkout-card:hover { box-shadow: 0 21px 48px rgba(32,48,76,.13), 0 3px 15px rgba(8,132,95,.09), inset 0 1px 0 rgba(255,255,255,.95) !important; }
}
html[data-theme="dark"] #products-grid .product-card { border-color: #334155; background: linear-gradient(145deg,#172235,#131e30 72%,#14253a); box-shadow: 0 7px 18px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.035); }
html[data-theme="dark"] #products-grid .product-card.selected { border-color: #fb7185 !important; background: linear-gradient(145deg,#48232f,#302334 74%,#24253a) !important; box-shadow: 0 0 0 3px rgba(251,113,133,.12), 0 10px 26px rgba(190,24,60,.2), inset 0 1px 0 rgba(255,255,255,.045); }
html[data-theme="dark"] #product-checkout-card { border-color: #34445d !important; background: linear-gradient(145deg,#172235,#111c2f 62%,#112b2c) !important; box-shadow: 0 18px 42px rgba(0,0,0,.34), 0 0 21px rgba(52,211,153,.055), inset 0 1px 0 rgba(255,255,255,.045) !important; }
html[data-theme="dark"] #product-checkout-card::after { border-color: rgba(148,163,184,.12); background: linear-gradient(125deg,rgba(148,163,184,.06),transparent 45%,rgba(52,211,153,.035)); }
