/* 
   Energy Trade International - Component Stylesheet
   Contains styling for Header, Footer, Cards, Modals, Forms, and Admin Panels.
*/

/* --- HEADER & NAVIGATION --- */
.site-header {
    background: var(--header-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.site-header.scrolled {
    background: var(--bg-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color-muted);
    position: relative;
    padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--bg-color);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 40px;
        gap: 24px;
        transition: var(--transition);
        border-top: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        left: 0;
    }
}

/* --- FOOTER --- */
.site-footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 80px 0 30px 0;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-logo {
    height: 55px;
    align-self: flex-start;
}

.footer-title {
    font-size: 1.15rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: var(--text-color-muted);
}

.footer-link:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
    color: var(--text-color-muted);
}

.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.footer-contact-list svg {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 4px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color-muted);
    font-size: 0.85rem;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* --- PRODUCT CARD --- */
.product-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(253, 184, 19, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.product-image-container {
    background: var(--product-img-bg);
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 220px;
    border-bottom: 1px solid var(--border-color);
}

.product-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
}

.product-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.product-desc {
    font-size: 0.9rem;
    color: var(--text-color-muted);
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-specs-brief {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
    padding: 12px 0;
    text-align: center;
}

.spec-item {
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-color-muted);
    margin-bottom: 2px;
}

.spec-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

.product-price-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

/* --- STATS CARD --- */
.stat-card {
    text-align: center;
    padding: 30px;
    border-radius: var(--border-radius-md);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: var(--text-color);
}

/* --- SPECIFICATIONS TABLE --- */
.tech-table-container {
    overflow-x: auto;
    margin: 30px 0;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.tech-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.tech-table th, .tech-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
}

.tech-table th {
    background-color: var(--surface-color);
    font-weight: 600;
    color: var(--primary);
}

.tech-table tr:last-child td {
    border-bottom: none;
}

.tech-table tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

/* --- MODAL DIALOG --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-overlay-bg);
    backdrop-filter: var(--glass-blur);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    width: 90%;
    max-width: 550px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    color: var(--text-color);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-color-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* --- WHATSAPP FLOATING WIDGET --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: #FFFFFF;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 999;
    font-size: 1.8rem;
    animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
    background-color: #20BA5A;
    transform: scale(1.08);
}

@keyframes whatsappPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --- ADMIN PANEL SPECIFIC --- */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background-color: var(--surface-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 10;
}

.admin-logo-section {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.admin-menu {
    list-style: none;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.admin-menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-color-muted);
    font-weight: 500;
}

.admin-menu-item.active a, .admin-menu-item a:hover {
    color: var(--primary);
    background-color: rgba(253, 184, 19, 0.05);
    border-left: 3px solid var(--primary);
}

.admin-content-area {
    margin-left: 260px;
    flex-grow: 1;
    padding: 40px;
    background-color: var(--bg-color);
    min-height: 100vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

@media (max-width: 992px) {
    .admin-sidebar {
        width: 70px;
    }
    .admin-logo-section h3, .admin-menu-item span {
        display: none;
    }
    .admin-content-area {
        margin-left: 70px;
        padding: 20px;
    }
}

/* Admin Dashboard Stat Box Grid */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.admin-stat-box {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-sm);
    background-color: rgba(253, 184, 19, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.admin-stat-data h4 {
    font-size: 1.8rem;
    color: var(--text-color);
}

.admin-stat-data p {
    font-size: 0.85rem;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Admin Table design */
.admin-table-container {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.admin-table th, .admin-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.admin-table th {
    background-color: var(--bg-color);
    color: var(--text-color-muted);
    font-weight: 600;
}

.admin-table tr:hover {
    background-color: rgba(255, 255, 255, 0.01);
}

.action-btn-group {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.action-btn-edit { background-color: var(--primary); color: #000; }
.action-btn-delete { background-color: var(--error); color: #fff; }
.action-btn-view { background-color: rgba(255, 255, 255, 0.1); color: #fff; }

/* Admin login page styling */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-color);
}

.login-card {
    width: 100%;
    max-width: 420px;
}

