/* =========================================================
   ATELIER MAISON
   Complete Style System
   Part 1 of 4 — Foundation, Header, Navigation, Home Layout
   ========================================================= */


/* ==========================
   DESIGN TOKENS
   ========================== */

:root {

    --background: #f4eee5;
    --surface: #fffaf3;
    --surface-soft: #f9f2e8;

    --camel: #b99772;
    --camel-dark: #9e7b59;
    --terracotta: #c28b55;

    --text: #3a3028;
    --text-soft: #89745d;
    --text-light: #fff7eb;

    --border: #e4d5bd;
    --danger: #9b5f52;

    --radius-small: 14px;
    --radius-medium: 20px;
    --radius-large: 28px;

    --bottom-nav-height: 82px;

}


/* ==========================
   RESET
   ========================== */

* {

    box-sizing: border-box;

}


html {

    width: 100%;
    min-height: 100%;

    margin: 0;
    padding: 0;

    background: var(--background);

}


body {

    width: 100%;
    min-height: 100%;

    margin: 0;
    padding: 0;

    background: var(--background);

    color: var(--text);

    font-family:
    "Helvetica Neue",
    Arial,
    sans-serif;

    -webkit-font-smoothing: antialiased;

}


button,
input,
select,
textarea {

    font: inherit;

}


button,
a {

    -webkit-tap-highlight-color: transparent;

}


button {

    cursor: pointer;

}


a {

    color: inherit;
    text-decoration: none;

}


img {

    max-width: 100%;

}


/* ==========================
   APP SHELL
   ========================== */

.app {

    width: 100%;
    max-width: 520px;
    min-height: 100vh;

    margin: 0 auto;

    padding-bottom:
    calc(
        var(--bottom-nav-height)
        + 32px
        + env(safe-area-inset-bottom)
    );

}


/* ==========================
   TYPOGRAPHY
   ========================== */

h1,
h2,
h3,
p {

    margin-top: 0;

}


h1,
h2,
h3 {

    font-family:
    Georgia,
    "Times New Roman",
    serif;

    font-weight: 400;

}


h2 {

    font-size: 25px;
    line-height: 1.2;

}


h3 {

    font-size: 18px;
    line-height: 1.25;

}


p {

    line-height: 1.5;

}


.eyebrow {

    margin: 0 0 7px;

    color: var(--camel-dark);

    font-size: 10px;
    font-weight: 600;

    letter-spacing: 1.6px;

    text-transform: uppercase;

}


/* ==========================
   BRAND HEADER
   ========================== */

header,
.brand-header {

    position: relative;

    margin: 15px;

    padding: 38px 24px 34px;

    overflow: hidden;

    background: var(--terracotta);

    color: var(--text-light);

    text-align: center;

    border-radius: var(--radius-large);

}


header h1,
.brand-header h1 {

    margin: 0;

    color: var(--text-light);

    font-size: 30px;
    line-height: 1.15;

    letter-spacing: 4px;

}


.subtitle {

    margin: 11px 0 0;

    color: #f9ead6;

    font-size: 13px;
    line-height: 1.4;

    letter-spacing: 1px;

    text-align: center;

}


.header-lock-button {

    position: absolute;

    top: 16px;
    right: 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    min-height: 34px;

    padding: 7px 11px;

    background: rgba(255, 247, 235, 0.14);

    color: var(--text-light);

    border:
    1px solid rgba(255, 247, 235, 0.4);

    border-radius: 999px;

    font-size: 11px;

    letter-spacing: 0.5px;

}


.header-lock-button svg,
.header-lock-button i {

    width: 15px;
    height: 15px;

}


/* ==========================
   HOME PAGE
   ========================== */

.home-page {

    padding-bottom: 20px;

}


.feature-card {

    margin: 20px;

    padding: 30px 24px;

    background: var(--camel);

    color: var(--text-light);

    border-radius: var(--radius-large);

    text-align: center;

}


.feature-card .eyebrow {

    color: #f3e3d0;

}


.feature-card h2 {

    margin: 0 0 10px;

    color: var(--text-light);

    font-size: 27px;

}


.feature-card p {

    max-width: 330px;

    margin: 0 auto;

    color: #f8ead8;

    font-size: 14px;

}


.welcome-card,
.welcome-card h2,
.welcome-card p {

    text-align: center;

}


/* ==========================
   DASHBOARD STATS
   ========================== */

.dashboard-stats {

    display: grid;

    grid-template-columns:
    repeat(3, minmax(0, 1fr));

    gap: 10px;

    padding: 0 20px 22px;

}


.stat-card {

    min-width: 0;

    padding: 18px 8px;

    background: var(--surface);

    border:
    1px solid var(--border);

    border-radius: var(--radius-medium);

    text-align: center;

}


