/*
Theme Name: IPHOXY B2B Wholesale
Theme URI: https://iphoxy.com
Author: IPHOXY CORP
Author URI: https://iphoxy.com
Description: Professional B2B wholesale ordering portal for IPHOXY CORP. Features custom authentication with approval workflow, Zoho Inventory integration, and draft sales order creation. No WooCommerce required.
Version: 2.0.1
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: Proprietary
License URI: https://iphoxy.com/terms
Text Domain: iphoxy-b2b
Tags: b2b, wholesale, inventory, zoho, custom-login

IPHOXY B2B Wholesale Theme
Copyright 2025 IPHOXY CORP
3006 NW 72nd Ave, Miami, FL 33122, United States
*/

:root {
    --iphoxy-red: #E82028;
    --iphoxy-dark: #1a1a1a;
    --iphoxy-gray: #333333;
    --iphoxy-light: #f5f5f5;
    --iphoxy-white: #ffffff;
    --iphoxy-success: #28a745;
    --iphoxy-warning: #ffc107;
    --iphoxy-danger: #dc3545;
    --iphoxy-info: #17a2b8;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--iphoxy-gray);
    background-color: var(--iphoxy-light);
}

a {
    color: var(--iphoxy-red);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #c41a21;
}

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

/* Header Styles */
.site-header {
    background: var(--iphoxy-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.site-logo img {
    height: 60px;
    width: auto;
}

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

.main-nav a {
    color: var(--iphoxy-dark);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 0;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--iphoxy-red);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--iphoxy-red);
    transition: width 0.3s ease;
}

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

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: #c41a21;
    color: var(--iphoxy-white);
}

.btn-secondary {
    background: var(--iphoxy-dark);
    color: var(--iphoxy-white);
}

.btn-secondary:hover {
    background: #000;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--iphoxy-red);
    color: var(--iphoxy-red);
}

.btn-outline:hover {
    background: var(--iphoxy-red);
    color: var(--iphoxy-white);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--iphoxy-dark) 0%, #2d2d2d 100%);
    color: var(--iphoxy-white);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: var(--iphoxy-red);
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Cards */
.card {
    background: var(--iphoxy-white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--iphoxy-dark);
}

.card-text {
    color: #666;
    font-size: 14px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.product-card {
    background: var(--iphoxy-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: #f9f9f9;
    padding: 20px;
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 12px;
    color: var(--iphoxy-red);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--iphoxy-dark);
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-sku {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.product-stock {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.stock-in {
    background: #e8f5e9;
    color: var(--iphoxy-success);
}

.stock-out {
    background: #ffebee;
    color: var(--iphoxy-danger);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--iphoxy-dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--iphoxy-red);
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #e8f5e9;
    color: var(--iphoxy-success);
    border: 1px solid #c8e6c9;
}

.alert-error {
    background: #ffebee;
    color: var(--iphoxy-danger);
    border: 1px solid #ffcdd2;
}

.alert-warning {
    background: #fff8e1;
    color: #f57c00;
    border: 1px solid #ffecb3;
}

.alert-info {
    background: #e3f2fd;
    color: var(--iphoxy-info);
    border: 1px solid #bbdefb;
}

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

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

.footer-col h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--iphoxy-white);
}

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

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

.footer-col ul li a {
    color: #aaa;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--iphoxy-red);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: center;
    color: #888;
}

/* Dashboard */
.dashboard-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: calc(100vh - 80px);
}

.dashboard-sidebar {
    background: var(--iphoxy-white);
    border-right: 1px solid #e0e0e0;
    padding: 30px 0;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    color: var(--iphoxy-gray);
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: var(--iphoxy-light);
    color: var(--iphoxy-red);
    border-left: 3px solid var(--iphoxy-red);
}

.dashboard-content {
    padding: 30px;
    background: var(--iphoxy-light);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--iphoxy-dark);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--iphoxy-white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--iphoxy-dark);
}

.stat-label {
    color: #888;
    font-size: 14px;
    margin-top: 5px;
}

/* Tables */
.data-table {
    width: 100%;
    background: var(--iphoxy-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.data-table th,
.data-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    background: var(--iphoxy-light);
    font-weight: 600;
    color: var(--iphoxy-dark);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.data-table tr:hover {
    background: #fafafa;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-pending {
    background: #fff3e0;
    color: #f57c00;
}

.badge-approved {
    background: #e8f5e9;
    color: var(--iphoxy-success);
}

.badge-denied {
    background: #ffebee;
    color: var(--iphoxy-danger);
}

.badge-draft {
    background: #e3f2fd;
    color: var(--iphoxy-info);
}

/* Order Panel */
.order-panel {
    position: fixed;
    right: 0;
    top: 80px;
    width: 350px;
    height: calc(100vh - 80px);
    background: var(--iphoxy-white);
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    padding: 25px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 999;
}

.order-panel.active {
    transform: translateX(0);
}

.order-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-item-info h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.order-item-info span {
    font-size: 12px;
    color: #888;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-control button {
    width: 30px;
    height: 30px;
    border: 1px solid #e0e0e0;
    background: var(--iphoxy-white);
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.quantity-control input {
    width: 50px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 5px;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .dashboard-wrapper {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        display: none;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .order-panel {
        width: 100%;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mt-40 { margin-top: 40px; }
.mb-40 { margin-bottom: 40px; }
.p-20 { padding: 20px; }
.p-40 { padding: 40px; }

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--iphoxy-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Category Sidebar */
.catalog-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    padding: 40px 0;
}

.category-sidebar {
    background: var(--iphoxy-white);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.category-list {
    list-style: none;
}

.category-item {
    margin-bottom: 5px;
}

.category-item > a {
    display: block;
    padding: 12px 15px;
    color: var(--iphoxy-gray);
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.category-item > a:hover,
.category-item > a.active {
    background: var(--iphoxy-light);
    color: var(--iphoxy-red);
}

.subcategory-list {
    list-style: none;
    padding-left: 20px;
    display: none;
}

.category-item.expanded .subcategory-list {
    display: block;
}

.subcategory-list li a {
    display: block;
    padding: 8px 15px;
    color: #666;
    font-size: 14px;
}

.subcategory-list li a:hover {
    color: var(--iphoxy-red);
}

/* Search Box */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--iphoxy-red);
}

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

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: var(--iphoxy-gray);
    font-weight: 500;
}

.pagination a:hover,
.pagination .current {
    background: var(--iphoxy-red);
    border-color: var(--iphoxy-red);
    color: var(--iphoxy-white);
}

/* Map Container */
.map-container {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    margin: 30px 0;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Contact Info */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--iphoxy-red);
    color: var(--iphoxy-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--iphoxy-dark);
}

.contact-details p {
    color: #666;
    font-size: 14px;
}
