/* =============================================================================
   Flamenet Shopping — Frontend Styles
   Design system: #003399 blue, #CC0000 red, #FFCC00 yellow, Arial 11px
   ============================================================================= */

/* ── Wrapper & Layout ─────────────────────────────────────────────────────── */

.ash-wrap {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    color: #000;
}

/* ── Flash Messages ───────────────────────────────────────────────────────── */

.ash-flash {
    padding: 5px 8px;
    margin-bottom: 10px;
    border: 1px solid;
    font-size: 11px;
}
.ash-flash-success {
    background: #e6f4ea;
    border-color: #4caf50;
    color: #2e7d32;
}
.ash-flash-error {
    background: #fdecea;
    border-color: #CC0000;
    color: #CC0000;
}
.ash-flash-info {
    background: #EEF2FF;
    border-color: #003399;
    color: #003399;
}

/* ── Toolbar ──────────────────────────────────────────────────────────────── */

.ash-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    border-bottom: 2px solid #003399;
    padding-bottom: 6px;
}

.ash-search-form {
    display: flex;
    gap: 2px;
    flex: 1;
    min-width: 180px;
}
.ash-search-form input[type="text"] {
    flex: 1;
    padding: 2px 5px;
    border: 1px solid #7F9DB9;
    font-size: 11px;
    font-family: Arial, Helvetica, sans-serif;
}
.ash-search-form select {
    padding: 2px 4px;
    border: 1px solid #7F9DB9;
    font-size: 11px;
    font-family: Arial, Helvetica, sans-serif;
}

/* Toolbar nav links rendered as tab-style buttons */
.ash-toolbar-links {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-wrap: wrap;
}
.ash-toolbar-links a {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-family: Arial, Helvetica, sans-serif;
    color: #003399;
    text-decoration: none;
    background: #EEF2FF;
    border: 1px solid #AABBD4;
}
.ash-toolbar-links a:hover {
    background: #003399;
    color: #fff;
    border-color: #003399;
}
.ash-toolbar-links a:visited {
    color: #003399;
}
.ash-toolbar-links a.ash-active {
    background: #003399;
    color: #fff;
    border-color: #003399;
    font-weight: bold;
}

/* ── Section Headers ──────────────────────────────────────────────────────── */

.ash-section-header {
    background: #003399;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    padding: 3px 8px;
    margin: 0 0 8px 0;
}

/* ── Product Grid ─────────────────────────────────────────────────────────── */