.stat-card h3 {

    margin: 0 0 5px;

    color: var(--camel-dark);

    font-size: clamp(17px, 5vw, 22px);

    overflow-wrap: anywhere;

}


.stat-card p {

    margin: 0;

    color: var(--text-soft);

    font-size: 10px;

    letter-spacing: 0.8px;

    text-transform: uppercase;

}


/* ==========================
   HOME SECTIONS
   ========================== */

.home-section {

    padding: 8px 20px 20px;

}


.section-heading {

    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 14px;

    margin-bottom: 13px;

}


.section-heading h2,
.section-title {

    margin: 0;

    color: var(--text);

    font-size: 23px;

}


.section-link {

    flex-shrink: 0;

    padding-bottom: 2px;

    color: var(--camel-dark);

    font-size: 12px;
    font-weight: 600;

    letter-spacing: 0.3px;

}


/* ==========================
   FEATURED HOME ITEM
   ========================== */

.featured-item {

    min-height: 120px;

}


.featured-card {

    display: grid;

    grid-template-columns: 112px minmax(0, 1fr);

    gap: 17px;

    padding: 13px;

    background: var(--surface);

    border:
    1px solid var(--border);

    border-radius: var(--radius-large);

}


.featured-card img {

    width: 112px;
    height: 132px;

    object-fit: cover;

    border-radius: var(--radius-medium);

}


.featured-card-content {

    display: flex;
    flex-direction: column;
    justify-content: center;

    min-width: 0;

}


.featured-card h3 {

    margin: 0 0 7px;

    font-size: 20px;

}


.featured-card p {

    margin: 2px 0;

    color: var(--text-soft);

    font-size: 12px;

}


.featured-card-link {

    display: inline-flex;

    align-items: center;

    width: fit-content;

    margin-top: 11px;

    color: var(--camel-dark);

    font-size: 12px;
    font-weight: 600;

}


/* ==========================
   RECENT ITEMS
   ========================== */

.recent-grid {

    display: grid;

    grid-template-columns:
    repeat(2, minmax(0, 1fr));

    gap: 14px;

}


.recent-grid .piece-card {

    padding: 10px;

}


.recent-grid .piece-card h3 {

    margin-bottom: 4px;

}


/* ==========================
   FLOATING ADD BUTTON
   ========================== */

.floating-add {

    position: fixed;

    right:
    max(
        20px,
        calc((100vw - 520px) / 2 + 20px)
    );

    bottom:
    calc(
        var(--bottom-nav-height)
        + 17px
        + env(safe-area-inset-bottom)
    );

    z-index: 50;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 58px;
    height: 58px;

    background: var(--camel);

    color: var(--text-light);

    border:
    1px solid rgba(255, 255, 255, 0.3);

    border-radius: 50%;

}


.floating-add svg,
.floating-add i {

    width: 27px;
    height: 27px;

}


/* ==========================
   BOTTOM NAVIGATION
   ========================== */

.bottom-nav {

    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 40;

    display: flex;

    align-items: stretch;
    justify-content: space-around;

    height:
    calc(
        var(--bottom-nav-height)
        + env(safe-area-inset-bottom)
    );

    padding-bottom:
    env(safe-area-inset-bottom);

    background: var(--surface);

    border-top:
    1px solid var(--border);

}


.bottom-nav a {

    display: flex;

    flex: 1;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    min-width: 0;

    gap: 5px;

    padding: 7px 2px;

    color: var(--text-soft);

    font-size: 10px;

    text-align: center;

}


.bottom-nav a.active {

    color: var(--camel-dark);

}


.bottom-nav svg,
.bottom-nav i {

    width: 21px;
    height: 21px;

}


.bottom-nav span {

    display: block;

    max-width: 100%;

    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;

}


/* ==========================
   SMALL SCREEN TWEAKS
   ========================== */

@media (max-width: 390px) {

    header,
    .brand-header {

        margin: 11px;

        padding:
        35px 18px
        31px;

    }


    header h1,
    .brand-header h1 {

        font-size: 27px;

        letter-spacing: 3px;

    }


    .header-lock-button {

        top: 12px;
        right: 12px;

    }


    .feature-card {

        margin:
        17px 14px;

        padding:
        27px 18px;

    }


    .dashboard-stats {

        gap: 7px;

        padding:
        0 14px 20px;

    }


    .stat-card {

        padding:
        15px 5px;

    }


    .stat-card p {

        font-size: 9px;

        letter-spacing: 0.5px;

    }


    .home-section {

        padding:
        7px 14px 18px;

    }


    .featured-card {

        grid-template-columns:
        95px minmax(0, 1fr);

        gap: 13px;

    }


    .featured-card img {

        width: 95px;
        height: 118px;

    }


    .floating-add {

        right: 15px;

        width: 54px;
        height: 54px;

    }

}/* =========================================================
   PART 2 OF 4
   COLLECTION, CARDS, FILTERS, DETAIL PAGE, ACTIONS
   ========================================================= */


