/* ============================================================
   TattooIt storefront theme (Phase 1 foundation)
   Scoped to .tt-theme (applied on MainLayout) so the admin UI
   is untouched. Fonts loaded via <link> in App.razor.
   ============================================================ */

.tt-theme {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --accent: #ff5c7a;
    --ink: #1b1830;
    --muted: #6f6a86;
    --cream: #fbf7f2;
    --tint: #eef0ff;
    --radius: 20px;

    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: var(--ink);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}

/* Headings use the display face */
.tt-theme h1, .tt-theme h2, .tt-theme h3,
.tt-theme h4, .tt-theme h5, .tt-theme h6,
.tt-theme .display-1, .tt-theme .display-2, .tt-theme .display-3,
.tt-theme .display-4, .tt-theme .display-5, .tt-theme .display-6 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.tt-theme p, .tt-theme li, .tt-theme span, .tt-theme a, .tt-theme label {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* Links */
.tt-theme a { color: var(--primary); text-decoration: none; }
.tt-theme a:hover { color: var(--primary-dark); }

/* Muted helpers to match the palette */
.tt-theme .text-muted, .tt-theme .text-body-secondary { color: var(--muted) !important; }

/* Buttons -> pill, brand indigo */
.tt-theme .btn {
    border-radius: 999px;
    font-weight: 700;
}
.tt-theme .btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 12px 26px -12px rgba(99, 102, 241, .7);
}
.tt-theme .btn-primary:hover,
.tt-theme .btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}
.tt-theme .btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}
.tt-theme .btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
/* When a link is styled as a button, the generic `.tt-theme a` colour rule would
   otherwise repaint its label (e.g. white-on-indigo becomes indigo-on-indigo and
   vanishes). Keep button labels their proper colour. */