.ash-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.ash-product-card {
    border: 1px solid #7F9DB9;
    background: #fff;
    display: flex;
    flex-direction: column;
}
.ash-product-card-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #7F9DB9;
}
.ash-product-card-img-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: #EEF2FF;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 10px;
    border-bottom: 1px solid #7F9DB9;
}
.ash-product-card-body {
    padding: 5px 7px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.ash-product-card-title {
    font-weight: bold;
    font-size: 11px;
    color: #0000CC;
    text-decoration: none;
    line-height: 1.3;
}
.ash-product-card-title:hover {
    text-decoration: underline;
    color: #CC0000;
}
.ash-product-card-title:visited {
    color: #ffffff;
}
.ash-product-card-store {
    font-size: 10px;
    color: #666;
}
.ash-product-card-store a {
    color: #0000CC;
    text-decoration: none;
}
.ash-product-card-store a:hover {
    text-decoration: underline;
    color: #CC0000;
}
.ash-product-card-price {
    font-weight: bold;
    color: #CC0000;
    font-size: 12px;
    margin-top: auto;
}
.ash-product-card-footer {
    padding: 4px 7px 7px;
}
.ash-product-card-footer form {
    display: flex;
    gap: 3px;
    align-items: center;
}
.ash-product-card-footer input[type="number"] {
    width: 38px;
    padding: 1px 3px;
    border: 1px solid #7F9DB9;
    font-size: 11px;
    text-align: center;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.ash-btn {
    display: inline-block;
    padding: 2px 10px;
    background: #003399;
    color: #fff;
    font-size: 11px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    border: 1px solid #002277;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.6;
}
.ash-btn:hover {
    background: #CC0000;
    border-color: #990000;
    color: #fff;
}
.ash-btn:visited {
    color: #fff;
}
.ash-btn-sm {
    padding: 1px 7px;
    font-size: 10px;
}
.ash-btn-red {
    background: #CC0000;
    border-color: #990000;
}
.ash-btn-red:hover {
    background: #990000;
    border-color: #660000;
}
.ash-btn-sec {
    background: #fff;
    color: #003399;
    border: 1px solid #003399;
}
.ash-btn-sec:hover {
    background: #003399;
    color: #fff;
    border-color: #003399;
}
.ash-btn-sec:visited {
    color: #003399;
}
.ash-btn-yellow {
    background: #FFCC00;
    color: #000;
    border-color: #ccaa00;
}
.ash-btn-yellow:hover {
    background: #ccaa00;
    color: #000;
    border-color: #aa8800;
}
.ash-btn-yellow:visited {
    color: #000;
}

.ash-btn-stripe {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background: #635bff;
    color: #fff;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    border: 1px solid #4f46d9;
    cursor: pointer;
    text-decoration: none;
}
.ash-btn-stripe:hover {
    background: #4f46d9;
    border-color: #3d36b3;
    color: #fff;
}
.ash-btn-stripe:visited {
    color: #fff;
}

/* ── Storefront ───────────────────────────────────────────────────────────── */

.ash-store-banner {
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    display: block;
    border: 1px solid #7F9DB9;
    margin-bottom: 8px;
}
.ash-store-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}
.ash-store-header-info {
    flex: 1;
}
.ash-store-name {
    font-size: 16px;
    font-weight: bold;
    color: #003399;
    margin: 0 0 3px 0;
}
.ash-store-desc {
    font-size: 11px;
    color: #666;
    margin: 0;
}

/* ── Product Detail ───────────────────────────────────────────────────────── */

.ash-product-detail {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
}
.ash-product-detail-img {
    flex: 0 0 260px;
}
.ash-product-detail-img img {
    width: 100%;
    border: 1px solid #7F9DB9;
    display: block;
}
.ash-product-detail-info {
    flex: 1;
}
.ash-product-title {
    font-size: 15px;
    font-weight: bold;
    color: #003399;
    margin: 0 0 6px 0;
}
.ash-product-price {
    font-size: 20px;
    font-weight: bold;
    color: #CC0000;
    margin: 0 0 6px 0;
}
.ash-product-stock {
    font-size: 11px;
    color: #666;
    margin: 0 0 6px 0;
}
.ash-product-stock.ash-in-stock {
    color: #006600;
}
.ash-product-stock.ash-out-stock {
    color: #CC0000;
}
.ash-product-desc {
    font-size: 11px;
    line-height: 1.5;
    color: #333;
    margin: 0 0 10px 0;
    border-top: 1px solid #ddd;
    padding-top: 8px;
}
.ash-add-to-cart-form {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 10px;
}
.ash-add-to-cart-form input[type="number"] {
    width: 50px;
    padding: 2px 4px;
    border: 1px solid #7F9DB9;
    font-size: 11px;
    text-align: center;
}
.ash-store-box {
    border: 1px solid #7F9DB9;
    padding: 7px;
    margin-bottom: 10px;
    background: #EEF2FF;
    font-size: 11px;
}
.ash-store-box strong {
    font-size: 12px;
}
.ash-store-box a {
    color: #0000CC;
    text-decoration: none;
}
.ash-store-box a:hover {
    text-decoration: underline;
    color: #CC0000;
}

/* ── Cart ─────────────────────────────────────────────────────────────────── */

.ash-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    font-size: 11px;
}
.ash-cart-table th {
    background: #003399;
    color: #fff;
    padding: 3px 7px;
    text-align: left;
    font-size: 11px;
}
.ash-cart-table td {
    padding: 4px 7px;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
}
.ash-cart-table tr:nth-child(even) td {
    background: #EEF2FF;
}
.ash-cart-table td img {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border: 1px solid #ccc;
    display: block;
}
.ash-cart-table input[type="number"] {
    width: 42px;
    padding: 1px 3px;
    border: 1px solid #7F9DB9;
    font-size: 11px;
    text-align: center;
}
.ash-cart-store-header {
    background: #003399;
    color: #fff;
    font-weight: bold;
    padding: 3px 7px;
    font-size: 11px;
}
.ash-cart-store-header td {
    background: #003399 !important;
    color: #fff;
    padding: 3px 7px;
}
.ash-cart-subtotal {
    text-align: right;
    padding: 3px 7px;
    font-size: 11px;
    color: #666;
    background: #f5f5f5;
    border-top: 1px dotted #ccc;
}
.ash-cart-subtotal td {
    background: #f5f5f5 !important;
}
.ash-cart-total-row td {
    background: #FFCC00 !important;
    color: #000;
    font-weight: bold;
    font-size: 13px;
    padding: 5px 7px;
}
.ash-cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
    gap: 6px;
}
.ash-cart-empty {
    text-align: center;
    padding: 24px;
    color: #666;
    font-size: 11px;
    border: 1px solid #ddd;
    background: #fafafa;
}