/* ==========================
   COLLECTION PAGE INTRO
   ========================== */

.collection-intro {

    margin: 20px;

    padding: 24px 20px;

    background: var(--surface);

    border:
    1px solid var(--border);

    border-radius: var(--radius-large);

    text-align: center;

}


.collection-intro h2 {

    margin: 0 0 8px;

    font-size: 25px;

}


.collection-intro p {

    margin: 0;

    color: var(--text-soft);

    font-size: 14px;

}


/* ==========================
   FILTERS + SORTING
   ========================== */

.collection-controls,
.closet-controls {

    display: grid;

    grid-template-columns:
    repeat(2, minmax(0, 1fr));

    gap: 10px;

    padding:
    0 20px 18px;

}


.collection-controls select,
.closet-controls select {

    width: 100%;

    min-width: 0;

    padding:
    12px 14px;

    background: var(--surface);

    color: var(--text);

    border:
    1px solid var(--border);

    border-radius: 999px;

    font-size: 13px;

    outline: none;

}


.collection-controls select:focus,
.closet-controls select:focus {

    border-color: var(--camel);

}


/* ==========================
   MAIN ITEM GRID
   ========================== */

.closet-grid,
.signature-grid,
.favorite-grid {

    display: grid;

    grid-template-columns:
    repeat(2, minmax(0, 1fr));

    gap: 15px;

    padding:
    0 20px 24px;

}


/* ==========================
   ITEM CARDS
   ========================== */

.piece-card {

    min-width: 0;

    padding: 11px;

    overflow: hidden;

    background: var(--surface);

    border:
    1px solid var(--border);

    border-radius: var(--radius-medium);

    text-align: left;

}


.piece-card img,
.piece-image {

    display: block;

    width: 100%;
    height: 210px;

    object-fit: cover;

    border-radius: 16px;

}


.piece-card h3 {

    margin:
    12px 0 5px;

    color: var(--text);

    font-size: 17px;

    overflow-wrap: anywhere;

}


.piece-card p {

    margin:
    3px 0;

    color: var(--text-soft);

    font-size: 12px;

}


.item-tag {

    display: inline-flex;

    align-items: center;

    max-width: 100%;

    margin-bottom: 4px;

    padding:
    5px 8px;

    background: var(--surface-soft);

    color: var(--camel-dark);

    border:
    1px solid var(--border);

    border-radius: 999px;

    font-size: 10px;
    font-weight: 600;

    letter-spacing: 0.5px;

    text-transform: uppercase;

    overflow-wrap: anywhere;

}


.item-location {

    margin-top: 6px !important;

    color: var(--text-soft);

}


.item-price {

    margin-top: 8px !important;

    color: var(--camel-dark) !important;

    font-weight: 600;

}


.signature-label {

    display: inline-block;

    margin-top: 8px !important;

    padding:
    5px 8px;

    background: var(--camel);

    color: var(--text-light) !important;

    border-radius: 999px;

    font-size: 10px !important;

    letter-spacing: 0.6px;

    text-transform: uppercase;

}


/* ==========================
   COLLECTION EDIT CARDS
   ========================== */

.collection-grid {

    padding:
    0 20px 24px;

}


.collection-card {

    display: block;

    margin-bottom: 14px;

    padding:
    27px 23px;

    background: var(--camel);

    color: var(--text-light);

    border-radius: var(--radius-large);

    text-align: center;

}


.collection-card h2 {

    margin:
    0 0 8px;

    color: var(--text-light);

    font-size: 23px;

}


.collection-card p {

    margin: 0;

    color: #f8ead8;

    font-size: 13px;

}


/* ==========================
   ITEM DETAIL PAGE
   ========================== */

.piece-detail,
.detail-page,
.item-detail,
.product-detail {

    padding:
    5px 20px 30px;

    text-align: center;

}


.detail-image {

    display: block;

    width: 100%;
    max-width: 430px;

    max-height: 500px;

    margin:
    0 auto 22px;

    object-fit: cover;

    border-radius: var(--radius-large);

}


.piece-detail h2,
.detail-page h2,
.item-detail h2 {

    margin:
    0 0 10px;

    font-size: 28px;

}


.piece-detail > p,
.detail-page > p,
.item-detail > p {

    margin:
    4px 0;

    color: var(--text-soft);

    font-size: 14px;

}


/* ==========================
   ACTION BUTTON GROUPS
   ========================== */

.piece-actions {

    display: grid;

    grid-template-columns:
    repeat(2, minmax(0, 1fr));

    gap: 10px;

    margin-top: 25px;

}


