/* =========================================================
   UFS Communication Homepage CSS
   Light Theme / Responsive / App-like Ecommerce UI
========================================================= */

:root {
    --primary: #fc3237;
    --primary-dark: #d92228;
    --secondary: #678a56;
    --text: #1f2937;
    --muted: #6b7280;
    --light: #f7f8fb;
    --white: #ffffff;
    --border: #e5e7eb;
    --soft-red: #fff0f1;
    --soft-green: #f0f8ed;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--light);
    color: var(--text);
    padding-bottom: 78px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input {
    font: inherit;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    padding: 12px max(16px, calc((100vw - 1200px) / 2));
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(252, 50, 55, 0.18);
    flex: 0 0 auto;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand strong {
    display: block;
    font-size: 18px;
    line-height: 1.1;
    white-space: nowrap;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn,
.account-chip {
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 999px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.icon-btn {
    width: 42px;
    padding: 0;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 6px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.search-box input {
    border: 0;
    outline: none;
    width: 100%;
    padding: 12px 14px;
    background: transparent;
    color: var(--text);
}

.search-box button {
    border: 0;
    background: var(--primary);
    color: var(--white);
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
}

main,
.footer {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-section {
    padding: 22px 0 10px;
}

.hero-slider {
    position: relative;
    min-height: 355px;
    border-radius: 32px;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(252, 50, 55, 0.18), transparent 35%),
        radial-gradient(circle at bottom left, rgba(103, 138, 86, 0.18), transparent 35%),
        linear-gradient(135deg, #ffffff, #fff7f7);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    align-items: center;
    gap: 26px;
    padding: clamp(24px, 5vw, 56px);
    transform: translateX(16px);
    transition: opacity 450ms ease, transform 450ms ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.eyebrow,
.section-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    background: var(--soft-red);
    color: var(--primary);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hero-content h1,
.hero-content h2 {
    font-size: clamp(30px, 5vw, 56px);
    line-height: 1.02;
    margin: 14px 0;
    letter-spacing: -0.05em;
}

.hero-content p {
    color: var(--muted);
    font-size: clamp(15px, 2vw, 18px);
    line-height: 1.7;
    max-width: 620px;
    margin: 0 0 22px;
}

.hero-btn,
.promo-strip a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    border-radius: 16px;
    padding: 14px 20px;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(252, 50, 55, 0.22);
}

.hero-card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 28px;
    padding: 26px;
    min-height: 220px;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-card span {
    color: var(--secondary);
    font-weight: 900;
    font-size: 14px;
}

.hero-card strong {
    font-size: 34px;
    line-height: 1;
    margin: 12px 0;
}

.hero-card small {
    color: var(--muted);
    line-height: 1.6;
    font-size: 15px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 99px;
    background: #d1d5db;
    cursor: pointer;
    transition: width 250ms ease, background 250ms ease;
}

.hero-dots button.active {
    width: 26px;
    background: var(--primary);
}

.section {
    padding: 30px 0;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-head h2 {
    margin: 8px 0 0;
    font-size: clamp(23px, 3vw, 34px);
    letter-spacing: -0.04em;
}

.section-head a {
    color: var(--primary);
    font-weight: 900;
    white-space: nowrap;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.category-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 22px;
    min-height: 145px;
    padding: 16px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.category-card img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 18px;
    background: #f9fafb;
}

.category-card span {
    font-weight: 900;
    margin-top: 12px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.product-image-wrap {
    display: block;
    background: #f9fafb;
    aspect-ratio: 1 / 0.86;
    padding: 16px;
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 14px;
}

.product-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
    font-weight: 900;
    line-height: 1.35;
}

.product-meta {
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.stock-in,
.stock-low,
.stock-pre,
.stock-out {
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 900;
}

.stock-in {
    background: var(--soft-green);
    color: var(--secondary);
}

.stock-low {
    background: #fff7ed;
    color: #c2410c;
}

.stock-pre {
    background: #eff6ff;
    color: #2563eb;
}

.stock-out {
    background: #f3f4f6;
    color: #6b7280;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 14px;
}

.current-price::before {
    content: "₹";
}

.current-price {
    font-size: 20px;
    font-weight: 950;
    color: var(--text);
}

.old-price {
    color: var(--muted);
    text-decoration: line-through;
    font-size: 13px;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr 44px;
    gap: 8px;
}

.btn-buy,
.btn-cart {
    min-height: 43px;
    border-radius: 14px;
    border: 0;
    font-weight: 900;
    cursor: pointer;
}

.btn-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
}

.btn-cart {
    background: var(--soft-red);
    color: var(--primary);
    font-size: 22px;
}

.promo-strip {
    margin: 18px 0;
    border-radius: 30px;
    padding: clamp(22px, 4vw, 38px);
    background:
        linear-gradient(135deg, rgba(252, 50, 55, 0.92), rgba(103, 138, 86, 0.9)),
        #fc3237;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    box-shadow: var(--shadow);
}

.promo-strip span {
    font-weight: 900;
    opacity: 0.9;
}

.promo-strip h2 {
    margin: 8px 0;
    font-size: clamp(24px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.promo-strip p {
    margin: 0;
    opacity: 0.9;
}

.promo-strip a {
    background: var(--white);
    color: var(--primary);
    box-shadow: none;
    white-space: nowrap;
}

.trust-section {
    width: min(1200px, calc(100% - 32px));
    margin: 26px auto 40px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.trust-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.trust-card strong {
    display: block;
    font-size: 18px;
    margin-bottom: 6px;
}

.trust-card span {
    color: var(--muted);
    line-height: 1.5;
}

.empty-msg {
    grid-column: 1 / -1;
    background: var(--white);
    border: 1px dashed var(--border);
    border-radius: 20px;
    padding: 18px;
    color: var(--muted);
}

.footer {
    background: #111827;
    color: var(--white);
    width: 100%;
    max-width: none;
    padding: 44px max(16px, calc((100vw - 1200px) / 2)) 22px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 28px;
}

.footer h2,
.footer h3 {
    margin-top: 0;
}

.footer p,
.footer a,
.footer-bottom {
    color: #d1d5db;
}

.footer a {
    display: block;
    margin: 10px 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 28px;
    padding-top: 18px;
    text-align: center;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    width: min(560px, calc(100% - 22px));
    z-index: 70;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    border-radius: 22px;
    display: none;
    grid-template-columns: repeat(5, 1fr);
    padding: 8px;
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    border-radius: 16px;
    padding: 8px 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.bottom-nav span {
    font-size: 18px;
    line-height: 1;
}

.bottom-nav a.active {
    background: var(--soft-red);
    color: var(--primary);
}

@media (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .trust-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    body {
        padding-bottom: 92px;
    }

    .app-header {
        padding: 10px 12px;
    }

    .brand small {
        display: none;
    }

    .brand strong {
        font-size: 15px;
    }

    .brand-logo {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .account-chip {
        min-height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }

    .icon-btn {
        width: 38px;
        min-height: 36px;
    }

    .search-box {
        border-radius: 16px;
    }

    .search-box input {
        padding: 11px 10px;
        font-size: 14px;
    }

    .search-box button {
        padding: 11px 12px;
        border-radius: 12px;
        font-size: 13px;
    }

    main {
        width: min(100% - 24px, 1200px);
    }

    .hero-slider {
        min-height: 520px;
        border-radius: 26px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 24px;
    }

    .hero-card {
        min-height: 150px;
        padding: 22px;
    }

    .hero-card strong {
        font-size: 28px;
    }

    .section {
        padding: 24px 0;
    }

    .section-head {
        align-items: flex-start;
    }

    .category-grid {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 4px;
    }

    .category-card {
        min-width: 136px;
        min-height: 132px;
        scroll-snap-align: start;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .product-info {
        padding: 12px;
    }

    .product-title {
        font-size: 13px;
        min-height: 38px;
    }

    .product-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .current-price {
        font-size: 17px;
    }

    .product-actions {
        grid-template-columns: 1fr;
    }

    .btn-cart {
        display: none;
    }

    .promo-strip {
        flex-direction: column;
        align-items: flex-start;
        border-radius: 24px;
    }

    .trust-section {
        width: min(100% - 24px, 1200px);
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .bottom-nav {
        display: grid;
    }
}

@media (max-width: 420px) {
    .product-grid {
        gap: 10px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 31px;
    }

    .section-head h2 {
        font-size: 23px;
    }
}
