/* Reset và Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Màu xanh lá cây chính */
    --primary-green: #2d7a3e;
    --primary-green-dark: #1e5a2c;
    --primary-green-light: #3a9c4f;
    
    /* Màu phụ */
    --secondary-green: #4caf50;
    --light-green: #e8f5e9;
    --very-light-green: #f1f8f4;
    
    /* Màu trạng thái */
    --success-green: #4caf50;
    --error-red: #f44336;
    --warning-orange: #ff9800;
    
    /* Màu trung tính */
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --gray: #9e9e9e;
    --dark-gray: #424242;
    --black: #212121;
    
    /* Shadow */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50%;
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--very-light-green) 0%, var(--light-green) 100%);
    color: var(--black);
    line-height: 1.6;
    min-height: 100vh;
    padding: var(--spacing-md);
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    animation: slideDown 0.5s ease-out;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Logo công ty */
.company-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

/* Logo placeholder khi không có logo */
.logo-placeholder {
    width: 60px;
    height: 60px;
    background: var(--light-green);
    border-radius: var(--radius-md);
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-placeholder svg {
    width: 36px;
    height: 36px;
    color: var(--primary-green);
}

.header-text {
    flex: 1;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 2px;
}

.header-subtitle {
    font-size: 13px;
    color: var(--gray);
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    animation: fadeIn 0.6s ease-out;
}

/* Loading State */
.loading-state {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-green);
    border-top: 4px solid var(--primary-green);
    border-radius: var(--radius-full);
    margin: 0 auto var(--spacing-md);
    animation: spin 1s linear infinite;
}

.loading-state p {
    color: var(--dark-gray);
    font-size: 16px;
}

/* Error State */
.error-state {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.5s ease-out;
}

.error-icon {
    width: 80px;
    height: 80px;
    color: var(--error-red);
    margin: 0 auto var(--spacing-md);
}

.error-state h2 {
    font-size: 22px;
    color: var(--error-red);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.error-state p {
    color: var(--dark-gray);
    margin-bottom: var(--spacing-xs);
}

/* Giữ dòng chữ không xuống hàng trên màn hình lớn */
@media (min-width: 769px) {
    .error-state p:not(.error-detail) {
        white-space: nowrap;
    }
}

.error-detail {
    color: var(--gray);
    font-size: 14px;
}

/* Success State */
.success-state {
    animation: fadeIn 0.5s ease-out;
}

/* Verification Badge */
.verification-badge {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-light) 100%);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--white);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--spacing-lg);
    animation: scaleIn 0.5s ease-out;
}

.check-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    padding: var(--spacing-md);
    margin: 0 auto var(--spacing-md);
    animation: checkmark 0.6s ease-out;
}

.verification-badge h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.verified-text {
    font-size: 14px;
    opacity: 0.9;
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-lg);
    animation: slideUp 0.5s ease-out;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--light-green);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.info-item {
    padding: var(--spacing-sm);
    background: var(--very-light-green);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary-green);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-label {
    font-size: 13px;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-xs);
}

.info-value {
    font-size: 16px;
    color: var(--black);
    font-weight: 600;
    word-break: break-word;
}

/* Nút quay về trang chủ */
.home-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--primary-green);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    margin-top: var(--spacing-lg);
    justify-content: center;
}

.home-button:hover {
    background: var(--primary-green-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.home-button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.home-button svg {
    width: 20px;
    height: 20px;
}

/* Căn giữa nút trong success state */
.success-state .home-button {
    display: flex;
    width: 100%;
    max-width: 300px;
    margin: var(--spacing-lg) auto 0;
}

/* Căn giữa nút trong error state */
.error-state .home-button {
    display: inline-flex;
    margin-top: var(--spacing-lg);
}

/* Footer */
.footer {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin-top: var(--spacing-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.footer p {
    font-size: 13px;
    color: var(--gray);
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (min-width: 640px) {
    body {
        padding: var(--spacing-lg);
    }
    
    .header h1 {
        font-size: 28px;
    }
    
    .company-logo,
    .logo-placeholder {
        width: 70px;
        height: 70px;
    }
    
    .logo-placeholder svg {
        width: 42px;
        height: 42px;
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .verification-badge h2 {
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    body {
        padding: var(--spacing-sm);
    }
    
    .header {
        padding: var(--spacing-md);
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .header-subtitle {
        font-size: 11px;
    }
    
    .company-logo,
    .logo-placeholder {
        width: 50px;
        height: 50px;
    }
    
    .logo-placeholder svg {
        width: 30px;
        height: 30px;
    }
    
    .logo-section {
        gap: var(--spacing-sm);
    }
    
    .product-card {
        padding: var(--spacing-md);
    }
    
    .verification-badge {
        padding: var(--spacing-lg);
    }
    
    .check-icon {
        width: 60px;
        height: 60px;
    }
    /* Logo ~60px trên desktop */
@media (min-width: 992px) {
  .header .logo-section .logo-img {
    height: auto !important;
    width: auto !important;
    max-height: 60px !important;  /* đúng yêu cầu */
    max-width: 90px !important;   /* tỉ lệ an toàn, có thể tăng/giảm */
    object-fit: contain;
    display: block;
  }
}

/* (Tùy chọn) Giữ mobile như hiện tại */
@media (max-width: 991.98px) {
  .header .logo-section .logo-img {
    max-height: 56px;   /* đang ổn trên mobile, chỉnh nếu cần */
    max-width: 80px;
  }
}

/* Chặn các rule khác set width theo % */
.header .logo-section img {
  width: auto !important;
}

}