.primary-button,
.secondary-button {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    min-height: 46px;

    padding:
    12px 18px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 600;

    letter-spacing: 0.7px;

    text-align: center;

    text-transform: uppercase;

}


.primary-button {

    background: var(--camel);

    color: var(--text-light);

    border:
    1px solid var(--camel);

}


.secondary-button {

    background: transparent;

    color: var(--camel-dark);

    border:
    1px solid var(--camel);

}


.primary-button svg,
.primary-button i,
.secondary-button svg,
.secondary-button i {

    width: 17px;
    height: 17px;

    flex-shrink: 0;

}


.piece-actions .primary-button,
.piece-actions .secondary-button {

    width: 100%;

}


.piece-actions .secondary-button {

    grid-column:
    1 / -1;

}


/* ==========================
   COLLECTION MENU
   ========================== */

#collection-menu {

    display: grid;

    gap: 9px;

    margin-top: 20px;

}


#collection-menu button {

    width: 100%;

    min-height: 44px;

    padding:
    11px 15px;

    background: var(--surface);

    color: var(--camel-dark);

    border:
    1px solid var(--border);

    border-radius: 999px;

    font-size: 13px;

}


/* ==========================
   EMPTY STATES
   ========================== */

.empty-state {

    grid-column:
    1 / -1;

    margin:
    10px 0;

    padding:
    34px 22px;

    background: var(--surface);

    border:
    1px solid var(--border);

    border-radius: var(--radius-large);

    text-align: center;

}


.empty-state h2 {

    margin:
    0 0 9px;

    font-size: 23px;

}


.empty-state p {

    margin: 0;

    color: var(--text-soft);

    font-size: 14px;

}


/* ==========================
   BAG SUMMARY
   ========================== */

.bag-summary {

    margin:
    0 20px 24px;

    padding:
    28px 22px;

    background: var(--surface);

    border:
    1px solid var(--border);

    border-radius: var(--radius-large);

    text-align: center;

}


.bag-summary h2 {

    margin:
    4px 0 10px;

    color: var(--text);

}


.bag-summary .primary-button {

    width: 100%;

    margin-top: 12px;

}


/* ==========================
   SMALL SCREEN TWEAKS
   ========================== */

@media (max-width: 390px) {

    .collection-intro {

        margin:
        17px 14px;

    }


    .collection-controls,
    .closet-controls {

        gap: 8px;

        padding:
        0 14px 16px;

    }


    .collection-controls select,
    .closet-controls select {

        padding:
        11px 10px;

        font-size: 12px;

    }


    .closet-grid,
    .signature-grid,
    .favorite-grid {

        gap: 11px;

        padding:
        0 14px 20px;

    }


    .piece-card {

        padding: 9px;

    }


    .piece-card img,
    .piece-image {

        height: 165px;

    }


    .piece-card h3 {

        font-size: 15px;

    }


    .piece-actions {

        grid-template-columns:
        1fr;

    }


    .piece-actions .secondary-button {

        grid-column: auto;

    }


    .piece-detail,
    .detail-page,
    .item-detail,
    .product-detail {

        padding:
        4px 14px 28px;

    }


    .collection-grid {

        padding:
        0 14px 22px;

    }


    .bag-summary {

        margin:
        0 14px 22px;

    }

}/* =========================================================
   PART 3 OF 4
   FORMS, LOCK SCREEN, ORDER CONFIRMATION, UTILITIES
   ========================================================= */


/* ==========================
   ADD + EDIT PAGE LAYOUT
   ========================== */

.add-piece-page {

    padding:
    4px 20px 28px;

}


.form-card {

    width: 100%;

    margin: 0 auto;

    padding:
    28px 24px;

    background: var(--surface);

    border:
    1px solid var(--border);

    border-radius: var(--radius-large);

}


.arrival-intro {

    margin-bottom: 24px;

    text-align: center;

}


.arrival-intro h2 {

    margin:
    0 0 8px;

    font-size: 25px;

}


.arrival-intro p {

    max-width: 340px;

    margin: 0 auto;

    color: var(--text-soft);

    font-size: 14px;

}


/* ==========================
   FORM LABELS + FIELDS
   ========================== */

.form-card label {

    display: block;

    margin:
    18px 0 7px;

    color: var(--text);

    font-size: 12px;
    font-weight: 600;

    letter-spacing: 0.7px;

    text-align: left;

    text-transform: uppercase;

}


.form-card input,
.form-card select,
.form-card textarea {

    display: block;

    width: 100%;
    min-height: 48px;

    padding:
    13px 15px;

    background: #ffffff;

    color: var(--text);

    border:
    1px solid var(--border);

    border-radius: var(--radius-small);

    font-size: 14px;

    outline: none;

}


.form-card textarea {

    min-height: 110px;

    resize: vertical;

}


