/* Admin Specific Styles */
:root {
    --admin-bg: #fdf8f9;
    --admin-card-bg: #ffffff;
    --admin-primary: #1c1c1c;
    --admin-secondary: #d4af37;
    --admin-accent: #f4a2b6;
    --admin-danger: #e63946;
    --admin-success: #2a9d8f;
    --admin-border: #e0e0e0;
}

.admin-body {
    background-color: var(--admin-bg);
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.admin-header {
    background: var(--admin-primary);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-small {
    height: 40px;
}

.back-link {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    border-radius: 8px;
    transition: 0.3s;
}

.tab-btn.active {
    background: var(--admin-primary);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.logo-upload-area {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 12px;
}

.logo-preview {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: white;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.social-settings h3 {
    margin: 1.5rem 0 1rem;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--admin-bg);
}

.btn-primary-small {
    background: var(--admin-primary);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-secondary-small {
    background: var(--admin-secondary);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-pdf-small {
    background: #c62828; /* PDF Red */
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
}

.btn-pdf-small:hover {
    background: #b71c1c;
}

.admin-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.login-card {
    max-width: 400px;
    margin: 4rem auto;
    text-align: center;
}

.login-card h2 {
    margin-bottom: 1.5rem;
    color: var(--admin-primary);
}

/* Product list table substitute for admin */
.product-list-admin {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.admin-product-item {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid var(--admin-border);
    transition: var(--transition);
}

.admin-product-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.admin-product-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: #f9f9f9;
}

.admin-product-info {
    flex-grow: 1;
}

.admin-product-info h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--admin-primary);
}

.admin-product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.btn-edit { background: #e3f2fd; color: #1976d2; }
.btn-delete { background: #ffebee; color: #d32f2f; }

/* Modal tweaks for admin */
.admin-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.admin-modal .modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    width: 95%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.half { flex: 1; }

.variants-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.variant-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    align-items: center;
}

.variant-row input {
    flex: 1;
}

.btn-primary {
    background: var(--admin-primary);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

.btn-save {
    background: var(--admin-success);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-cancel {
    background: #f1f1f1;
    color: #666;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.sale-badge-admin {
    background: #e63946;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 0.5rem;
}

/* =============================================
   PRODUCT SEARCH BAR
   ============================================= */
.product-search-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.product-search-box {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.25s;
}

.product-search-input {
    width: 100%;
    padding: 0.65rem 2.5rem 0.65rem 2.75rem;
    border: 1.5px solid var(--admin-border);
    border-radius: 10px;
    font-size: 0.95rem;
    background: #fff;
    color: var(--admin-primary);
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    box-sizing: border-box;
}

.product-search-input:focus {
    border-color: var(--admin-secondary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.product-search-input:focus + .search-icon,
.product-search-box:focus-within .search-icon {
    color: var(--admin-secondary);
}

.clear-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    color: #888;
    transition: background 0.2s, color 0.2s;
}

.clear-search-btn:hover {
    background: var(--admin-danger);
    color: white;
}

.search-results-count {
    font-size: 0.82rem;
    color: #999;
    white-space: nowrap;
    font-weight: 500;
}

.no-results-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: #ccc;
    gap: 0.75rem;
}

.no-results-msg i {
    font-size: 2.5rem;
}

.no-results-msg p {
    margin: 0;
    font-size: 1rem;
    color: #aaa;
}
