/* Haico Distributor Portal - Public Styles */

:root {
    --haico-green: #1a5f4a;
    --haico-light-green: #c8f5d5;
    --haico-dark-green: #0f3d2f;
    --haico-white: #ffffff;
    --haico-gray: #f5f5f5;
    --haico-border: #ddd;
    --haico-text: #333;
}

/* Dashboard */
.hdp-dashboard-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

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

.hdp-dashboard-card {
    background: var(--haico-white);
    border: 1px solid var(--haico-border);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.hdp-dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(26, 95, 74, 0.2);
}

.hdp-dashboard-card h2 {
    color: var(--haico-green);
    margin-bottom: 15px;
}

.hdp-company-info {
    background: var(--haico-light-green);
    border-radius: 8px;
    padding: 30px;
    margin-top: 40px;
}

.hdp-company-info h2 {
    color: var(--haico-green);
    margin-bottom: 20px;
}

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

.hdp-info-item {
    background: var(--haico-white);
    padding: 15px;
    border-radius: 5px;
}

/* Buttons */
.hdp-button {
    display: inline-block;
    padding: 12px 24px;
    background: var(--haico-green);
    color: var(--haico-white);
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.hdp-button:hover {
    background: var(--haico-dark-green);
    color: var(--haico-white);
}

.hdp-button-primary {
    background: var(--haico-green);
}

/* Catalog */
.hdp-catalog-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

.hdp-filters {
    background: var(--haico-gray);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.hdp-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.hdp-filter-search {
    flex: 1;
    min-width: 200px;
}

.hdp-filter-product,
.hdp-filter-category {
    flex: 0 0 auto;
    min-width: 200px;
}

.hdp-filter-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--haico-green);
}

.hdp-search-input,
.hdp-select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--haico-border);
    border-radius: 5px;
    font-size: 14px;
}

.hdp-filter-button {
    padding: 10px 20px;
    background: var(--haico-green);
    color: var(--haico-white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.hdp-filter-button:hover {
    background: var(--haico-dark-green);
}

.hdp-clear-filters {
    padding: 10px 20px;
    color: var(--haico-green);
    text-decoration: none;
    border: 1px solid var(--haico-green);
    border-radius: 5px;
    display: inline-block;
}

.hdp-results-info {
    margin-bottom: 20px;
    color: var(--haico-text);
}

.hdp-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.hdp-catalog-item {
    background: var(--haico-white);
    border: 1px solid var(--haico-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.hdp-catalog-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(26, 95, 74, 0.2);
}

.hdp-item-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--haico-gray);
}

.hdp-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hdp-item-content {
    padding: 20px;
}

.hdp-item-title {
    color: var(--haico-green);
    margin-bottom: 10px;
    font-size: 18px;
}

.hdp-item-code,
.hdp-item-compatibility {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--haico-text);
}

.hdp-item-excerpt {
    margin: 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.hdp-bundle-info {
    background: var(--haico-light-green);
    padding: 10px;
    border-radius: 5px;
    margin: 15px 0;
}

.hdp-bundle-parts {
    margin: 5px 0 0 20px;
    font-size: 13px;
}

.hdp-add-to-cart-btn {
    width: 100%;
    padding: 12px;
    background: var(--haico-green);
    color: var(--haico-white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.hdp-add-to-cart-btn:hover {
    background: var(--haico-dark-green);
}

.hdp-add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Cart Icon */
.hdp-cart-icon-wrapper {
    position: fixed;
    top: 100px;
    right: 30px;
    z-index: 1000;
}

.hdp-cart-icon {
    position: relative;
    background: var(--haico-green);
    color: var(--haico-white);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, background 0.3s;
}

.hdp-cart-icon:hover {
    background: var(--haico-dark-green);
    transform: scale(1.1);
}

.hdp-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: var(--haico-white);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Modal */
.hdp-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.hdp-modal-content {
    background-color: var(--haico-white);
    margin: 2% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.hdp-modal-content h2 {
    background: var(--haico-light-green);
    color: var(--haico-green);
    padding: 20px 30px;
    margin: 0;
    border-radius: 8px 8px 0 0;
}

.hdp-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: var(--haico-green);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
}

.hdp-modal-close:hover {
    color: var(--haico-dark-green);
}

.hdp-modal-body {
    padding: 30px;
}

.hdp-modal-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.hdp-customer-info-column h3,
.hdp-cart-items-column h3 {
    color: var(--haico-green);
    margin-bottom: 20px;
}

.hdp-customer-info-column form p {
    margin-bottom: 15px;
}

.hdp-customer-info-column label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--haico-text);
}

.hdp-customer-info-column input,
.hdp-customer-info-column textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--haico-border);
    border-radius: 5px;
    font-size: 14px;
}

.hdp-info-note {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.hdp-cart-item {
    border: 1px solid var(--haico-border);
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    background: var(--haico-gray);
}

.hdp-cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.hdp-cart-item-title {
    font-weight: bold;
    color: var(--haico-green);
    margin: 0;
}

.hdp-cart-item-remove {
    background: #e74c3c;
    color: var(--haico-white);
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.hdp-cart-item-details {
    font-size: 14px;
    color: var(--haico-text);
    margin: 5px 0;
}

.hdp-cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.hdp-cart-item-quantity input {
    width: 60px;
    padding: 5px;
    border: 1px solid var(--haico-border);
    border-radius: 3px;
    text-align: center;
}

.hdp-related-files-section {
    border-top: 2px solid var(--haico-border);
    padding-top: 20px;
    margin-top: 20px;
}

.hdp-related-files-section h3 {
    color: var(--haico-green);
    margin-bottom: 15px;
}

.hdp-related-file {
    border: 1px solid var(--haico-border);
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--haico-gray);
}

.hdp-file-info h4 {
    margin: 0 0 5px 0;
    color: var(--haico-green);
}

.hdp-file-meta {
    font-size: 12px;
    color: #666;
}

.hdp-file-download {
    padding: 8px 16px;
    background: var(--haico-green);
    color: var(--haico-white);
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
}

.hdp-modal-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid var(--haico-border);
}