.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {

    border-color: var(--camel);

}


.form-card input::placeholder,
.form-card textarea::placeholder {

    color: #b4a18e;

}


/* ==========================
   FILE INPUT
   ========================== */

.form-card input[type="file"] {

    min-height: auto;

    padding: 10px;

    background: var(--surface-soft);

    color: var(--text-soft);

    font-size: 12px;

}


.form-card input[type="file"]::file-selector-button {

    margin-right: 10px;

    padding:
    9px 13px;

    background: var(--camel);

    color: var(--text-light);

    border: 0;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 0.4px;

    text-transform: uppercase;

}


/* ==========================
   PRICE INPUT
   ========================== */

.price-input {

    display: flex;

    align-items: center;

    min-height: 48px;

    overflow: hidden;

    background: #ffffff;

    border:
    1px solid var(--border);

    border-radius: var(--radius-small);

}


.price-input:focus-within {

    border-color: var(--camel);

}


.price-input span {

    flex-shrink: 0;

    padding-left: 15px;

    color: var(--camel-dark);

    font-size: 16px;
    font-weight: 600;

}


.price-input input {

    min-height: 46px;

    border: 0;

    border-radius: 0;

}


.price-input input:focus {

    border: 0;

}


/* ==========================
   IMAGE PREVIEW
   ========================== */

.preview-container {

    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;

    margin:
    20px 0 4px;

}


.image-preview {

    display: block;

    width: 100%;
    max-width: 340px;
    height: 340px;

    object-fit: cover;

    background: var(--surface-soft);

    border:
    1px solid var(--border);

    border-radius: var(--radius-large);

}


.arrival-button {

    width: 100%;

    margin-top: 26px;

}


/* ==========================
   LOCK SCREEN
   ========================== */

.lock-page {

    display: flex;

    flex-direction: column;

    justify-content: center;

    min-height: 100vh;

    padding:
    20px 0;

}


.lock-page .app {

    min-height: auto;

    padding-bottom: 20px;

}


.lock-card {

    margin: 20px;

    padding:
    32px 24px;

    background: var(--surface);

    border:
    1px solid var(--border);

    border-radius: var(--radius-large);

    text-align: center;

}


.lock-card h2 {

    margin:
    0 0 8px;

    font-size: 26px;

}


.lock-card > p {

    margin:
    0 0 22px;

    color: var(--text-soft);

    font-size: 14px;

}


.lock-card input {

    width: 100%;
    min-height: 48px;

    padding:
    13px 15px;

    background: #ffffff;

    color: var(--text);

    border:
    1px solid var(--border);

    border-radius: var(--radius-small);

    outline: none;

}


.lock-card input:focus {

    border-color: var(--camel);

}


.lock-card .primary-button {

    width: 100%;

    margin-top: 14px;

}


#login-error {

    min-height: 20px;

    margin:
    14px 0 0;

    color: var(--danger);

    font-size: 12px;

}


/* ==========================
   ORDER CONFIRMATION
   ========================== */

.order-card {

    margin:
    20px;

    padding:
    32px 24px;

    background: var(--surface);

    border:
    1px solid var(--border);

    border-radius: var(--radius-large);

    text-align: center;

}


.order-card h2 {

    margin:
    0 0 11px;

    color: var(--camel-dark);

    font-size: 27px;

}


.order-card h3 {

    margin:
    25px 0 6px;

    color: var(--text);

    font-family:
    "Helvetica Neue",
    Arial,
    sans-serif;

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 1px;

    text-transform: uppercase;

}


.order-card p {

    margin:
    4px 0;

    color: var(--text-soft);

    font-size: 14px;

}


.order-card hr {

    height: 1px;

    margin:
    24px 0;

    background: var(--border);

    border: 0;

}


.order-card .primary-button {

    width: 100%;

    margin-top: 24px;

}


/* ==========================
   GENERAL PAGE SECTIONS
   ========================== */

.page-section {

    padding:
    0 20px 24px;

}


.page-card {

    padding:
    24px 20px;

    background: var(--surface);

    border:
    1px solid var(--border);

    border-radius: var(--radius-large);

}


.centered {

    text-align: center;

}


.muted {

    color: var(--text-soft);

}


.hidden {

    display: none !important;

}


/* ==========================
   DIVIDERS
   ========================== */

.divider {

    width: 100%;
    height: 1px;

    margin:
    22px 0;

    background: var(--border);

}


/* ==========================
   STATUS + BADGES
   ========================== */

.status-badge {

    display: inline-flex;

    align-items: center;

    padding:
    6px 9px;

    background: var(--surface-soft);

    color: var(--camel-dark);

    border:
    1px solid var(--border);

    border-radius: 999px;

    font-size: 10px;
    font-weight: 600;

    letter-spacing: 0.7px;

    text-transform: uppercase;

}


