/* IPHOXY B2B Theme Styles */

:root {
    --primary: #E82028;
    --primary-dark: #c41a21;
    --secondary: #1a1a1a;
    --text: #424245;
    --text-light: #86868b;
    --bg: #FAFAF7;
    --bg-light: #FAFAF7;
    --border: #eeeeee;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --radius: 8px;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 30px;
}

.site-logo {
    display: flex;
    align-items: baseline;
    text-decoration: none;
    gap: 5px;
}

.logo-text {
    font-size: 28px;
    font-weight: 600;
    color: var(--secondary);
    letter-spacing: -1px;
}

.logo-corp {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.main-nav {
    display: flex;
    gap: 25px;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: color 0.2s;
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-greeting {
    color: var(--text-light);
    font-size: 14px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--secondary);
    border-color: var(--border);
}

.btn-outline:hover {
    border-color: var(--secondary);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 16px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Hero */
.home-hero {
    background: linear-gradient(135deg, var(--secondary) 0%, #333 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content .brand {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.status-notice {
    background: rgba(255,255,255,0.1);
    padding: 20px 30px;
    border-radius: var(--radius);
    display: inline-block;
}

/* Features */
.features-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-light);
}

/* CTA */
.cta-section {
    background: var(--primary);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.cta-content p {
    opacity: 0.9;
    margin-bottom: 25px;
}

.cta-section .btn-primary {
    background: white;
    color: var(--primary);
    border-color: white;
}

/* Auth Pages */
.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--bg-light);
}

.auth-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 450px;
}

.auth-card-wide {
    max-width: 600px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-light);
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"],
.auth-form select,
.auth-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.phone-input {
    display: flex;
    gap: 10px;
}

.phone-input select {
    width: 100px;
    flex-shrink: 0;
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: var(--text-light);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input {
    margin-top: 3px;
}

.auth-message {
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.auth-message.success {
    background: #d4edda;
    color: #155724;
}

.auth-message.error {
    background: #f8d7da;
    color: #721c24;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Page Header */
.page-header {
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
}

.page-header h1 {
    margin-bottom: 10px;
}

.page-header p {
    color: var(--text-light);
}

/* Inventory */
.inventory-page {
    padding-bottom: 60px;
}

.inventory-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.filter-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group select,
.filter-group input {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
}

.search-group {
    display: flex;
    gap: 10px;
}

.search-group input {
    width: 250px;
}

.results-count {
    color: var(--text-light);
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.product-card:hover {
    box-shadow: var(--shadow);
}

.product-image {
    height: 180px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.no-image {
    font-size: 64px;
    opacity: 0.3;
}

.product-info {
    padding: 20px;
}

.product-sku {
    display: inline-block;
    background: var(--bg-light);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
    margin-bottom: 10px;
}

.product-name {
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-stock {
    margin-bottom: 15px;
}

.product-stock.in-stock .stock-qty {
    color: var(--success);
}

.product-stock.out-of-stock .stock-qty {
    color: var(--danger);
}

.product-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.qty-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 18px;
}

.qty-value {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 14px;
}

.qty-value::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

/* Cart */
.cart-page {
    padding-bottom: 60px;
}

.empty-cart, .no-orders, .no-results {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.cart-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

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

.cart-table th,
.cart-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.cart-table th {
    background: var(--bg-light);
    font-weight: 600;
}

.cart-summary {
    background: var(--bg-light);
    padding: 25px;
    border-radius: var(--radius);
    height: fit-content;
}

.cart-summary h3 {
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.summary-note {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 15px;
}

/* Orders */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.orders-table th,
.orders-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.orders-table th {
    background: var(--bg-light);
}

.back-link {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--text-light);
    text-decoration: none;
}

.order-detail {
    display: grid;
    gap: 30px;
}

.order-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.meta-card {
    background: white;
    padding: 25px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.meta-card h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.meta-card dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
}

.meta-card dt {
    color: var(--text-light);
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.items-table th,
.items-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

/* Account */
.account-page {
    padding-bottom: 60px;
}

.status-alert {
    padding: 30px;
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.status-alert.status-pending {
    background: #fff3cd;
    border: 1px solid #ffc107;
}

.status-alert.status-denied {
    background: #f8d7da;
    border: 1px solid #dc3545;
}

.account-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.account-card {
    background: white;
    padding: 25px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.account-card h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.account-details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 20px;
}

.account-details dt {
    color: var(--text-light);
}

.quick-links {
    list-style: none;
}

.quick-links li {
    margin-bottom: 10px;
}

.quick-links a {
    color: var(--text);
    text-decoration: none;
}

.quick-links a:hover {
    color: var(--primary);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved, .status-submitted {
    background: #d4edda;
    color: #155724;
}

.status-denied {
    background: #f8d7da;
    color: #721c24;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.page-info {
    color: var(--text-light);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    max-width: 500px;
    width: 90%;
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 25px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Notification */
.cart-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    border-radius: var(--radius);
    color: white;
    font-weight: 500;
    z-index: 10000;
}

.cart-notification.success {
    background: var(--success);
}

.cart-notification.error {
    background: var(--danger);
}

/* Footer */
.site-footer {
    background: var(--secondary);
    color: white;
    padding: 60px 0 30px;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo-text {
    color: white;
}

.footer-tagline {
    margin-top: 10px;
    opacity: 0.7;
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a,
.footer-contact a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: white;
}

.footer-contact p {
    margin-bottom: 5px;
    opacity: 0.7;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }
    
    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 15px;
        padding: 20px 0;
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .cart-content {
        grid-template-columns: 1fr;
    }
    
    .inventory-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .search-group {
        flex-direction: column;
    }
    
    .search-group input {
        width: 100%;
    }
}
