/* ========================================
   Albasy Hybrid Marketplace — Public CSS
   ======================================== */

/* Variables */
:root {
    --ahm-primary: #1a1a2e;
    --ahm-secondary: #16213e;
    --ahm-accent: #e94560;
    --ahm-success: #4caf50;
    --ahm-warning: #ff9800;
    --ahm-danger: #f44336;
    --ahm-info: #2196f3;
    --ahm-bg: #f8f9fa;
    --ahm-border: #e0e0e0;
    --ahm-radius: 10px;
    --ahm-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* === Checkout Hybride === */
.ahm-checkout-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px;
}

.ahm-checkout-wrap h2 {
    font-size: 1.6em;
    color: var(--ahm-primary);
    margin-bottom: 20px;
}

.ahm-checkout-summary {
    background: #fff;
    border-radius: var(--ahm-radius);
    box-shadow: var(--ahm-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.ahm-summary-table {
    width: 100%;
    border-collapse: collapse;
}

.ahm-summary-table td {
    padding: 12px 0;
    border-bottom: 1px solid var(--ahm-border);
    font-size: 1em;
}

.ahm-summary-table .ahm-amount {
    text-align: right;
}

.ahm-summary-table .ahm-highlight {
    background: #e8f5e9;
}

.ahm-summary-table .ahm-highlight td {
    padding: 14px 8px;
    border-radius: 6px;
    font-size: 1.1em;
}

.ahm-checkout-info {
    background: #e3f2fd;
    padding: 14px 18px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 0.92em;
    color: #1565c0;
    line-height: 1.6;
}

.ahm-checkout-info i {
    margin-right: 6px;
}

/* Cart Items in Checkout */
.ahm-cart-items {
    margin-bottom: 24px;
}

.ahm-cart-items h3 {
    color: var(--ahm-primary);
    margin-bottom: 12px;
}

.ahm-cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 8px;
}

.ahm-cart-item-img img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.ahm-cart-item-info {
    flex: 1;
}

.ahm-cart-item-info strong {
    display: block;
    margin-bottom: 4px;
}

.ahm-cart-item-info small {
    color: #888;
    display: block;
    margin-bottom: 2px;
}

/* Checkout Form */
.ahm-checkout-form {
    background: #fff;
    border-radius: var(--ahm-radius);
    box-shadow: var(--ahm-shadow);
    padding: 24px;
}

.ahm-checkout-form h3 {
    color: var(--ahm-primary);
    margin-top: 0;
    margin-bottom: 20px;
}

.ahm-form-row {
    margin-bottom: 16px;
}

.ahm-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 0.92em;
}

.ahm-form-row input,
.ahm-form-row textarea,
.ahm-form-row select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--ahm-border);
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.ahm-form-row input:focus,
.ahm-form-row textarea:focus {
    border-color: var(--ahm-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(233,69,96,0.1);
}

/* Buttons */
.ahm-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1em;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.ahm-btn-pay {
    background: var(--ahm-success);
    color: #fff;
    width: 100%;
    font-size: 1.1em;
    padding: 16px;
    margin-top: 10px;
}

.ahm-btn-pay:hover {
    background: #43a047;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76,175,80,0.3);
}

.ahm-btn-pay i {
    margin-right: 8px;
}

.ahm-checkout-empty {
    text-align: center;
    padding: 60px 20px;
}

.ahm-checkout-empty .ahm-btn {
    background: var(--ahm-accent);
    color: #fff;
    margin-top: 16px;
}

/* === Vendor Dashboard === */
.ahm-vendor-dashboard {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.ahm-vendor-dashboard h2 {
    color: var(--ahm-primary);
    margin-bottom: 24px;
}

.ahm-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.ahm-card {
    background: #fff;
    border-radius: var(--ahm-radius);
    box-shadow: var(--ahm-shadow);
    padding: 20px;
    text-align: center;
}

.ahm-card-icon {
    font-size: 1.6em;
    color: var(--ahm-accent);
    margin-bottom: 8px;
}

.ahm-card-value {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 4px;
}

.ahm-card-label {
    font-size: 0.85em;
    color: #888;
}

.ahm-dashboard-section {
    background: #fff;
    border-radius: var(--ahm-radius);
    box-shadow: var(--ahm-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.ahm-dashboard-section h3 {
    color: var(--ahm-primary);
    margin-top: 0;
    margin-bottom: 16px;
}

.ahm-dashboard-section h3 i {
    margin-right: 8px;
    color: var(--ahm-accent);
}

/* === Tables === */
.ahm-table {
    width: 100%;
    border-collapse: collapse;
}

.ahm-table th,
.ahm-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--ahm-border);
    font-size: 0.92em;
}

.ahm-table th {
    background: var(--ahm-bg);
    font-weight: 600;
    color: #555;
}

.ahm-table tr:hover {
    background: #f5f5f5;
}

/* === Badges === */
.ahm-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
}

.ahm-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.82em;
    font-weight: 600;
}

.ahm-badge i {
    font-size: 0.9em;
}

/* === Store Score Badge === */
.ahm-store-score {
    margin: 8px 0;
}

.ahm-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.88em;
    font-weight: 600;
}

/* === Stars === */
.ahm-stars {
    display: inline-flex;
    gap: 2px;
    color: #ff9800;
    font-size: 0.95em;
}

/* === Top Vendors === */
.ahm-top-vendors {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.ahm-top-vendors h2 {
    text-align: center;
    color: var(--ahm-primary);
    margin-bottom: 24px;
}

.ahm-vendor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.ahm-vendor-card {
    background: #fff;
    border-radius: var(--ahm-radius);
    box-shadow: var(--ahm-shadow);
    padding: 20px;
    text-align: center;
    position: relative;
}

.ahm-vendor-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--ahm-accent);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85em;
}

.ahm-vendor-avatar {
    margin-bottom: 10px;
}

.ahm-vendor-avatar img {
    border-radius: 50%;
}

.ahm-vendor-card h4 {
    margin: 8px 0;
    color: var(--ahm-primary);
}

.ahm-vendor-score {
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.ahm-vendor-rating {
    margin-bottom: 8px;
}

.ahm-vendor-rating small {
    color: #888;
}

/* === Deposit Detail in Cart === */
.ahm-deposit-detail {
    color: #888;
    font-size: 0.85em;
}

/* === Hybrid Order Info === */
.ahm-order-hybrid-info table {
    width: 100%;
}

.ahm-order-hybrid-info td {
    padding: 6px 0;
}

/* === Responsive === */
@media (max-width: 768px) {
    .ahm-dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .ahm-vendor-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ahm-checkout-wrap,
    .ahm-vendor-dashboard,
    .ahm-top-vendors {
        padding: 10px;
    }

    .ahm-card-value {
        font-size: 1.4em;
    }
}

@media (max-width: 480px) {
    .ahm-dashboard-cards {
        grid-template-columns: 1fr;
    }

    .ahm-vendor-grid {
        grid-template-columns: 1fr;
    }
}