/* ==========================
   DANGER ACTIONS
   ========================== */

.danger-button {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 46px;

    padding:
    12px 18px;

    background: transparent;

    color: var(--danger);

    border:
    1px solid var(--danger);

    border-radius: 999px;

    font-size: 12px;
    font-weight: 600;

    letter-spacing: 0.7px;

    text-transform: uppercase;

}


/* ==========================
   ACCESSIBILITY
   ========================== */

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {

    outline:
    2px solid var(--camel-dark);

    outline-offset: 3px;

}


/* ==========================
   SMALL SCREEN TWEAKS
   ========================== */

@media (max-width: 390px) {

    .add-piece-page {

        padding:
        3px 14px 25px;

    }


    .form-card {

        padding:
        24px 18px;

    }


    .image-preview {

        height: 285px;

    }


    .lock-card,
    .order-card {

        margin:
        16px 14px;

        padding:
        28px 19px;

    }


    .page-section {

        padding:
        0 14px 22px;

    }

}/* =========================================================
   PART 4 OF 4
   LEGACY COMPATIBILITY, RESPONSIVE BEHAVIOR, FINAL SAFEGUARDS
   ========================================================= */


/* ==========================
   LEGACY HOME MENU SUPPORT
   ========================== */

.menu-grid {

    display: grid;

    grid-template-columns:
    repeat(2, minmax(0, 1fr));

    gap: 15px;

    padding:
    0 20px 24px;

}


.menu-grid > a {

    display: block;

    min-width: 0;

}


.menu-card {

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    min-height: 165px;

    padding: 20px;

    background: var(--camel);

    color: var(--text-light);

    border-radius: var(--radius-large);

    text-align: center;

}


.menu-card svg,
.menu-card i {

    width: 31px;
    height: 31px;

    margin-bottom: 12px;

}


.menu-card h3 {

    margin:
    0 0 7px;

    color: var(--text-light);

    font-size: 19px;

}


.menu-card p {

    margin: 0;

    color: #f8ead8;

    font-size: 12px;

}


/* ==========================
   LEGACY HOME ACTIONS
   ========================== */

.home-actions {

    display: grid;

    gap: 11px;

    padding:
    0 20px 22px;

}


.home-actions .primary-button,
.home-actions .secondary-button {

    width: 100%;

}


/* ==========================
   LEGACY FEATURE / WELCOME
   ========================== */

.welcome,
.welcome-message,
.home-intro,
.intro {

    width: 100%;

    text-align: center;

}


.welcome h1,
.welcome h2,
.welcome p,
.welcome-message h1,
.welcome-message h2,
.welcome-message p,
.home-intro h1,
.home-intro h2,
.home-intro p,
.intro h1,
.intro h2,
.intro p {

    text-align: center;

}


/* ==========================
   LEGACY GRID ALIASES
   ========================== */

#recent-items,
#recent-pieces,
#collection-items,
#signature-grid,
#bag-items,
#closet-grid {

    min-width: 0;

}


#recent-items:empty,
#recent-pieces:empty,
#featured-item:empty {

    display: none;

}


/* ==========================
   LEGACY FORM SUPPORT
   ========================== */

#edit-piece-form {

    text-align: left;

}


#edit-piece-form h2,
#edit-piece-form > p {

    text-align: center;

}


#edit-piece-form label {

    display: block;

    margin:
    18px 0 7px;

    color: var(--text);

    font-size: 12px;
    font-weight: 600;

    letter-spacing: 0.7px;

    text-transform: uppercase;

}


#edit-piece-form input,
#edit-piece-form select,
#edit-piece-form textarea {

    width: 100%;
    min-height: 48px;

    padding:
    13px 15px;

    background: #ffffff;

    color: var(--text);

    border:
    1px solid var(--border);

    border-radius: var(--radius-small);

    outline: none;

}


/* ==========================
   LEGACY NAVIGATION WRAPPERS
   ========================== */

.bottom-nav a > div {

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 5px;

    width: 100%;

}


/* ==========================
   ICON SAFEGUARDS
   ========================== */

svg {

    flex-shrink: 0;

}


button svg,
a svg {

    pointer-events: none;

}


/* ==========================
   IMAGE FALLBACKS
   ========================== */

.piece-card img[src=""],
.detail-image[src=""],
.image-preview[src=""] {

    display: none;

}


.piece-card img {

    background: var(--surface-soft);

}


/* ==========================
   TEXT OVERFLOW SAFEGUARDS
   ========================== */

.piece-card,
.featured-card-content,
.stat-card,
.collection-card,
.form-card,
.order-card,
.lock-card {

    overflow-wrap: anywhere;

}


.item-tag,
.bottom-nav span {

    word-break: normal;

}