/* ── Orders List ──────────────────────────────────────────────────────────── */

.ash-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}
.ash-orders-table th {
    background: #003399;
    color: #fff;
    padding: 3px 7px;
    text-align: left;
}
.ash-orders-table td {
    padding: 4px 7px;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
}
.ash-orders-table tr:nth-child(even) td {
    background: #EEF2FF;
}
.ash-orders-table a {
    color: #0000CC;
    text-decoration: none;
}
.ash-orders-table a:hover {
    text-decoration: underline;
    color: #CC0000;
}
.ash-orders-table a:visited {
    color: #ffffff;
}

/* ── Order Detail ─────────────────────────────────────────────────────────── */

.ash-order-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: 11px;
    border: 1px solid #7F9DB9;
    padding: 7px;
    background: #EEF2FF;
}
.ash-order-meta-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.ash-order-meta-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
}
.ash-order-meta-value {
    font-weight: bold;
    color: #003399;
}

.ash-order-store-section {
    border: 1px solid #7F9DB9;
    margin-bottom: 10px;
}
.ash-order-store-header {
    background: #003399;
    color: #fff;
    padding: 3px 7px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: bold;
}
.ash-order-store-header a {
    color: #FFCC00;
    text-decoration: none;
    font-size: 10px;
    font-weight: normal;
}
.ash-order-store-header a:hover {
    text-decoration: underline;
}
.ash-order-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}
.ash-order-items-table th {
    background: #EEF2FF;
    color: #003399;
    padding: 3px 7px;
    text-align: left;
    font-size: 10px;
    text-transform: uppercase;
    border-bottom: 1px solid #AABBD4;
}
.ash-order-items-table td {
    padding: 4px 7px;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
}
.ash-order-items-table td img {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border: 1px solid #ccc;
}
.ash-order-store-footer {
    padding: 3px 7px;
    background: #f5f5f5;
    text-align: right;
    font-size: 11px;
    border-top: 1px solid #ddd;
}

/* ── Message Thread ───────────────────────────────────────────────────────── */

.ash-message-thread {
    border: 1px solid #7F9DB9;
    margin: 8px 0;
}
.ash-message-thread-header {
    background: #003399;
    color: #fff;
    border-bottom: 1px solid #002277;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: bold;
}
.ash-message-list {
    padding: 7px;
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: #fafafa;
}
.ash-message-bubble {
    max-width: 80%;
    padding: 4px 7px;
    font-size: 11px;
    line-height: 1.4;
}
.ash-message-mine {
    align-self: flex-end;
    background: #003399;
    color: #fff;
    border: 1px solid #002277;
}
.ash-message-theirs {
    align-self: flex-start;
    background: #EEF2FF;
    color: #000;
    border: 1px solid #AABBD4;
}
.ash-message-meta {
    font-size: 9px;
    color: rgba(255,255,255,0.65);
    margin-top: 2px;
}
.ash-message-theirs .ash-message-meta {
    color: #888;
}
.ash-message-form {
    border-top: 1px solid #7F9DB9;
    padding: 5px 7px;
    display: flex;
    gap: 5px;
    align-items: flex-end;
    background: #EEF2FF;
}
.ash-message-form textarea {
    flex: 1;
    padding: 3px 5px;
    border: 1px solid #7F9DB9;
    font-size: 11px;
    font-family: Arial, Helvetica, sans-serif;
    resize: vertical;
    min-height: 38px;
}