.hdp-submit-button {
    padding: 15px 40px;
    background: var(--haico-green);
    color: var(--haico-white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background 0.3s;
}

.hdp-submit-button:hover {
    background: var(--haico-dark-green);
}

.hdp-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Profile */
.hdp-profile-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.hdp-form {
    background: var(--haico-white);
    border: 1px solid var(--haico-border);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.hdp-form h2 {
    color: var(--haico-green);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--haico-light-green);
}

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

.hdp-form-field {
    margin-bottom: 20px;
}

.hdp-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--haico-text);
}

.hdp-form-field input,
.hdp-form-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--haico-border);
    border-radius: 5px;
    font-size: 14px;
}

.hdp-form-field input:read-only {
    background: var(--haico-gray);
    cursor: not-allowed;
}

.hdp-field-note {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.hdp-form-actions {
    margin-top: 30px;
}

.hdp-password-section {
    background: var(--haico-light-green);
    border-radius: 8px;
    padding: 30px;
}

.hdp-password-section h2 {
    color: var(--haico-green);
    margin-bottom: 15px;
}

.hdp-message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.hdp-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.hdp-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Orders */
.hdp-orders-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.hdp-order-card {
    background: var(--haico-white);
    border: 1px solid var(--haico-border);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.hdp-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--haico-light-green);
}

.hdp-order-header h2 {
    color: var(--haico-green);
    margin: 0;
}

.hdp-order-status {
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
}

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

.hdp-status-processing {
    background: #d1ecf1;
    color: #0c5460;
}

.hdp-status-completed {
    background: #d4edda;
    color: #155724;
}

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

.hdp-order-meta {
    margin-bottom: 20px;
}

.hdp-order-items h3 {
    color: var(--haico-green);
    margin-bottom: 15px;
}

.hdp-order-items-table {
    width: 100%;
    border-collapse: collapse;
}

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

.hdp-order-items-table th {
    background: var(--haico-light-green);
    color: var(--haico-green);
    font-weight: bold;
}

.hdp-bundle-parts-list {
    margin: 10px 0 0 20px;
    font-size: 13px;
    color: #666;
}

.hdp-no-orders {
    text-align: center;
    padding: 60px 20px;
}

/* Downloads */
.hdp-downloads-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.hdp-downloads-filter {
    background: var(--haico-gray);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.hdp-downloads-filter form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.hdp-downloads-section {
    margin-bottom: 50px;
}

.hdp-downloads-section h2 {
    color: var(--haico-green);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--haico-light-green);
}

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

.hdp-download-card {
    background: var(--haico-white);
    border: 1px solid var(--haico-border);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.hdp-download-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(26, 95, 74, 0.2);
}

.hdp-download-icon {
    color: var(--haico-green);
    margin-bottom: 15px;
}

.hdp-download-card h3 {
    color: var(--haico-green);
    margin-bottom: 10px;
    font-size: 16px;
}

.hdp-download-description {
    font-size: 14px;
    color: #666;
    margin: 15px 0;
    line-height: 1.6;
}

.hdp-download-meta {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
    font-size: 12px;
    color: #666;
}

.hdp-download-button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--haico-green);
    color: var(--haico-white);
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.hdp-download-button:hover {
    background: var(--haico-dark-green);
}

.hdp-no-downloads {
    text-align: center;
    padding: 60px 20px;
}

/* Pagination */
.hdp-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.hdp-pagination a,
.hdp-pagination span {
    padding: 10px 15px;
    border: 1px solid var(--haico-border);
    border-radius: 5px;
    text-decoration: none;
    color: var(--haico-green);
}

.hdp-pagination a:hover {
    background: var(--haico-light-green);
}

.hdp-pagination .current {
    background: var(--haico-green);
    color: var(--haico-white);
    border-color: var(--haico-green);
}

/* Responsive */
@media (max-width: 768px) {
    .hdp-modal-columns {
        grid-template-columns: 1fr;
    }
    
    .hdp-form-row {
        grid-template-columns: 1fr;
    }
    
    .hdp-catalog-grid {
        grid-template-columns: 1fr;
    }
    
    .hdp-downloads-grid {
        grid-template-columns: 1fr;
    }
    
    .hdp-cart-icon-wrapper {
        right: 15px;
        top: 80px;
    }
    
    .hdp-filter-form {
        flex-direction: column;
    }
    
    .hdp-filter-search,
    .hdp-filter-product,
    .hdp-filter-category {
        width: 100%;
    }
}

/* ── Price & total additions ── */
.hdp-item-price {
    font-size: 1.2em;
    font-weight: 700;
    color: #1a5f4a;
    margin: 6px 0 10px;
}

.hdp-cart-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.hdp-cart-item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.9em;
}

.hdp-unit-price {
    color: #666;
}

.hdp-line-total {
    font-weight: 700;
    color: #1a5f4a;
    font-size: 1.05em;
}

.hdp-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid #1a5f4a;
    margin-top: 16px;
    padding-top: 12px;
}

.hdp-cart-total-label {
    font-weight: 700;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #333;
}

.hdp-cart-total-value {
    font-weight: 700;
    font-size: 1.4em;
    color: #1a5f4a;
}