/* ==========================
   TABLET / DESKTOP
   ========================== */

@media (min-width: 700px) {

    body {

        padding:
        24px 0;

    }


    .app {

        overflow: hidden;

        background: var(--background);

        border:
        1px solid var(--border);

        border-radius:
        34px;

    }


    header,
    .brand-header {

        margin:
        20px;

    }


    .bottom-nav {

        left: 50%;

        width: 520px;

        transform:
        translateX(-50%);

        border-left:
        1px solid var(--border);

        border-right:
        1px solid var(--border);

    }


    .floating-add {

        right:
        calc(
            (100vw - 520px) / 2
            + 20px
        );

    }

}


/* ==========================
   VERY SMALL PHONES
   ========================== */

@media (max-width: 340px) {

    .dashboard-stats {

        grid-template-columns:
        1fr;

    }


    .collection-controls,
    .closet-controls {

        grid-template-columns:
        1fr;

    }


    .closet-grid,
    .signature-grid,
    .favorite-grid,
    .recent-grid,
    .menu-grid {

        grid-template-columns:
        1fr;

    }


    .piece-card img,
    .piece-image {

        height: 250px;

    }


    .header-lock-button span {

        display: none;

    }


    .header-lock-button {

        width: 34px;

        padding:
        7px;

    }

}


/* ==========================
   REDUCED MOTION
   ========================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        scroll-behavior: auto !important;

        transition: none !important;
        animation: none !important;

    }

}


/* ==========================
   PRINT
   ========================== */

@media print {

    .bottom-nav,
    .floating-add,
    .header-lock-button {

        display: none !important;

    }


    body,
    .app {

        background: white;

    }


    .app {

        max-width: none;

        padding-bottom: 0;

    }

}/* ==========================
   MAISON SEARCH BAR
   ========================== */

.collection-search {

    padding:
    0 20px 12px;

}


.search-field {

    display:flex;

    align-items:center;

    gap:10px;

    width:100%;

    min-height:48px;

    padding:
    0 16px;

    background:var(--surface);

    border:
    1px solid var(--border);

    border-radius:999px;

}


.search-field:focus-within {

    border-color:var(--camel);

}


.search-field svg,
.search-field i {

    width:18px;
    height:18px;

    flex-shrink:0;

    color:var(--camel-dark);

}


.search-field input {

    width:100%;
    min-width:0;

    padding:
    13px 0;

    background:transparent;

    color:var(--text);

    border:0;

    outline:0;

    font-size:14px;

}


.search-field input::placeholder {

    color:#a8927d;

}


@media(max-width:390px){

    .collection-search {

        padding:
        0 14px 11px;

    }

}/* =========================================================
   ATELIER MAISON SLIDE-OUT MENU
   ========================================================= */


/* Header menu button */

.header-menu-button {

    position: absolute;

    top: 16px;
    right: 16px;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    padding: 0;

    background: rgba(255, 247, 235, 0.14);

    color: var(--text-light);

    border:
    1px solid rgba(255, 247, 235, 0.42);

    border-radius: 50%;

}


.header-menu-button svg {

    width: 19px;
    height: 19px;

}


/* Darkened background behind menu */

.menu-overlay {

    position: fixed;

    inset: 0;

    z-index: 80;

    visibility: hidden;

    background: rgba(42, 32, 25, 0.38);

    opacity: 0;

    transition:
    opacity 180ms ease,
    visibility 180ms ease;

}


.menu-overlay.open {

    visibility: visible;

    opacity: 1;

}


/* Slide-out menu */

.maison-menu {

    position: fixed;

    top: 0;
    right: 0;
    bottom: 0;

    z-index: 90;

    display: flex;

    flex-direction: column;

    width: min(88%, 390px);

    padding:
    24px 22px
    calc(25px + env(safe-area-inset-bottom));

    overflow-y: auto;

    background: var(--surface);

    border-left:
    1px solid var(--border);

    transform:
    translateX(105%);

    transition:
    transform 220ms ease;

}


.maison-menu.open {

    transform:
    translateX(0);

}


/* Menu heading */

.maison-menu-header {

    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 18px;

    padding:
    7px 2px 22px;

    border-bottom:
    1px solid var(--border);

}


.maison-menu-header h2 {

    margin: 0;

    color: var(--text);

    font-size: 27px;

}


.menu-close-button {

    display: flex;

    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    padding: 0;

    background: var(--surface-soft);

    color: var(--camel-dark);

    border:
    1px solid var(--border);

    border-radius: 50%;

}


.menu-close-button svg {

    width: 19px;
    height: 19px;

}


/* Navigation links */

.maison-menu-links {

    display: flex;

    flex-direction: column;

    gap: 4px;

    padding:
    18px 0;

}