/* ── Disputes ─────────────────────────────────────────────────────────────── */

.ash-dispute-box {
    border: 1px solid #CC0000;
    margin-top: 8px;
}
.ash-dispute-box-header {
    background: #CC0000;
    color: #fff;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ash-dispute-reason {
    padding: 5px 7px;
    font-size: 11px;
    background: #fdecea;
    border-bottom: 1px solid #f5c6c6;
    color: #333;
}
.ash-dispute-actions {
    padding: 5px 7px;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    background: #fafafa;
}

/* ── Seller Nav Tabs ──────────────────────────────────────────────────────── */

.ash-seller-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid #003399;
    margin-bottom: 12px;
    padding: 0;
}
.ash-seller-nav a {
    display: block;
    padding: 3px 10px;
    font-size: 11px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: #003399;
    text-decoration: none;
    background: #EEF2FF;
    border: 1px solid #AABBD4;
    border-bottom: none;
    margin-right: 2px;
}
.ash-seller-nav a:hover {
    background: #D0DEFF;
    color: #003399;
    border-color: #003399;
}
.ash-seller-nav a:visited {
    color: #003399;
}
.ash-seller-nav a.ash-active {
    background: #003399;
    color: #fff;
    border-color: #003399;
}

/* ── Seller Stats ─────────────────────────────────────────────────────────── */

.ash-seller-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}
.ash-stat-card {
    border: 1px solid #7F9DB9;
    padding: 8px;
    text-align: center;
    background: #EEF2FF;
}
.ash-stat-number {
    font-size: 20px;
    font-weight: bold;
    color: #003399;
    display: block;
}
.ash-stat-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
}

/* ── Stripe Connect Box ───────────────────────────────────────────────────── */

.ash-connect-box {
    border: 1px solid #7F9DB9;
    padding: 12px;
    margin-bottom: 12px;
    background: #EEF2FF;
}
.ash-connect-box h3 {
    margin: 0 0 6px 0;
    color: #003399;
    font-size: 13px;
}
.ash-connect-box p {
    font-size: 11px;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.5;
}
.ash-connect-status {
    display: inline-block;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
    margin-bottom: 8px;
    border: 1px solid;
}
.ash-connect-status.ash-connected {
    background: #e6f4ea;
    border-color: #4caf50;
    color: #006600;
}
.ash-connect-status.ash-not-connected {
    background: #fdecea;
    border-color: #CC0000;
    color: #CC0000;
}
.ash-connect-status.ash-pending {
    background: #fffbe6;
    border-color: #ccaa00;
    color: #886600;
}

/* ── Status Badges ────────────────────────────────────────────────────────── */

