/* Matrix Navigation */
.hito-matrix-nav {
    margin: 30px 0;
    text-align: center;
}

.hito-nav-btn {
    padding: 12px 24px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    background: #ffffff;
    transition: all 0.2s ease;
    font-size: 14px;
    display: inline-block;
    margin: 5px;
}

.hito-nav-btn:hover {
    background: #f8fafc;
    border-color: #3b82f6;
    color: #3b82f6;
}

.hito-nav-btn.nav-active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Matrix Grid */
.hito-matrix-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.hito-matrix-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.hito-matrix-cell {
    text-align: center;
    cursor: pointer;
}

.hito-product-image {
    margin-bottom: 15px;
}

.hito-product-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.hito-product-image img:hover {
    transform: scale(1.02);
}

.hito-product-name {
    font-weight: 600;
    color: #374151;
    font-size: 16px;
}

/* Modal Styles */
.hito-product-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.hito-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

.hito-close-modal {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hito-modal-image {
    flex: 0 0 200px;
}

.hito-modal-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.hito-modal-details {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

.hito-modal-details h3 {
    margin: 0 0 20px 0;
    color: #111827;
    font-size: 24px;
}

/* Attribute Styles */
.hito-attribute-group {
    margin-bottom: 25px;
}

.hito-attribute-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #374151;
}

.hito-attribute-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hito-attribute-btn {
    padding: 10px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.hito-attribute-btn:hover {
    border-color: #3b82f6;
}

.hito-attribute-btn.selected {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.hito-modal-price {
    font-size: 24px;
    font-weight: 700;
    color: #059669;
    margin: 25px 0;
    text-align: center;
}

.hito-add-selection-btn {
    width: 100%;
    padding: 15px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hito-add-selection-btn:hover:not(:disabled) {
    background: #2563eb;
}

.hito-add-selection-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Selection Summary */
.hito-selection-summary {
    background: #f8fafc;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #e5e7eb;
}

.hito-selection-summary h3 {
    margin: 0 0 20px 0;
    color: #111827;
}

.hito-selected-items {
    min-height: 100px;
    margin-bottom: 25px;
}

.hito-no-selection {
    color: #6b7280;
    text-align: center;
    font-style: italic;
}

.hito-selected-item {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
}

.hito-item-details {
    flex: 1;
}

.hito-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.hito-item-attributes {
    font-size: 14px;
    color: #6b7280;
}

.hito-item-price {
    font-weight: 600;
    color: #059669;
}

.hito-remove-item {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    margin-left: 15px;
}

.hito-summary-totals {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.hito-total-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}

.hito-final-total {
    font-size: 18px;
    font-weight: 700;
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .hito-matrix-grid {
        grid-template-columns: 1fr;
    }
    
    .hito-modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .hito-attribute-options {
        justify-content: center;
    }
}
