/* App-level styles loaded after style.css */

:root {
    --am-bg: #f4f6fb;
    --am-surface: #ffffff;
    --am-ink: #1e2430;
    --am-muted: #636f84;
    --am-border: #e4eaf3;
    --am-primary: #161978;
    --am-accent: #ff2c54;
    --am-success: #0f9b6c;
    --am-radius-sm: 10px;
    --am-radius: 16px;
    --am-radius-lg: 24px;
    --am-shadow-sm: 0 6px 18px rgba(18, 30, 58, 0.08);
    --am-shadow: 0 14px 38px rgba(18, 30, 58, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    background: radial-gradient(circle at top right, #f0f3ff 0%, var(--am-bg) 45%, #edf2f8 100%);
    color: var(--am-ink);
}

.container {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
}

.skip-link:focus {
    left: 12px;
    top: 12px;
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: 10px;
    padding: 8px 10px;
    z-index: 200;
}

/* Global buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    line-height: 1;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.btn-sm {
    padding: 9px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 15px;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--am-primary), #252ab5);
    border-color: var(--am-primary);
    color: #fff;
    box-shadow: 0 8px 18px rgba(22, 25, 120, 0.25);
}

.btn-primary:hover {
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline,
.btn-ghost {
    border-color: #ccd6e9;
    color: var(--am-primary);
    background: #fff;
}

.btn-outline-white {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.btn-white {
    border-color: #fff;
    background: #fff;
    color: var(--am-primary);
}

.btn-danger {
    background: var(--am-accent);
    border-color: var(--am-accent);
    color: #fff;
}

/* Header and nav */
.announcement-bar {
    padding: 8px 0;
    font-size: 14px;
}

.announcement-bar a,
.announcement-bar span {
    color: inherit;
    text-decoration: none;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--am-border);
}

.header-inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-logo img {
    width: auto;
    max-height: 42px;
}

.main-nav .nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.main-nav .nav-item {
    position: relative;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--am-ink);
    font-weight: 600;
}

.nav-link.active,
.nav-link:hover {
    color: var(--am-primary);
    background: #eef1ff;
    text-decoration: none;
}

.has-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: 12px;
    box-shadow: var(--am-shadow-sm);
    padding: 8px;
}

.dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dropdown-list a {
    display: block;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--am-ink);
    text-decoration: none;
}

.dropdown-list a:hover {
    background: #f4f7ff;
    color: var(--am-primary);
}

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

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--am-ink);
    text-decoration: none;
}

.btn-icon:hover {
    background: #eef2ff;
    color: var(--am-primary);
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--am-accent);
    color: #fff;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 3px;
}

.burger span {
    width: 16px;
    height: 2px;
    background: currentColor;
}

.search-bar {
    display: none;
    border-top: 1px solid var(--am-border);
    background: #fff;
}

.search-bar .container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
}

.search-form {
    flex: 1;
    position: relative;
}

.search-form input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid var(--am-border);
    padding: 12px 44px 12px 16px;
}

.search-form button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--am-primary);
}

.search-close {
    border: 0;
    background: transparent;
    color: var(--am-muted);
}

.flash-message {
    border-bottom: 1px solid #f0dda2;
    background: #fff7de;
    color: #6f5600;
    font-size: 14px;
}

.flash-message .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
}

.flash-close {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 20px;
}

/* Homepage sections */
.section-pad {
    padding: 72px 0;
}