.ash-badge {
    display: inline-block;
    padding: 0 5px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    border: 1px solid;
}
.ash-badge-pending    { background: #f0f0f0; color: #555;     border-color: #AAAAAA; }
.ash-badge-paid       { background: #dbeafe; color: #003399;  border-color: #AABBD4; }
.ash-badge-completed  { background: #e6f4ea; color: #006600;  border-color: #88bb88; }
.ash-badge-refunded   { background: #fffbe6; color: #886600;  border-color: #ccaa00; }
.ash-badge-disputed   { background: #fdecea; color: #CC0000;  border-color: #f5c6c6; }
.ash-badge-active     { background: #e6f4ea; color: #006600;  border-color: #88bb88; }
.ash-badge-draft      { background: #f0f0f0; color: #555;     border-color: #AAAAAA; }
.ash-badge-deleted    { background: #fdecea; color: #CC0000;  border-color: #f5c6c6; }
.ash-badge-suspended  { background: #fffbe6; color: #886600;  border-color: #ccaa00; }
.ash-badge-open       { background: #fdecea; color: #CC0000;  border-color: #f5c6c6; }
.ash-badge-resolved-buyer  { background: #e6f4ea; color: #006600; border-color: #88bb88; }
.ash-badge-resolved-seller { background: #dbeafe; color: #003399; border-color: #AABBD4; }
.ash-badge-closed     { background: #f0f0f0; color: #555;     border-color: #AAAAAA; }

/* ── Product CRUD Table ───────────────────────────────────────────────────── */

.ash-products-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-bottom: 10px;
}
.ash-products-table th {
    background: #003399;
    color: #fff;
    padding: 3px 7px;
    text-align: left;
}
.ash-products-table td {
    padding: 4px 7px;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
}
.ash-products-table tr:nth-child(even) td {
    background: #EEF2FF;
}
.ash-products-table td img {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border: 1px solid #ccc;
}
.ash-products-table .ash-row-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* ── Forms ────────────────────────────────────────────────────────────────── */

.ash-form {
    max-width: 540px;
}
.ash-form-row {
    margin-bottom: 9px;
}
.ash-form-row label {
    display: block;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 2px;
    color: #333;
}
.ash-form-row input[type="text"],
.ash-form-row input[type="number"],
.ash-form-row input[type="url"],
.ash-form-row textarea,
.ash-form-row select {
    width: 100%;
    padding: 3px 5px;
    border: 1px solid #7F9DB9;
    font-size: 11px;
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}
.ash-form-row textarea {
    resize: vertical;
    min-height: 75px;
}
.ash-form-row .ash-form-hint {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
}
.ash-form-row input[type="checkbox"] {
    margin-right: 4px;
}
.ash-form-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 10px;
    border-top: 1px solid #ddd;
    padding-top: 8px;
}

/* ── Store Create / Edit ──────────────────────────────────────────────────── */

.ash-slug-preview {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
    font-family: monospace;
}

/* ── Pagination ───────────────────────────────────────────────────────────── */

.ash-pagination {
    display: flex;
    gap: 2px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.ash-pagination a,
.ash-pagination span {
    display: inline-block;
    padding: 1px 6px;
    border: 1px solid #AAAAAA;
    font-size: 11px;
    text-decoration: none;
    color: #0000CC;
    background: #fff;
}
.ash-pagination a:hover {
    background: #003399;
    color: #fff;
    border-color: #003399;
}
.ash-pagination .ash-page-current {
    background: #003399;
    color: #fff;
    border-color: #003399;
    font-weight: bold;
}

/* ── No Results / Empty States ────────────────────────────────────────────── */

.ash-empty {
    padding: 18px;
    text-align: center;
    color: #666;
    font-size: 11px;
    border: 1px solid #ddd;
    background: #fafafa;
    margin: 6px 0;
}

/* ── Inline Login Prompt ──────────────────────────────────────────────────── */

.ash-login-prompt {
    padding: 10px;
    border: 1px solid #7F9DB9;
    background: #EEF2FF;
    font-size: 11px;
    margin: 8px 0;
}
.ash-login-prompt a {
    color: #0000CC;
    font-weight: bold;
    text-decoration: none;
}
.ash-login-prompt a:hover {
    text-decoration: underline;
    color: #CC0000;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .ash-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ash-seller-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .ash-product-detail {
        flex-direction: column;
    }
    .ash-product-detail-img {
        flex: none;
        width: 100%;
    }
    .ash-order-meta {
        flex-direction: column;
        gap: 6px;
    }
}

@media (max-width: 420px) {
    .ash-product-grid {
        grid-template-columns: 1fr;
    }
    .ash-seller-stats {
        grid-template-columns: 1fr 1fr;
    }
    .ash-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .ash-toolbar-links {
        justify-content: flex-start;
    }
}