.maison-menu-links a,
.maison-menu-links button {

    display: flex;

    align-items: center;

    gap: 14px;

    width: 100%;
    min-height: 52px;

    padding:
    12px 13px;

    background: transparent;

    color: var(--text);

    border: 0;

    border-radius: var(--radius-small);

    font-size: 14px;

    letter-spacing: 0.15px;

    text-align: left;

    text-transform: none;

}


.maison-menu-links a:hover,
.maison-menu-links button:hover {

    background: var(--surface-soft);

}


.maison-menu-links svg {

    width: 20px;
    height: 20px;

    color: var(--camel-dark);

}


.menu-divider {

    height: 1px;

    margin:
    12px 0;

    background: var(--border);

}


/* Menu footer */

.maison-menu-footer {

    margin-top: auto;

    padding:
    20px 5px 3px;

    border-top:
    1px solid var(--border);

}


.maison-menu-footer p {

    margin: 0;

    color: var(--text-soft);

    font-size: 11px;
    line-height: 1.6;

}


/* Prevent background scrolling */

body.menu-open {

    overflow: hidden;

}


/* Smaller phones */

@media (max-width: 390px) {

    .header-menu-button {

        top: 12px;
        right: 12px;

        width: 35px;
        height: 35px;

    }


    .maison-menu {

        width: 91%;

        padding:
        20px 18px
        calc(22px + env(safe-area-inset-bottom));

    }

}/* =========================================================
   COLLECTION TOGGLE BUTTONS
   ========================================================= */

#collection-menu {

    margin-top: 24px;

    padding: 22px;

    background: var(--surface);

    border:
    1px solid var(--border);

    border-radius: var(--radius-large);

    text-align: left;

}


#collection-menu h3 {

    margin:
    0 0 6px;

}


#collection-menu > .muted {

    margin:
    0 0 16px;

    font-size: 13px;

}


.collection-toggle-button {

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    width: 100%;
    min-height: 48px;

    margin-top: 9px;

    padding:
    11px 14px;

    background: var(--surface-soft);

    color: var(--text);

    border:
    1px solid var(--border);

    border-radius: var(--radius-small);

    text-align: left;

    cursor: pointer;

}


.collection-toggle-button.selected {

    background: var(--camel);

    color: var(--text-light);

    border-color: var(--camel);

}


.collection-toggle-button svg {

    width: 18px;
    height: 18px;

    flex-shrink: 0;

}


/* =========================================================
   REMOVE ITEM FROM COLLECTION
   ========================================================= */

.collection-piece-card {

    overflow: hidden;

}


.collection-card-main {

    cursor: pointer;

}


.remove-from-collection-button {

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    width: 100%;

    margin-top: 14px;

    padding:
    11px 14px;

    background: transparent;

    color: var(--camel-dark);

    border:
    1px solid var(--border);

    border-radius: var(--radius-small);

    font-size: 12px;
    font-weight: 600;

    letter-spacing: 0.35px;

    text-transform: uppercase;

}


.remove-from-collection-button:hover,
.remove-from-collection-button:focus-visible {

    background: var(--surface-soft);

}


.remove-from-collection-button svg {

    width: 16px;
    height: 16px;

    flex-shrink: 0;

}


/* =========================================================
   BRAND MEMORY + FASHION OUTFIT GENERATOR
   ========================================================= */

.item-brand {
    color: var(--camel-dark) !important;
    font-weight: 600;
}

.outfit-home-card {
    display: grid;
    gap: 18px;
    margin: 0 20px 22px;
    padding: 25px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    text-align: left;
}

.outfit-home-card h2 {
    margin: 0 0 8px;
}

.outfit-home-card p:not(.eyebrow) {
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
}

.outfit-home-card .primary-button {
    width: 100%;
}

.outfit-generator-actions {
    padding: 0 20px 18px;
}

.outfit-generator-actions .primary-button {
    width: 100%;
}

.outfit-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0 20px 28px;
}

.outfit-piece-card {
    min-width: 0;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    cursor: pointer;
}

.outfit-piece-card img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 15px;
}

.outfit-piece-card h3 {
    margin: 11px 0 5px;
    font-size: 17px;
    overflow-wrap: anywhere;
}

.outfit-piece-card p {
    margin: 3px 0;
    color: var(--text-soft);
    font-size: 12px;
}

.outfit-piece-card .eyebrow {
    margin-bottom: 8px;
    color: var(--camel-dark);
}

@media (max-width: 390px) {
    .outfit-home-card {
        margin: 0 14px 20px;
    }

    .outfit-generator-actions,
    .outfit-results {
        padding-left: 14px;
        padding-right: 14px;
    }

    .outfit-results {
        gap: 11px;
    }

    .outfit-piece-card img {
        height: 155px;
    }
}
