/*
 * Custom Inventory Dashboard
 * Scoped to .grssd so website-wide styles remain unchanged.
 */

/* Dashboard layout and cards. */
.grssd {
    max-width:1100px;
    margin:36px auto;
    padding:0 18px
}
.grssd * {
    box-sizing:border-box
}
.grssd h2 {
    margin:0 0 14px
}
.grssd-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap
}
.grssd .btn,.grssd button {
    display:inline-block;
    border:0;
    border-radius:7px;
    background:#254bc8;
    color:white;
    padding:11px 17px;
    text-decoration:none;
    cursor:pointer;
    font:inherit
}
.grssd .btn.secondary,.grssd button.secondary {
    background:#f1f3f7;
    color:#172233
}
.grssd .filters {
    display:flex;
    gap:15px;
    flex-wrap:wrap;
    margin:18px 0;
    padding:14px;
    border:1px solid #ddd;
    border-radius:8px
}
.grssd .cards {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(235px,1fr));
    gap:18px
}
.grssd .item {
    border:1px solid #ddd;
    border-radius:9px;
    padding:14px;
    background:#fff
}
.grssd .item img {
    width:100%;
    aspect-ratio:4/3;
    object-fit:cover;
    border-radius:6px
}
.grssd .muted {
    color:#666;
    font-size:13px
}
.grssd .actions {
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin-top:12px
}
.grssd .grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:15px
}
.grssd label.field {
    display:block;
    font-weight:600;
    margin:10px 0
}
.grssd input:not([type=checkbox]):not([type=file]),.grssd select,.grssd textarea {
    display:block;
    width:100%;
    border:1px solid #bbb;
    border-radius:5px;
    padding:10px;
    background:white
}
.grssd .panel {
    background:#fff;
    border:1px solid #ddd;
    padding:20px;
    border-radius:10px;
    margin:20px 0
}
.grssd .photo-editor {
    display:none;
    border:1px solid #ddd;
    border-radius:8px;
    padding:15px;
    margin:10px 0
}
.grssd .photo-editor canvas {
    max-width:100%;
    max-height:420px;
    display:block;
    background:#eee;
    margin:12px 0
}
.grssd .photo-editor input[type=range] {
    width:100%
}
.grssd .thumbs {
    display:flex;
    flex-wrap:wrap;
    gap:10px
}
.grssd .thumbs img {
    width:90px;
    height:90px;
    object-fit:cover
}
.grssd .notice {
    padding:12px;
    background:#e8f7ee;
    border-radius:6px;
    margin:14px 0
}

/* Keep the dashboard below the site's fixed/sticky navigation. */
.grssd {
    margin-top: 150px !important;
}

@media (max-width: 767px) {
.grssd {
    margin-top: 25vh !important;
}
}


/* Each lot is a separate section; the card grid stays responsive. */
.grssd .grssd-lot-section {
    margin: 28px 0 38px;
}

.grssd .grssd-lot-heading {
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e9f2;
}

.grssd .grssd-lot-section[hidden] {
    display: none;
}

/* Front-end photo organizer. The arrows also work on touch devices. */
.grssd .grssd-photo-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0;
}
.grssd .grssd-photo {
    width: 155px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: grab;
}
.grssd .grssd-photo img {
    display: block;
    width: 100%;
    height: 105px;
    object-fit: cover;
    border-radius: 5px;
}
.grssd .grssd-position {
    display: block;
    margin: 6px 0;
    font-weight: 600;
    font-size: 12px;
}
.grssd .grssd-photo-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.grssd .grssd-photo-buttons button {
    padding: 6px 9px;
    font-size: 12px;
}
.grssd .grssd-photo-buttons button:disabled {
    opacity: .4;
    cursor: default;
}


/* Shed Manager: clear the site's fixed header without shifting the header itself. */
body.page-id-3019 #main {
    padding-top: 150px !important;
}

@media (max-width: 767px) {
    body.page-id-3019 #main {
        padding-top: 25vh !important;
    }
}

/* Sold shed cards */
.grssd .item.sold {
    background: #fff0f0;
    border: 2px solid #dc3545;
}

.grssd .item.sold .muted {
    color: #b42318;
    font-weight: 600;
}