.bg-light {
    background: linear-gradient(180deg, #f7faff 0%, #eef3fb 100%);
}

.bg-dark {
    background: linear-gradient(120deg, #12162b 0%, #232c53 100%);
    color: #fff;
}

.bg-primary {
    background: linear-gradient(135deg, #171d71 0%, #2e3698 100%);
    color: #fff;
}

.text-center {
    text-align: center;
}

.text-white h1,
.text-white h2,
.text-white h3,
.text-white p,
.bg-dark h1,
.bg-dark h2,
.bg-dark h3,
.bg-dark p,
.bg-primary h1,
.bg-primary h2,
.bg-primary h3,
.bg-primary p {
    color: #fff;
}

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

.section-header.text-center {
    display: block;
}

.link-view-all {
    color: var(--am-primary);
    font-weight: 700;
    text-decoration: none;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    border-radius: 0 0 28px 28px;
    margin-bottom: 16px;
}

.hero-slide {
    min-height: clamp(380px, 62vh, 620px);
    display: none;
    align-items: center;
    position: relative;
    padding: 70px 0;
}

.hero-slide.active {
    display: flex;
}

.hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-heading {
    color: #fff;
    max-width: 700px;
    margin-bottom: 10px;
}

.hero-sub {
    max-width: 620px;
    font-size: 18px;
    margin-bottom: 20px;
}

.hero-prev,
.hero-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--am-primary);
}

.hero-prev {
    left: 14px;
}

.hero-next {
    right: 14px;
}

.hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    display: flex;
    justify-content: center;
    gap: 7px;
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.5);
}

.hero-dot.active {
    width: 24px;
    background: #fff;
}