.tt-theme a.btn-primary,
.tt-theme a.btn-primary:hover,
.tt-theme a.btn-primary:focus,
.tt-theme a.btn-secondary,
.tt-theme a.btn-success,
.tt-theme a.btn-danger { color: #fff; }
.tt-theme a.btn-outline-primary { color: var(--primary); }
.tt-theme a.btn-outline-primary:hover { color: #fff; }

/* Soft rounded cards to match the design language */
.tt-theme .card,
.tt-theme .rounded-4,
.tt-theme .rounded-3 {
    border-radius: var(--radius);
}
.tt-theme .card {
    border-color: rgba(27, 24, 48, .08);
}

/* Rounded inputs */
.tt-theme .form-control,
.tt-theme .form-select {
    border-radius: 12px;
}

/* Section backgrounds that were pure white sit nicer on cream */
.tt-theme .bg-light { background-color: #fff !important; }

/* ---- Sticky brand header ---- */
.tt-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(251, 247, 242, .85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(27, 24, 48, .07);
    box-shadow: none;
}
.tt-header .nav-link {
    color: var(--ink) !important;
    font-weight: 600;
}
.tt-header .nav-link:hover { color: var(--primary) !important; }
.tt-header .navbar-brand img { height: 38px; width: auto; }

/* Announcement strip */
.tt-announce {
    background: var(--ink);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
    text-align: center;
    padding: 9px 16px;
}

/* ---- Footer ---- */
.tt-footer {
    background: var(--ink);
    color: rgba(255, 255, 255, .72);
}
.tt-footer .footer-heading,
.tt-footer h6 { color: #fff; font-family: 'Bricolage Grotesque', sans-serif; }

/* ---- Product cards (used on products list + category grids) ---- */
.tt-theme .tt-product-card {
    display: block;
    background: #fff;
    border: 1px solid rgba(27, 24, 48, .07);
    border-radius: var(--radius);
    overflow: hidden;
    height: 100%;
    color: var(--ink);
    transition: transform .2s ease, box-shadow .2s ease;
}
.tt-theme .tt-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 44px -26px rgba(27, 24, 48, .4);
    color: var(--ink);
}
.tt-theme .tt-product-imgwrap {
    aspect-ratio: 1 / 1;
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tt-theme .tt-product-imgwrap img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.tt-theme .tt-product-body { padding: 16px 18px; }
.tt-theme .tt-product-title {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}
.tt-theme .tt-product-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
}
.tt-theme .tt-product-price { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; color: var(--ink); }
.tt-theme .tt-product-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 9px 15px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ---- Product detail page ---- */
.tt-theme .tt-media {
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 30px 60px -34px rgba(27, 24, 48, .35);
    border: 1px solid rgba(27, 24, 48, .06);
    padding: 10px;
}
.tt-theme .tt-media img,
.tt-theme .tt-media video { border-radius: calc(var(--radius) - 8px); }
.tt-theme .tt-buybox {
    background: #fff;
    border: 1px solid rgba(27, 24, 48, .08);
    border-radius: var(--radius);
    padding: 22px;
}
.tt-theme .tt-buybox .price,
.tt-theme .tt-buybox .h3.price {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    color: var(--primary);
}
.tt-theme .tt-section-card {
    background: #fff;
    border: 1px solid rgba(27, 24, 48, .08);
    border-radius: var(--radius);
    padding: 28px;
    margin-top: 28px;
}

/* ---- Cart / checkout ---- */
.tt-theme .card-header[style*="var(--primary-color)"],
.tt-theme .card-header { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }

/* ---- Cart order summary ---- */
.tt-theme .tt-summary-total {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--ink);
    padding-top: 4px;
}
.tt-theme .tt-summary-total span:last-child { color: var(--primary); }
.tt-theme .card-header { border: 0; }

/* ---- Category index cards ---- */
.tt-theme .tt-cat-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 5;
    box-shadow: 0 20px 44px -26px rgba(27, 24, 48, .45);
    color: #fff;
}
.tt-theme .tt-cat-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.tt-theme .tt-cat-card:hover img { transform: scale(1.06); }
.tt-theme .tt-cat-card:hover { color: #fff; }

/* ---- Product detail (redesign) ---- */
.tt-theme .hp-head { font-family: 'Bricolage Grotesque', sans-serif; }
.tt-theme .tt-prodgrid {
    max-width: 1200px; margin: 0 auto;
    padding: clamp(12px,2vw,24px) 24px clamp(40px,6vw,64px);
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: clamp(28px,4vw,56px); align-items: start;
}
.tt-theme .tt-gallery-main {
    position: relative; border-radius: var(--radius); overflow: hidden;
    background: #fff; box-shadow: 0 30px 60px -30px rgba(27,24,48,.35);
    aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
}
.tt-theme .tt-gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 4%; }
.tt-theme .tt-gallery-main video { width: 100%; height: 100%; object-fit: contain; }
/* horizontal thumbnails (reuses ComponentVerticalImgaeList) */
.tt-theme .tt-thumbs .VerticalImageListWrapper { box-shadow: none !important; background: transparent !important; }
.tt-theme .tt-thumbs .VerticalImageListWrapper > div { flex-direction: row !important; flex-wrap: wrap; }
.tt-theme .tt-thumbs .media-item { max-width: 76px !important; }
.tt-theme .tt-thumbs .media-item img { border-radius: 12px; border: 2px solid rgba(27,24,48,.1); aspect-ratio: 1/1; object-fit: cover; }
/* quantity tiles */
.tt-theme .tt-qtygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 10px; }
.tt-theme .tt-qty {
    font-family: inherit; cursor: pointer; text-align: left; padding: 11px 15px;
    border-radius: 14px; transition: all .15s ease; background: #fff;
    border: 2px solid rgba(0, 0, 0, .12); color: var(--ink);
}
.tt-theme .tt-qty:hover { border-color: rgba(0, 0, 0, .28); }
.tt-theme .tt-qty.active {
    background: var(--tint);
    border-color: var(--primary);
}
.tt-theme .tt-qty .n { font-weight: 700; font-size: 15px; }
.tt-theme .tt-qty .p { font-size: 13px; opacity: .75; font-weight: 700; }
/* trust row */
.tt-theme .tt-trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; margin-top: 32px; border-top: 1px solid rgba(27,24,48,.08); padding-top: 26px; }
.tt-theme .tt-trust-item { display: flex; align-items: center; gap: 10px; }
.tt-theme .tt-trust-ico { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; background: var(--tint); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 16px; }