.hero-default {
    padding: 86px 0;
    background: linear-gradient(120deg, #171d71, #2b3496);
    border-radius: 0 0 24px 24px;
}

.hero-default h1,
.hero-default p {
    color: #fff;
}

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

.category-card,
.product-card,
.decoration-card,
.blog-card,
.testimonial-card {
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    overflow: hidden;
    box-shadow: var(--am-shadow-sm);
}

.category-card,
.blog-card {
    text-decoration: none;
    color: inherit;
}

.category-card__img,
.blog-card__img,
.product-card__img {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #fff;
    overflow: hidden;
}

.product-card__img {
    aspect-ratio: 1 / 1;
}

.category-card__img img,
.blog-card__img img,
.product-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-card:hover img,
.blog-card:hover img,
.product-card:hover img {
    transform: scale(1.04);
}

.category-card__body,
.blog-card__body,
.product-card__body {
    padding: 15px;
}

.category-card h3,
.blog-card h3,
.product-card h3 {
    margin: 0 0 6px;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.product-badge--featured {
    background: var(--am-primary);
}

.product-badge--new {
    background: var(--am-success);
    left: auto;
    right: 10px;
}

.product-card__brand {
    color: var(--am-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-card__name a {
    color: var(--am-ink);
    text-decoration: none;
}

.product-card__price {
    margin-top: 8px;
    color: var(--am-primary);
    font-weight: 700;
}

.price-label {
    color: var(--am-muted);
    font-size: 12px;
    margin-right: 4px;
    font-weight: 500;
}

.product-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

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

.how-step {
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius-sm);
    padding: 18px;
}

.how-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #edf1ff;
    color: var(--am-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.decoration-card {
    padding: 20px;
}

.decoration-icon {
    color: #ffc24c;
    margin-bottom: 8px;
}

.sector-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.sector-chip {
    text-decoration: none;
    border: 1px solid var(--am-border);
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--am-ink);
    background: #fff;
}

.sector-chip:hover {
    border-color: #cad6f2;
    background: #f3f6ff;
    color: var(--am-primary);
}

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

.testimonial-card {
    padding: 20px;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.testimonial-card blockquote {
    margin: 10px 0 12px;
    color: #eef1ff;
}

.testimonial-card cite {
    display: flex;
    flex-direction: column;
    color: #cfd7ff;
    font-style: normal;
}

.stars i {
    color: rgba(255, 255, 255, 0.35);
}

.stars i.filled {
    color: #ffd772;
}

.blog-card__date {
    color: var(--am-muted);
    font-size: 13px;
}

.cta-buttons {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Footer */
.site-footer {
    background: #0f1327;
    color: #d7ddff;
}

.footer-top {
    padding: 56px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 18px;
}

.footer-logo img {
    width: auto;
    max-height: 38px;
    margin-bottom: 10px;
}

.footer-heading {
    color: #fff;
    margin-bottom: 10px;
}

.footer-links,
.footer-contact-list,
.footer-legal {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li,
.footer-contact-list li,
.footer-legal li {
    margin-bottom: 8px;
}

.site-footer a {
    color: #d7ddff;
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
}

.social-links {
    display: flex;
    gap: 8px;
}

.social-links a {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 0;
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.footer-legal {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* Customiser */
.customiser-page {
    background: #edf2f9;
}

.customiser-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--am-border);
    background: #fff;
}

.customiser-back {
    color: var(--am-primary);
    text-decoration: none;
    font-weight: 600;
}

.customiser-title {
    margin: 0;
    font-size: 20px;
}

.customiser-header-actions {
    display: flex;
    gap: 8px;
}

.customiser-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr) 320px;
    gap: 12px;
    padding: 12px;
}

.customiser-sidebar,
.customiser-canvas-area {
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: 14px;
    box-shadow: var(--am-shadow-sm);
}

.customiser-sidebar {
    padding: 14px;
}

.tool-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 12px;
}

.tool-tab {
    border: 1px solid var(--am-border);
    background: #f7f9ff;
    border-radius: 10px;
    padding: 8px;
    font-weight: 600;
}

.tool-tab.active {
    background: #eaf0ff;
    border-color: #cfdcf8;
    color: var(--am-primary);
}

.tool-panel {
    display: none;
}

.tool-panel.active {
    display: block;
}

.upload-drop-zone {
    border: 2px dashed #ccd8ee;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    background: #f9fbff;
}

.upload-hint {
    color: var(--am-muted);
    font-size: 13px;
}

.form-group {
    margin-bottom: 12px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #2c3550;
}

.form-control {
    width: 100%;
    border: 1px solid #cfd9ea;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
}

.form-row {
    display: flex;
    gap: 10px;
}

.half {
    flex: 1;
}

.text-style-buttons {
    display: flex;
    gap: 6px;
}

.customiser-canvas-area {
    padding: 14px;
}

.view-toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.canvas-container {
    min-height: 560px;
    border: 1px solid var(--am-border);
    border-radius: 12px;
    background: linear-gradient(180deg, #f5f7ff, #eff3fb);
    position: relative;
    display: grid;
    place-items: center;
}

.garment-bg img {
    max-width: 90%;
    max-height: 520px;
    object-fit: contain;
}

.canvas-controls {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.size-qty-wrap,
.price-summary {
    border: 1px solid var(--am-border);
    border-radius: 10px;
    padding: 10px;
    background: #fafcff;
    margin-bottom: 12px;
}

.price-summary dl {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    margin: 0;
}

.total-row {
    border-top: 1px solid var(--am-border);
    padding-top: 8px;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Error pages */
.error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.error-container {
    width: min(680px, 100%);
}

.error-content {
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: 20px;
    box-shadow: var(--am-shadow);
    padding: 30px;
    text-align: center;
}

.error-code {
    font-size: clamp(42px, 12vw, 92px);
    line-height: 1;
    color: var(--am-primary);
    font-weight: 700;
}

.error-actions {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 1200px) {
    .category-grid,
    .product-grid,
    .decoration-grid,
    .blog-grid,
    .how-steps,
    .testimonial-slider {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customiser-layout {
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .customiser-sidebar--right {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .main-nav {
        display: none;
    }

    .burger {
        display: inline-flex;
    }

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

    .section-pad {
        padding: 56px 0;
    }

    .customiser-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .category-grid,
    .product-grid,
    .decoration-grid,
    .blog-grid,
    .how-steps,
    .testimonial-slider,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        display: block;
    }

    .footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .customiser-header {
        flex-wrap: wrap;
    }

    .customiser-title {
        width: 100%;
        order: 3;
    }
}